public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurentiu Palcu <laurentiu.palcu@intel.com>
To: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Andreas Dannenberg <dannenberg@ti.com>,
	Ramakrishna Pallala <ramakrishna.pallala@intel.com>,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	devicetree@vger.kernel.org, Sebastian Reichel <sre@kernel.org>,
	Jenny TC <jenny.tc@intel.com>
Subject: Re: [PATCH] power: bq24261_charger: Add support for TI BQ24261 charger
Date: Thu, 10 Sep 2015 17:50:26 +0300	[thread overview]
Message-ID: <20150910145026.GO21512@lpalcu-desk> (raw)
In-Reply-To: <55F0C586.3010003@samsung.com>

On Thu, Sep 10, 2015 at 08:49:26AM +0900, Krzysztof Kozlowski wrote:
> On 10.09.2015 02:31, Andreas Dannenberg wrote:
> > On Wed, Sep 09, 2015 at 01:17:11PM +0900, Krzysztof Kozlowski wrote:
> >> On 09.09.2015 11:26, Andreas Dannenberg wrote:
> >>> Krzysztof, good observation! In bq2425x_charger.c (formerly known as
> >>> bq24257_charger.c :) that I worked on the unit used was uA. At that time
> >>> I did a quick check and there didn't seem to be a clear standard whether
> >>> to use the "micro" or "milli" units - different drivers use different
> >>> units. However there seems to be a tendency for the TI drivers to prefer
> >>> "milli" (bq2415x_charger.c, bq24735-charger.c)
> >>>
> >>> Personally I think "milli" units are more appropriate for chargers since
> >>> they provide sufficient granularity and the numbers don't become too big
> >>> (try typing a voltage in the Volt-range in uV, it's very easy to get the
> >>> number of 0s wrong). However since the driver was already there I left
> >>> that aspect alone to preserve compatibility.
> >>
> >> I am fine with both units but milli indeed seems easier to judge by fast
> >> looking and less error-prone. Whatever you choose - choose the same one. :)
> > 
> > Ok sounds good. If so, I could go ahead and change the units in the
> > bq2425x_charger.c over to mA and mV?
> 
> Wait, these are existing bindings (for bq24257). You cannot change
> existing binding.
> 
> Best regards,
> Krzysztof
> 
> > It would be a bit labor some and I
> > also want to see what Laurentiu thinks but this way we could have most
> > of those TI charger drivers use the same units (the new bq24261 driver
> > Ram posted also uses mA/mV). Except bq25890_charger.c.... that would
> > still use uA/uV....
> > 
> > Laurentiu -- what made you chose the "micro" units for bq24257_charger.c
> > and bq25890_charger.c?
When I started writing the BQ24257 driver, I had a look on what existed
already. Somehow, I don't know why, I settled on bq24190_charger which
has all the units in uA/uV. I thought it's the de-facto standard for
charger drivers... :/

For bindings, I looked at the existing TI chips bindings and chose the
same binding names, where possible. But for some dumb reason, I missed
that the units already used where mainly in mA/mV and, honestly, I
didn't even suspect units must be consistent from device to device. What
happens if a chip needs a more fine grained setting? I agree on binding
name consistency though: ti,charge-current (for example) should mean the
same for all TI chargers.

That said, is not much we can do on the mA/uA or mV/uV front... At least
we can agree on using the same binding names.

laurentiu

  reply	other threads:[~2015-09-10 14:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-06 17:23 [PATCH] power: bq24261_charger: Add support for TI BQ24261 charger Ramakrishna Pallala
2015-09-07  3:57 ` Krzysztof Kozlowski
2015-09-09  2:26   ` Andreas Dannenberg
2015-09-09  4:17     ` Krzysztof Kozlowski
2015-09-09 17:31       ` Andreas Dannenberg
2015-09-09 23:49         ` Krzysztof Kozlowski
2015-09-10 14:50           ` Laurentiu Palcu [this message]
2015-09-09 18:11   ` Pallala, Ramakrishna
2015-09-09 23:47     ` Krzysztof Kozlowski
2015-09-10 16:42       ` Andrew F. Davis
2015-09-11  0:58         ` Krzysztof Kozlowski
2015-09-22 15:37           ` Sebastian Reichel
2015-09-22 15:43             ` Pallala, Ramakrishna
     [not found] ` <1441560187-23611-1-git-send-email-ramakrishna.pallala-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-09-09  3:01   ` Fabio Estevam
2015-09-09 22:27 ` Andreas Dannenberg
2015-10-19 17:34   ` Pallala, Ramakrishna
  -- strict thread matches above, loose matches on Subject: below --
2015-09-09 22:47 Alexey Klimov

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=20150910145026.GO21512@lpalcu-desk \
    --to=laurentiu.palcu@intel.com \
    --cc=dannenberg@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jenny.tc@intel.com \
    --cc=k.kozlowski@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=ramakrishna.pallala@intel.com \
    --cc=sre@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