[PATCH] [SRU] [Config]: TUV: I2C_CHARDEV=y

Paolo Pisati paolo.pisati at canonical.com
Mon Feb 16 13:37:27 UTC 2015


BugLink: http://bugs.launchpad.net/bugs/1417032

My board has an i2c bus (and devices attached to it), but the corresponding
/dev entries are missing and userspace can't access these devices until the
i2c-dev module is loaded:

[flag at luxor ~]$ ls -la /sys/bus/i2c/devices/
total 0
drwxr-xr-x 2 root root 0 Feb 2 08:38 .
drwxr-xr-x 4 root root 0 Feb 2 08:38 ..
lrwxrwxrwx 1 root root 0 Feb 2 09:28 i2c-0 -> ../../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/i2c-0
lrwxrwxrwx 1 root root 0 Feb 2 09:28 i2c-1 -> ../../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/i2c-1
lrwxrwxrwx 1 root root 0 Feb 2 09:28 i2c-2 -> ../../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/i2c-2
lrwxrwxrwx 1 root root 0 Feb 2 09:28 i2c-3 -> ../../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/i2c-3
lrwxrwxrwx 1 root root 0 Feb 2 09:28 i2c-4 -> ../../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/i2c-4
lrwxrwxrwx 1 root root 0 Feb 2 09:28 i2c-5 -> ../../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/i2c-5
lrwxrwxrwx 1 root root 0 Feb 2 09:28 i2c-6 -> ../../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/i2c-6
lrwxrwxrwx 1 root root 0 Feb 2 09:28 i2c-7 -> ../../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/i2c-7
[flag at luxor ~]$ i2cdetect -l
[flag at luxor ~]$ ls -la /dev/i2c*
ls: cannot access /dev/i2c*: No such file or directory
[flag at luxor ~]$

[flag at luxor ~]$ sudo modprobe i2c-dev
[flag at luxor ~]$ ls -la /dev/i2c*
crw-rw---- 1 root i2c 89, 0 Feb 2 09:33 /dev/i2c-0
crw-rw---- 1 root i2c 89, 1 Feb 2 09:33 /dev/i2c-1
crw-rw---- 1 root i2c 89, 2 Feb 2 09:33 /dev/i2c-2
crw-rw---- 1 root i2c 89, 3 Feb 2 09:33 /dev/i2c-3
crw-rw---- 1 root i2c 89, 4 Feb 2 09:33 /dev/i2c-4
crw-rw---- 1 root i2c 89, 5 Feb 2 09:33 /dev/i2c-5
crw-rw---- 1 root i2c 89, 6 Feb 2 09:33 /dev/i2c-6
crw-rw---- 1 root i2c 89, 7 Feb 2 09:33 /dev/i2c-7
[flag at luxor ~]$ i2cdetect -l
i2c-0 unknown Radeon i2c bit bus 0x90 N/A
i2c-1 unknown Radeon i2c bit bus 0x91 N/A
i2c-2 unknown Radeon i2c bit bus 0x92 N/A
i2c-3 unknown Radeon i2c bit bus 0x93 N/A
i2c-4 unknown Radeon i2c bit bus 0x94 N/A
i2c-5 unknown Radeon i2c bit bus 0x95 N/A
i2c-6 unknown Radeon i2c bit bus 0x96 N/A
i2c-7 unknown Radeon i2c bit bus 0x97 N/A
[flag at luxor ~]$

Since the module is not automatically loaded, and there's no clue to load it if
i2c devices fail to work (and people reported it as a bug), i propose to
build it statically (it adds ~8k to the uncompressed kernel image).

Proposing for TUV/[master-next|unstable]. 

FTBFS warning: since none of the releases are open, i didn't include the necessary
modification to the .modules files.

Paolo Pisati (1):
  UBUNTU: [Config] I2C_CHARDEV=y

 debian.master/config/config.common.ubuntu | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.9.1





More information about the kernel-team mailing list