From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Rhyland Klein <rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: Anton Vorontsov <anton-9xeibp6oKSgdnm+yROfE0A@public.gmane.org>,
David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
Manish Badarkhe
<badarkhe.manish-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Darbha Sriharsha
<dsriharsha-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [Patch V2] drivers: power: Add support for bq24735 charger
Date: Mon, 23 Sep 2013 15:53:33 -0600 [thread overview]
Message-ID: <5240B85D.3050803@wwwdotorg.org> (raw)
In-Reply-To: <1379607514-11200-1-git-send-email-rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
On 09/19/2013 10:18 AM, Rhyland Klein wrote:
> Adding driver support for bq24735 charger chipset.
> diff --git a/Documentation/devicetree/bindings/power_supply/ti,bq24735.txt b/Documentation/devicetree/bindings/power_supply/ti,bq24735.txt
> +Optional properties :
> + - ti,ac-detect: This gpio is optionally used to read the ac adapter
> + presence.
GPIO property names ought to end in "-gpios", i.e. "ti,ac-detect-gpios".
> + - ti,charge-current : Used to control and set the charging current. This value
> + must follow the below guidelines:
> + bit 0 - 5: Not used
> + bit 6: 1 = Adds 64mA of charger current
> + bit 7: 1 = Adds 128mA of charger current
> + bit 8: 1 = Adds 256mA of charger current
> + bit 9: 1 = Adds 512mA of charger current
> + bit 10: 1 = Adds 1024mA of charger current
> + bit 11: 1 = Adds 2048mA of charger current
> + bit 12: 1 = Adds 4096mA of charger current
> + bit 13 - 15: Not used
That's a little odd. Why not just put the number of mA directly into the
property unshifted?
> + Setting the value to < 128mA or > 8.128A terminates charging.
"terminates charging" is a driver action, not a description of HW. It's
fine to say that what min/max value should be specified in the property
for it to be valid, but not what action SW should take in response to that.
Those same two comments apply to other properties too.
> + - ti,input-current: Used to control and set the charger input current. This
> + value must follow the below guidelines:
What if this value is inconsistent with the charger's power consumption
derived from the other two properties? Is it really necessary to include
this property in the DT and hence create the potential for mismatch?
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Warren <swarren@wwwdotorg.org>
To: Rhyland Klein <rklein@nvidia.com>
Cc: Anton Vorontsov <anton@enomsg.org>,
David Woodhouse <dwmw2@infradead.org>,
Manish Badarkhe <badarkhe.manish@gmail.com>,
Darbha Sriharsha <dsriharsha@nvidia.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-tegra@vger.kernel.org
Subject: Re: [Patch V2] drivers: power: Add support for bq24735 charger
Date: Mon, 23 Sep 2013 15:53:33 -0600 [thread overview]
Message-ID: <5240B85D.3050803@wwwdotorg.org> (raw)
In-Reply-To: <1379607514-11200-1-git-send-email-rklein@nvidia.com>
On 09/19/2013 10:18 AM, Rhyland Klein wrote:
> Adding driver support for bq24735 charger chipset.
> diff --git a/Documentation/devicetree/bindings/power_supply/ti,bq24735.txt b/Documentation/devicetree/bindings/power_supply/ti,bq24735.txt
> +Optional properties :
> + - ti,ac-detect: This gpio is optionally used to read the ac adapter
> + presence.
GPIO property names ought to end in "-gpios", i.e. "ti,ac-detect-gpios".
> + - ti,charge-current : Used to control and set the charging current. This value
> + must follow the below guidelines:
> + bit 0 - 5: Not used
> + bit 6: 1 = Adds 64mA of charger current
> + bit 7: 1 = Adds 128mA of charger current
> + bit 8: 1 = Adds 256mA of charger current
> + bit 9: 1 = Adds 512mA of charger current
> + bit 10: 1 = Adds 1024mA of charger current
> + bit 11: 1 = Adds 2048mA of charger current
> + bit 12: 1 = Adds 4096mA of charger current
> + bit 13 - 15: Not used
That's a little odd. Why not just put the number of mA directly into the
property unshifted?
> + Setting the value to < 128mA or > 8.128A terminates charging.
"terminates charging" is a driver action, not a description of HW. It's
fine to say that what min/max value should be specified in the property
for it to be valid, but not what action SW should take in response to that.
Those same two comments apply to other properties too.
> + - ti,input-current: Used to control and set the charger input current. This
> + value must follow the below guidelines:
What if this value is inconsistent with the charger's power consumption
derived from the other two properties? Is it really necessary to include
this property in the DT and hence create the potential for mismatch?
next prev parent reply other threads:[~2013-09-23 21:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-19 16:18 [Patch V2] drivers: power: Add support for bq24735 charger Rhyland Klein
2013-09-19 16:18 ` Rhyland Klein
[not found] ` <1379607514-11200-1-git-send-email-rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-09-19 20:27 ` Thierry Reding
2013-09-19 20:27 ` Thierry Reding
2013-09-19 20:45 ` Rhyland Klein
2013-09-19 20:45 ` Rhyland Klein
[not found] ` <523B6257.4040302-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-09-20 7:53 ` Thierry Reding
2013-09-20 7:53 ` Thierry Reding
2013-09-20 16:21 ` Rhyland Klein
2013-09-20 16:21 ` Rhyland Klein
2013-09-24 18:13 ` Rhyland Klein
2013-09-24 18:13 ` Rhyland Klein
[not found] ` <5241D62E.1060705-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-09-24 18:31 ` Thierry Reding
2013-09-24 18:31 ` Thierry Reding
2013-09-23 21:53 ` Stephen Warren [this message]
2013-09-23 21:53 ` Stephen Warren
[not found] ` <5240B85D.3050803-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-09-23 22:01 ` Rhyland Klein
2013-09-23 22:01 ` Rhyland Klein
[not found] ` <5240BA4A.4010007-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-09-23 22:05 ` Stephen Warren
2013-09-23 22:05 ` Stephen Warren
2013-09-24 16:39 ` Rhyland Klein
[not found] ` <5241C041.7020208-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-09-24 23:10 ` Stephen Warren
2013-09-24 23:10 ` Stephen Warren
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=5240B85D.3050803@wwwdotorg.org \
--to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
--cc=anton-9xeibp6oKSgdnm+yROfE0A@public.gmane.org \
--cc=badarkhe.manish-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=dsriharsha-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.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.