linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* I2C driver for LTC1760 dual smart battery system manager
@ 2016-04-28 19:15 Karl-Heinz Schneider
  2016-05-06  7:27 ` Phil Reid
  0 siblings, 1 reply; 6+ messages in thread
From: Karl-Heinz Schneider @ 2016-04-28 19:15 UTC (permalink / raw)
  To: linux-i2c, linux-pm

Hello,

I have written an Kernel driver for the LTC1760 which is basically an
charger which can handle 2 batteries. Datasheet can be found at
http://www.linear.com/product/LTC1760

However, the device has one speciality: Hence it handles two smart
batteries, which are expected to sit on I2C address 0x0b, it implements
an i2c mux. As the device does so, my driver does also (using
i2c_add_mux_adapter() call).
Further more, Linux already ships with an driver capable to talk to
these smart battery chips, namely "sbs-battery".

I currently using device tree to bind the LTC1760 to the smbus it sits
on and further to define the i2c-lines it implements as well as the
batteries sitting on the two muxed lines.

Would you say this approach is technically right? The LTC expects SBS
compliant batteries connected to it, which implies a standard minimal
interface. But binding the batteries via device tree gives the user the
freedom to specify a more specialized driver.
On the other hand one could argue that if the LTC is present, also
batteries are (potentially) present and the LTC driver is responsible to
read the related registers and provide proper PM attributes. Personally
I don't like to rewrite or copy code wich works just fine...

Greetings
Karl-Heinz Schneider


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-05-09 19:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-28 19:15 I2C driver for LTC1760 dual smart battery system manager Karl-Heinz Schneider
2016-05-06  7:27 ` Phil Reid
2016-05-06 19:23   ` Karl-Heinz Schneider
2016-05-09  1:41     ` Phil Reid
2016-05-09  8:00       ` Peter Rosin
2016-05-09 19:30         ` Karl-Heinz Schneider

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).