Question about algorithms
Hi all,
Could someone please explain to me what i2c-algo-* are for? I understand what bus drivers and chip drivers are and work together, but I can't figure out how and where the algo files do work with the first two.
Also, what are the i2c-adap-* files for?
Thanks.
Signature · 2 lines
Jean Delvare http://www.ensicaen.ismra.fr/~delvare/
Quoted 4 lines
If our explanation on this page wasn't clear feel free to enhance :)
It was clear indeed, if only I had read it before bugging you... Sorry for that.
Signature · 2 lines
Jean Delvare http://www.ensicaen.ismra.fr/~delvare/
Usually a "bus" driver is a combined "algorithm" and "adapter" driver.
Where it makes sense to share the low-level "algoritm" part across multiple "adapter" drivers these can be separated.
All "bit-banger" drivers use a common algorithm layer i2c-algo-bit, which exports functions to directly manipulate the clock and data lines and get the timing right. The adapter drivers in these cases are responsible for finding the chip and the correct register locations.
Some of the other drivers in i2c are separated into algo and adap. Some also share the algorithm driver, others I think don't really, perhaps they were separated because of intent to share the algorithm driver and others were just written that way.
If our explanation on this page wasn't clear feel free to enhance :)
http://www2.lm-sensors.nu/~lm78/docs.html
Quoted 10 lines · Jean Delvare
Hi all,
Could someone please explain to me what i2c-algo-* are for? I understand what bus drivers and chip drivers are and work together, but I can't figure out how and where the algo files do work with the first two.
Also, what are the i2c-adap-* files for?
Thanks.