[i2c] I2C functionality bits
Mark M. Hoffman
mhoffman at lightlink.com
Fri Nov 3 02:38:32 CET 2006
Hi Till:
> On Thursday 02 November 2006 09:04, Jean Delvare wrote:
> > If you are doing bit-banging, please don't reimplement it, just use
> > i2c-algo-bit in your driver. It'll even export the right
> > functionalities for you (check drivers/i2c/algos/i2c-algo-bit.c to find
> > out which; it does indeed include I2C_FUNC_SMBUS_EMUL)
* Till Harbaum (Lists) <lists at harbaum.org> [2006-11-02 19:43:31 +0100]:
> The bitbanging is done inside the device. Linux doesn't see that at all and
> you can easily build a device that uses the avrs hardware i2c. From the
> linux point of view they are just the same.
Jean: as I understand it, Till is shipping whole I2C transfers over USB to some
microcontroller... the firmware for that micro handles the actual bit banging.
Till: if you already specify I2C_FUNC_I2C, then just go ahead and add
I2C_FUNC_SMBUS_EMUL. The latter is a strict subset of the former and the I2C
core will just take care of it. Then sensors-detect (and many more chip
drivers) will work as you expect. For an example of an existing bus driver
that does this, see drivers/i2c/busses/i2c-ibm_iic.c.
When do we get to see some code? ;)
Regards,
--
Mark M. Hoffman
mhoffman at lightlink.com
More information about the i2c
mailing list