On Tue, 19 Feb 2008 15:10:49 +0100, Rodolfo Giometti wrote: > On Tue, Feb 19, 2008 at 02:21:33PM +0100, Jean Delvare wrote: > > > > Guennadi's solution (based on David Brownell's work) is actually pretty > > generic as far as GPIOs are concerned. I like it. > > If I well understand it I should use i2c_new_dummy() to simply create > an handler for the alternate address. > > > > > > > > > > +---------+ > > > --+---+ Battery | > > > | | Manager | > > > | +---------+ > > > Bus I2C ->> | > > > | > > > | > > > | +---------+ > > > +---+ | > > > | CHIP | > > > +---------+ > > > > > > A (complex) battery pack are managed by a "battery manager" and a > > > custom chip connected by the I2C bus (my hardware designer _loves_ I2C > > > bus :). Even these devices can be logically considered as only one > > > (big) battery... > > > > > In this situation into the driver of the «main» device (the battery > manager) I can use i2c_new_dummy() to get an handler to manage the > other I2C chip. Is that right?
Yep, that's exactly the idea. > It looks *really* good. :) Credit go to David Brownell. -- Jean Delvare _______________________________________________ i2c mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/i2c
