Question about algorithms

Mark D. Studebaker mds at
Sat Aug 30 18:58:18 CEST 2003

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 :)

Jean Delvare wrote:
> 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.

More information about the lm-sensors mailing list