linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Vaittinen, Matti" <Matti.Vaittinen@fi.rohmeurope.com>
To: "robh@kernel.org" <robh@kernel.org>
Cc: "mazziesaccount@gmail.com" <mazziesaccount@gmail.com>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"Mutanen, Mikko" <Mikko.Mutanen@fi.rohmeurope.com>,
	"sre@kernel.org" <sre@kernel.org>,
	"Laine, Markus" <Markus.Laine@fi.rohmeurope.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [RFC PATCH v2 1/5] dt-bindings: battry: add new battery parameters
Date: Thu, 20 Feb 2020 06:39:46 +0000	[thread overview]
Message-ID: <58877fefa9e4792779284575e9f0aa561d646c2e.camel@fi.rohmeurope.com> (raw)
In-Reply-To: <20200219195719.GA3096@bogus>

Hello Rob,

On Wed, 2020-02-19 at 13:57 -0600, Rob Herring wrote:
> On Fri, Feb 14, 2020 at 09:30:05AM +0200, Matti Vaittinen wrote:
> > Add:
> > 
> >  - tricklecharge-current-microamp:
> > 
> > Some chargers have 3 charging stages. First one when battery is
> > almost
> > empty is often called as trickle-charge. Last state when battery
> > has been
> > "woken up" is usually called as fast-charge. In addition to this
> > some
> > chargers have a 'middle state' which ROHM BD99954 data-sheet
> > describes as
> > pre-charge. Some batteries can benefit from this 3-phase charging
> > [citation needed].
> 
> For car batteries at least, trickle charge is to keep battery full.
> But 
> maybe in that context, it would be 'charge-term-current-microamp'.
> 
> I'm just concerned that we end up with multiple properties that mean
> the 
> same thing. I think you're okay here.

While I was doing this I took a quick look in few other binding docs
under power/supply. Unfortunately my knowledge about batteries and
chargers is really limited - but I had a feeling that we already now
have bunch of vendor specific properties for same things. So I actually
hope that adding generic ones will decrease the birth rate of vendor
specific ones ;)

> > Introduce tricklecharge-current-microamp so that batteries can give
> > charging current limit for all three states.
> > 
> >  - precharge-upper-limit-microvolt:
> > 
> > When battery voltage has reached certain limit we change from
> > trickle-charge to next charging state (pre-charge for BD99954).
> > Allow
> > battery to specify this limit.
> > 
> >  - re-charge-voltage-microvolt:
> > 
> > Allow giving a battery specific voltage limit for chargers which
> > can
> > automatically re-start charging when battery has discharghed down
> > to
> > this limit.
> > 
> > - over-voltage-threshold-microvolt
> > 
> > Allow specifying voltage threshold after which the battery is
> > assumed to
> > be faulty.
> > 
> > Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
> > ---
> >  Documentation/devicetree/bindings/power/supply/battery.txt | 6
> > ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git
> > a/Documentation/devicetree/bindings/power/supply/battery.txt
> > b/Documentation/devicetree/bindings/power/supply/battery.txt
> > index 5c913d4cf36c..7da044273e08 100644
> > --- a/Documentation/devicetree/bindings/power/supply/battery.txt
> > +++ b/Documentation/devicetree/bindings/power/supply/battery.txt
> > @@ -11,15 +11,21 @@ different type. This prevents unpredictable,
> > potentially harmful,
> >  behavior should a replacement that changes the battery type occur
> >  without a corresponding update to the dtb.
> >  
> > +Please note that not all charger drivers respect all of the
> > properties.
> > +
> >  Required Properties:
> >   - compatible: Must be "simple-battery"
> >  
> >  Optional Properties:
> > + - over-voltage-threshold-microvolt: battery over-voltage limit
> > + - re-charge-voltage-microvolt: limit to automatically start
> > charging again
> >   - voltage-min-design-microvolt: drained battery voltage
> >   - voltage-max-design-microvolt: fully charged battery voltage
> >   - energy-full-design-microwatt-hours: battery design energy
> >   - charge-full-design-microamp-hours: battery design capacity
> > + - tricklecharge-current-microamp: current for trickle-charge
> > phase
> 
> trickle-charge-...

Ok. I'll change this

> 
> >   - precharge-current-microamp: current for pre-charge phase
> > + - precharge-upper-limit-microvolt: limit when to change to
> > constant charging
> >   - charge-term-current-microamp: current for charge termination
> > phase
> >   - constant-charge-current-max-microamp: maximum constant input
> > current
> >   - constant-charge-voltage-max-microvolt: maximum constant input
> > voltage
> > -- 
> > 2.21.0
> > 
> > 
> > -- 
> > Matti Vaittinen, Linux device drivers
> > ROHM Semiconductors, Finland SWDC
> > Kiviharjunlenkki 1E
> > 90220 OULU
> > FINLAND
> > 
> > ~~~ "I don't think so," said Rene Descartes. Just then he vanished
> > ~~~
> > Simon says - in Latin please.
> > ~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~
> > Thanks to Simon Glass for the translation =] 


  reply	other threads:[~2020-02-20  6:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-14  7:29 [RFC PATCH v2 0/5] Support ROHM BD99954 charger IC Matti Vaittinen
2020-02-14  7:30 ` [RFC PATCH v2 1/5] dt-bindings: battry: add new battery parameters Matti Vaittinen
2020-02-19 19:57   ` Rob Herring
2020-02-20  6:39     ` Vaittinen, Matti [this message]
2020-02-14  7:36 ` [RFC PATCH v2 2/5] dt_bindings: ROHM BD99954 Charger Matti Vaittinen
2020-02-18 20:21   ` Rob Herring
2020-02-19  8:05     ` Vaittinen, Matti
2020-02-20 20:18       ` Rob Herring
2020-02-21  8:52         ` Vaittinen, Matti
2020-02-14  7:37 ` [RFC PATCH v2 3/5] power: Add linear_range helper Matti Vaittinen
2020-02-21 13:49   ` Linus Walleij
2020-02-22  8:33     ` Vaittinen, Matti
2020-02-14  7:38 ` [RFC PATCH v2 4/5] power: supply: add battery parameters Matti Vaittinen
2020-02-21 13:50   ` Linus Walleij
2020-02-14  7:39 ` [RFC PATCH v2 5/5] power: supply: Support ROHM bd99954 charger Matti Vaittinen

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=58877fefa9e4792779284575e9f0aa561d646c2e.camel@fi.rohmeurope.com \
    --to=matti.vaittinen@fi.rohmeurope.com \
    --cc=Markus.Laine@fi.rohmeurope.com \
    --cc=Mikko.Mutanen@fi.rohmeurope.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mazziesaccount@gmail.com \
    --cc=robh@kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).