linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karl-Heinz Schneider <karl-heinz@schneider-inet.de>
To: linux-i2c@vger.kernel.org, linux-pm@vger.kernel.org
Subject: I2C driver for LTC1760 dual smart battery system manager
Date: Thu, 28 Apr 2016 21:15:51 +0200	[thread overview]
Message-ID: <1461870951.6670.33.camel@amnesix> (raw)

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


             reply	other threads:[~2016-04-28 19:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-28 19:15 Karl-Heinz Schneider [this message]
2016-05-06  7:27 ` I2C driver for LTC1760 dual smart battery system manager 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461870951.6670.33.camel@amnesix \
    --to=karl-heinz@schneider-inet.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).