[i2c] "regd i2c-viapro bus driver"
khali at linux-fr.org
Fri Oct 6 14:17:22 CEST 2006
> I am trying to access the i2c bus/adapter using user
> mode /dev interface in linux box based on VIA chipset.
> I read the related documentation before starting my
> work. I am using linux kernel version 18.104.22.168. I
> configured the kernel with the options to include
> i2-core, i2c-dev, i2c-bus /adapter drivers and also
> few i2-c chips drivers. after loading this kernel i
> found entries in /sys/class/i2c-dev as i2c-0, i2c-1
> etc and also in the /dev folder.
> I wrote user mode application to open the device
> /dev/i2c-0 and it worked fine. When i selected
> i2c-viapro in the i2c bus driver as my chipset is via
> chip (earlier i used i2c-parpart and i2c_piix etc in
> the bus driver list)and build the kernel, i am not
> able to see any entries in the /sys/class/i2c-dev
> folder and also in /dev folder. Now my question is
> 1. How i could see the bus driver loaded for other
> i2c-bus driver options like i2c-parport etc and why
> not for i2c-viapro?
If you have enabled hotplug support, most drivers will load even if you
do not have the hardware, because the hardware could always be
hotplugged later. So what really matters is not that the driver loaded,
but whether or not it found a supported device. You can look
into /sys/devices to find out.
> 2.If i load the i2c-viapro dynamically using the
> command insmod i2c-viapro.ko, it loads fine but still
> i am not able to see the entry in /dev and /sys
> folder? Please suggest me if i am doing anything
Most probably you do not have hardware supported by this version of the
driver. You can compare the list of supported devices in the driver
source file with the output of lspci to make sure. What VIA south
bridge do you have exactly? i2c-viapro in 2.6.11 does not support the
latest VIA south bridges (VT8237A and VT8251) by default.
> I'am trying to see the working of i2c-dev, user mode
Don't forget to load i2c-dev then (or build it into the kernel itself.)
You can use the i2cdetect tool to check whether your I2C/SMBus master
is working properly:
$ i2cdetect -l
will list the available busses.
$ i2cdetect 0
will scan bus i2c-0 for chips.
More information about the i2c