From: Enric Balletbo Serra <eballetbo@gmail.com>
To: Liam Breck <liam@networkimprov.net>
Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com>,
Sebastian Reichel <sre@kernel.org>,
linux-pm@vger.kernel.org,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Liam Breck <kernel@networkimprov.net>
Subject: Re: [PATCH v3 1/4] dt-bindings: power: supply: add battery charge voltage/current
Date: Thu, 1 Jun 2017 10:18:54 +0200 [thread overview]
Message-ID: <CAFqH_536VDcx--dJga_+ffut9QmHLySk_gzZbXuCv8TBz++OzA@mail.gmail.com> (raw)
In-Reply-To: <CAKvHMgQWT-V=vt6bkR7QoCRM8W0MeyfY0hjNL-q0FmfPfNhtfA@mail.gmail.com>
Hi Liam,
2017-06-01 9:01 GMT+02:00 Liam Breck <liam@networkimprov.net>:
> Hi Enric,
>
> On Sat, May 27, 2017 at 1:11 PM, Enric Balletbo Serra
> <eballetbo@gmail.com> wrote:
>> Hi Liam,
>>
>> 2017-05-26 23:20 GMT+02:00 Liam Breck <liam@networkimprov.net>:
>>> Hi Enric,
>>>
>>> On Fri, May 26, 2017 at 4:04 AM, Enric Balletbo i Serra
>>> <enric.balletbo@collabora.com> wrote:
>>>> Add charging voltage and current characteristics to the battery DT for
>>>> proper handling of the battery by fuel-gauge and charger chips.
>>>>
>>>> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
>>>> ---
>>>> Changes since v2:
>>>> - Requested by Sebastian Reichel
>>>> - Move to its own patch and apply to simple-battery framework.
>>>> Changes since v1:
>>>> - Requested by Rob Herring
>>>> - Rename ti,charge-* to charge-* to be standard properties.
>>>> - Use unit suffixes as per bindings/property-units.txt
>>>>
>>>> Documentation/devicetree/bindings/power/supply/battery.txt | 4 ++++
>>>> 1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/power/supply/battery.txt b/Documentation/devicetree/bindings/power/supply/battery.txt
>>>> index 63a7028..c87a439 100644
>>>> --- a/Documentation/devicetree/bindings/power/supply/battery.txt
>>>> +++ b/Documentation/devicetree/bindings/power/supply/battery.txt
>>>> @@ -12,6 +12,8 @@ Optional Properties:
>>>> - voltage-min-design-microvolt: drained battery voltage
>>>> - energy-full-design-microwatt-hours: battery design energy
>>>> - charge-full-design-microamp-hours: battery design capacity
>>>> + - charge-voltage-microvolt: battery charging voltage
>>>> + - charge-current-microamp: battery charging current
>>>
>>> I think you mean constant-charge-* which is how you surface these
>>> properties in your tps65217_charger patch.
>>>
>>
>> Yes, to be strict this is constant-charge-*
>
> The DT battery node should carry static battery characteristics. So on
> reflection, I think you want
>
> constant-charge-current-max-microamp
> constant-charge-voltage-max-microvolt
>
> The charger or the user could then safely apply any value <= those.
>
> Thoughts?
>
Hmm I see your point and I'm thinking now that actually this is not
what I wanted to do. What I wanted is set the charger voltage and the
current hence my first patchset was setting these properties in the
charger node not the battery.
Said that, I think that you have reason and what we want in battery
node is the current/voltage max values but we also need to implement a
mechanism to set the charging voltage/current from userspace or from
the DT for the charger. The charger should be able to set these values
and fail if, based in the battery specs, is not supported.
More thoughts?
>>> I'll add these to v14 of my patchset which adds simple-battery
>>> support. Rob requested a single patch for this file.
>>>
>>
>> Ok, I'll send the tps charger series without this patch, so please,
>> include this patch in your series.
>>
>>> I've been waiting for feedback on v13.2 from Sebastian. If I don't
>>> hear from him within a few days, I'll post v14.
>>>
>>>> Batteries must be referenced by chargers and/or fuel-gauges
>>>> using a phandle. The phandle's property should be named
>>>> @@ -24,6 +26,8 @@ Example:
>>>> voltage-min-design-microvolt = <3200000>;
>>>> energy-full-design-microwatt-hours = <5290000>;
>>>> charge-full-design-microamp-hours = <1430000>;
>>>> + charge-voltage-microvolt = <4100000>;
>>>> + charge-current-microamp = <300000>;
>>>> };
>>>>
>>>> charger: charger@11 {
>>>> --
>>>> 2.9.3
>>>>
next prev parent reply other threads:[~2017-06-01 8:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-26 11:04 [PATCH v3 1/4] dt-bindings: power: supply: add battery charge voltage/current Enric Balletbo i Serra
2017-05-26 11:04 ` [PATCH v3 3/4] dt-bindings: power: tps65217_charger: add NTC type for battery temperature measurement Enric Balletbo i Serra
[not found] ` <20170526110413.24836-3-enric.balletbo-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2017-05-26 21:26 ` Liam Breck
[not found] ` <CAKvHMgTf7Tz2hTo0-QrO_KjqoQrJtGephEz9Wuo-Ty=W7szCBw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-27 20:14 ` Enric Balletbo Serra
2017-05-26 11:04 ` [PATCH v3 4/4] power: tps65217_charger: add support for NTC type, voltage and current charge Enric Balletbo i Serra
[not found] ` <20170526110413.24836-4-enric.balletbo-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2017-05-26 22:31 ` Liam Breck
2017-06-08 16:11 ` Sebastian Reichel
[not found] ` <20170526110413.24836-1-enric.balletbo-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2017-05-26 11:04 ` [PATCH v3 2/4] power: supply: core: add charging voltage/current battery info Enric Balletbo i Serra
[not found] ` <20170526110413.24836-2-enric.balletbo-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2017-05-26 21:22 ` Liam Breck
[not found] ` <CAKvHMgSPneriwY+HDHVraB3cdWZYx__6LZrExPQJanYNs2aBSA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-27 20:12 ` Enric Balletbo Serra
2017-05-26 21:20 ` [PATCH v3 1/4] dt-bindings: power: supply: add battery charge voltage/current Liam Breck
[not found] ` <CAKvHMgTvUkJENP=Y_rdge6Oqq-La341nYW5prB=BpXWo7rF-0A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-27 20:11 ` Enric Balletbo Serra
2017-06-01 7:01 ` Liam Breck
2017-06-01 8:18 ` Enric Balletbo Serra [this message]
2017-06-01 10:25 ` Liam Breck
2017-06-01 10:32 ` Enric Balletbo Serra
2017-05-31 18:50 ` Rob Herring
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=CAFqH_536VDcx--dJga_+ffut9QmHLySk_gzZbXuCv8TBz++OzA@mail.gmail.com \
--to=eballetbo@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=enric.balletbo@collabora.com \
--cc=kernel@networkimprov.net \
--cc=liam@networkimprov.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.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).