From: "Paweł Chmiel" <pawel.mikolaj.chmiel@gmail.com>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Sebastian Reichel <sre@kernel.org>,
lgirdwood@gmail.com, broonie@kernel.org, lee.jones@linaro.org,
robh+dt@kernel.org, mark.rutland@arm.com,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH 4/4] dt-bindings: mfd: max8998: Add charger subnode binding
Date: Thu, 10 Jan 2019 21:11:35 +0100 [thread overview]
Message-ID: <7002692.meb5AFBGDJ@acerlaptop> (raw)
In-Reply-To: <5765349a-c94d-49c1-45b5-ab7ac09f9923@samsung.com>
Hi
On Thursday, 10 January 2019 18:47:11 CET Sylwester Nawrocki wrote:
> Hi,
>
> On 5/1/18 16:43, Paweł Chmiel wrote:
> > On Tuesday, May 1, 2018 2:45:40 PM CEST Sebastian Reichel wrote:
> >> On Fri, Apr 27, 2018 at 06:03:02PM +0200, Paweł Chmiel wrote:
> >>> This patch adds devicetree bindings documentation for
> >>> battery charging controller as the subnode of MAX8998 PMIC.
> >>> It's based on current behavior of driver.
> >>>
> >>> Fixes: ee999fb3f17f ("mfd: max8998: Add support for Device Tree")
> >>> Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
> >>> ---
> >>> Documentation/devicetree/bindings/mfd/max8998.txt | 22 ++++++++++++++++++++++
> >>> 1 file changed, 22 insertions(+)
>
> >>> --- a/Documentation/devicetree/bindings/mfd/max8998.txt
> >>> +++ b/Documentation/devicetree/bindings/mfd/max8998.txt
> >>> @@ -50,6 +50,21 @@ Additional properties required if max8998,pmic-buck2-dvs-gpio is defined:
> >>> - max8998,pmic-buck2-dvs-voltage: An array of 2 voltage values in microvolts
> >>> for buck2 regulator that can be selected using dvs gpio.
> >>>
> >>> +Charger: Configuration for battery charging controller should be added
> >>> +inside a child node named 'charger'.
> >>> + Required properties:
> >>> + - max8998,charge-eoc: Setup "End of Charge". If value equals 0,
> >>> + remain value set from bootloader or default value will be used.
> >>> + Valid values: 0, 10 - 45
> >>> +
> >>> + - max8998,charge-restart: Setup "Charge Restart Level". If value equals 0,
> >>> + remain value set from bootloader or default value will be used.
> >>> + Valid values: -1, 0, 100, 150, 200
>
> Perhaps change the property name to max8998,charge-restart-threshold,
> in include/linux/mfd/max8998.h we have:
>
> * @restart: Restart Level in mV: 100, 150, 200, and -1 for disable.
> * If it equals 0, leave it unchanged.
>
> Then we could make it an optional property:
>
> - max8998,charge-restart-threshold: Charge restart threshold in millivolts.
> Valid values are: 0, 100, 150, 200. If the value equals 0 the charger
> restart will be disabled.
>
> If the property is missing the charger restart threshold configuration would
> be left unchanged.
>
Strange, i've looked at max8998 and didn't saw information that those values are in mV (maybe it was from vendor sources).
> >>> + - max8998,charge-timeout: Setup "Charge Full Timeout". If value equals 0,
> >>> + remain value set from bootloader or default value will be used.
> >>> + Valid values: -1, 0, 5, 6, 7
> >>
> >> What are those values? seconds?
> >>
> > Honestly i don't know. I've just documented values accepted currently
> > by charger driver, so we can use it from devicetree.
> > I couldn't find any max8998 datasheet with this information (units, possible
> > values etc for those properties).
>
> The charge timeout is in hours, as described in include/linux/mfd/max8998.h:
>
>
> "* @timeout: Full Timeout in hours: 5, 6, 7, and -1 for disable.
> * If it equals 0, leave it unchanged.
> * Otherwise, leave it unchanged."
>
> We could change description of the property to something along the lines of:
>
> Optional properties:
>
> - max8998,charge-timeout: Charge timeout in hours. Valid values are:
> 0, 5, 6, 7. If the value is 0 the charge timer will be disabled.
>
> Then if the property is missing the driver will leave charge timer configuration
> unchanged.
>
>
Thanks Sylwester Nawrocki for all those hints (mostly regarding units of those magic numbers/values). I'll prepare new version of those patches with all hints included.
prev parent reply other threads:[~2019-01-10 20:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-27 16:02 [PATCH 0/4] mfd: max8998: Device Tree support fixes Paweł Chmiel
2018-04-27 16:02 ` [PATCH 1/4] regulator: max8998: Fix platform data retrieval Paweł Chmiel
2018-04-27 16:03 ` [PATCH 2/4] power: supply: max8998-charger: " Paweł Chmiel
2018-04-27 16:03 ` [PATCH 3/4] power: supply: max8998-charger: Parse device tree for required data Paweł Chmiel
2018-04-27 16:03 ` [PATCH 4/4] dt-bindings: mfd: max8998: Add charger subnode binding Paweł Chmiel
2018-04-30 12:30 ` Lee Jones
2018-04-30 14:59 ` Paweł Chmiel
2018-05-01 12:45 ` Sebastian Reichel
2018-05-01 14:43 ` Paweł Chmiel
2019-01-10 17:47 ` Sylwester Nawrocki
2019-01-10 20:11 ` Paweł Chmiel [this message]
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=7002692.meb5AFBGDJ@acerlaptop \
--to=pawel.mikolaj.chmiel@gmail.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=s.nawrocki@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.