status of i2c in 2.5.70 kernel
Hello,
First: I'm not using your lm-sensor/i2c package, but I am using the i2c stuff from a stock 2.5.70 kernel.
The stock 2.5.70 kernel does not seem to support PROC_FS for i2c any more. It used to be in i2c-core.c, but now it has been removed.
Browsing your CVS, I saw that your package includes a i2c-proc.c
Has the new proc interface been offered for inclusion with future 2.5 kernels yet?
Also, there seems to be a duality: sysfs vs procfs. When I mount sysfs, I get a /sys/bus/i2c dir, which contains dirs only, and no files. However, I do have a working i2c adapter, as I can read /dev/i2c-0:
Opening device...
DoneI2C_FUNC_SMBUS_BYTE
i2c chip found at: 2d, val = 1
i2c chip found at: 50, val = 0
i2c chip found at: 69, val = 8
When running on my via686 system, with support for CONFIG_I2C_VIAPRO=yCONFIG_SENSORS_VIA686A=yCONFIG_I2C_SENSOR=yCONFIG_I2C_CHARDEV=y
Shouldn't I get some entries in /sys/bus/i2c, or do I have to wait for a better i2c support in future 2.5 kernels?
Thanks,
Bram Stolk
Quoted 2 lines · Bram Stolk
First: I'm not using your lm-sensor/i2c package, but I am using the i2c stuff from a stock 2.5.70 kernel.
Good, glad to hear it.
Quoted 3 lines
The stock 2.5.70 kernel does not seem to support
PROC_FSfor i2c any more. It used to be ini2c-core.c, but now it has been removed.
That is because the /sys interface is now how to talk to i2c devices, not /proc.
Quoted 2 lines
Browsing your CVS, I saw that your package includes a
i2c-proc.c
Out of date, do not use.
Quoted 2 lines
Has the new proc interface been offered for inclusion with future 2.5 kernels yet?
Heh, you mean the "old" interface :)
No, it is not in 2.5, and will not be.
Quoted 16 lines
Also, there seems to be a duality: sysfs vs procfs. When I mount sysfs, I get a
/sys/bus/i2cdir, which contains dirs only, and no files. However, I do have a working i2c adapter, as I can read/dev/i2c-0:
Opening device...
DoneI2C_FUNC_SMBUS_BYTE
i2c chip found at: 2d, val = 1
i2c chip found at: 50, val = 0
i2c chip found at: 69, val = 8
When running on my via686 system, with support forCONFIG_I2C_VIAPRO=yCONFIG_SENSORS_VIA686A=yCONFIG_I2C_SENSOR=yCONFIG_I2C_CHARDEV=y
Quoted 2 lines
Shouldn't I get some entries in
/sys/bus/i2c, or do I have to wait for a better i2c support in future 2.5 kernels?
You do not have _any_ files in /sys/bus/i2c? i2c client devices show up here, and you might not really have a via686a client device. Are you sure you do? Does the 2.4 i2c drivers show up information for this device?
i2c-dev lets you talk to the i2c adapter, not a specific i2c device. Look at /sys/class/i2c-dev/ to see what i2c adapter you are actually talking to through /dev/i2c0. Also look at /sys/class/i2c-adapter for all of the i2c adapters in the system.
Hope this helps,
greg k-h
Quoted 10 lines · Bram Stolk
Greg,
Thanks for the info!
There is indeed info in the
/sys/classdirectory.amoras:/sys/bus/i2c# cat /sys/class/i2c-adapter/i2c-0/device/name SMBus Via Pro adapter at 5000
Quoted 7 lines
Yet, the
/sys/bus/i2cdir contains no files, dirs only:amoras:/sys/bus/i2c# find /sys/bus/i2c -type f -print amoras:/sys/bus/i2c#When I open i2c-0, and try reading from all addresses, I can see that there are 3 slaves on the bus that respond to read-requests.
Then you need to figure out which chip drivers corrispond to those slaves. The majority of the chip drivers have not been ported from the sensor's cvs tree to the 2.5 kernel due to people not having the hardware. If you could help out in this, it would be greatly appreciated.
thanks,
greg k-h