probe order for 2.6 sensor chips
Hi all,
Someone just filed an interesting 2.6 bug:
http://bugme.osdl.org/show_bug.cgi?id66
It pertains to the order of the i2c sensor drivers being loaded. Is there some documentation somewhere that details which drivers need to be placed before the others? Right now I'm just using the alphabetical order for link priority, but this is probably wrong as this report has determined :)
Any thoughts as to the correct order?
thanks,
greg k-h
Quoted 7 lines · Jean Delvare
Quoted 1 line
Any thoughts as to the correct order?
First note: some drivers cannot possibly be detected, so building them into the kernel will result in a mess. The mess will be full if these drivers are loaded before the others (preventing the regular driver to handle the chip), and limited if these drivers are loaded after the others (exporting bad values).
Yeah, I'm not saying it's a good idea, just something that some users like to do :)
Quoted 5 lines
Second note: proper operation of our modules sometimes require module parameters. Since all our drivers have common parameter names, having them all in the kernel will not allow for passing such a parameter to only one of them. So our drivers are really meant to be compiled as modules, not to be built into the kernel.
Module paramaters are able to be converted into simple boot arguments with only 1 small change to the kernel module code. I'm going to do that after I add kobject support for modules (should be a few weeks.)
So we need to be able to support building these drivers into the kernel for as much as we possibly can.
Quoted 5 lines
Grep'ing doc/chips tells that there is only one driver having multiple
addresses: w83781d. However I know that ddcmon has a similar mechanism, so there are at least two. So a preliminary list of "high priority" modules follows:
Quoted 8 lines
w83781d
ddcmonAnd a list of "low priority" modules now (undetectable ones):
ltc1710
pcf8574
pcf8591
Ok, as we only have one of the above drivers in the 2.6 tree, I'll go move the w83781d driver to the top of the list for now. That should solve this single bug report, and help others out in the future.
Quoted 3 lines
Additionally, there's smbus-arp, but I'm not too sure about this one, and it shouldn't intefere with other drivers anyway, so you can leave it apart.
I have a port of smbus-arp to 2.6 in my local kernel tree, I just need to clean it up to get it into shape to add to the main kernel.org tree one of these days...
thanks for the info.
greg k-h
Quoted 8 lines · Jean Delvare
Quoted 4 lines
I have a port of smbus-arp to 2.6 in my local kernel tree, I just need to clean it up to get it into shape to add to the main kernel.org tree one of these days...
BTW what does this driver do? If I understand it correctly, it is meant to replace our blind bus scanning by proper querying of an ARP chip? Or am I just lost again?
I do not really know either. I tried to see what it was doing and couldn't easily determine it. I have a laptop here that suposidly needs it to get some other i2c driver to work, but I've never gotten it to work properly yet on 2.6...
greg k-h
Quoted 7 lines
Someone just filed an interesting 2.6 bug:
http://bugme.osdl.org/show_bug.cgi?id66It pertains to the order of the i2c sensor drivers being loaded. Is there some documentation somewhere that details which drivers need to be placed before the others?
No such document exist yet AFAIK.
Quoted 4 lines
Right now I'm just using the alphabetical order for link priority, but this is probably wrong as this report has determined :)
Any thoughts as to the correct order?
First note: some drivers cannot possibly be detected, so building them into the kernel will result in a mess. The mess will be full if these drivers are loaded before the others (preventing the regular driver to handle the chip), and limited if these drivers are loaded after the others (exporting bad values).
Second note: proper operation of our modules sometimes require module parameters. Since all our drivers have common parameter names, having them all in the kernel will not allow for passing such a parameter to only one of them. So our drivers are really meant to be compiled as modules, not to be built into the kernel.
The problem here is a bit different. Some chips have multiple addresses. Generally, the extra addresses emulate other chips. So one can use the other driver for these address, or use the first driver to handle all addresses (generally what you want to do). So loading the multiple addresses chips should be done first, so that the other drivers can't pretend to handle the chip.
Grep'ing doc/chips tells that there is only one driver having multiple
addresses: w83781d. However I know that ddcmon has a similar mechanism, so there are at least two. So a preliminary list of "high priority" modules follows:
w83781d
ddcmon
And a list of "low priority" modules now (undetectable ones):
ltc1710
pcf8574
pcf8591
Additionally, there's smbus-arp, but I'm not too sure about this one, and it shouldn't intefere with other drivers anyway, so you can leave it apart.
Signature · 2 lines
Jean Delvare http://www.ensicaen.ismra.fr/~delvare/
Quoted 4 lines
I have a port of smbus-arp to 2.6 in my local kernel tree, I just need to clean it up to get it into shape to add to the main kernel.org tree one of these days...
BTW what does this driver do? If I understand it correctly, it is meant to replace our blind bus scanning by proper querying of an ARP chip? Or am I just lost again?
Signature · 2 lines
Jean Delvare http://www.ensicaen.ismra.fr/~delvare/
This is a demonstration/debugging driver I wrote to test SMBus 2.0 support.
Until we support Host Notify (host-as-slave mode), we can't really support hotplugged I2C devices well.
I don't recommend submitting it to 2.6 unless somebody asks for it.
http://www2.lm-sensors.nu/~lm78/cvs/browse.cgi/lm_sensors2/doc/chips/smbus-arp
Quoted 18 lines · Greg KH
Quoted 7 lines · Jean Delvare
Quoted 3 lines
I have a port of smbus-arp to 2.6 in my local kernel tree, I just need to clean it up to get it into shape to add to the main kernel.org tree one of these days...
BTW what does this driver do? If I understand it correctly, it is meant to replace our blind bus scanning by proper querying of an ARP chip? Or am I just lost again?
I do not really know either. I tried to see what it was doing and couldn't easily determine it. I have a laptop here that suposidly needs it to get some other i2c driver to work, but I've never gotten it to work properly yet on 2.6...
greg k-h