From: Mike Looijmans <mike.looijmans@topic.nl>
To: Rob Herring <robh@kernel.org>
Cc: <devicetree@vger.kernel.org>, <sre@kernel.org>,
<linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<mark.rutland@arm.com>
Subject: Re: [PATCH] dt-bindings: power: New bindings for ltc3651-charger
Date: Tue, 9 May 2017 07:26:51 +0200 [thread overview]
Message-ID: <1d046814-8a0b-099b-0a5b-b704623e1b92@topic.nl> (raw)
In-Reply-To: <20170508171206.ajxjbw5mybvrpwss@rob-hp-laptop>
On 08-05-17 19:12, Rob Herring wrote:
> On Fri, May 05, 2017 at 08:38:35AM +0200, Mike Looijmans wrote:
>> This adds the devicetree bindings documentation for the LTC3651 battery charger.
>>
>> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
>> ---
>> .../bindings/power/supply/ltc3651-charger.txt | 26 ++++++++++++++++++++++
>> 1 file changed, 26 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/power/supply/ltc3651-charger.txt
>>
>> diff --git a/Documentation/devicetree/bindings/power/supply/ltc3651-charger.txt b/Documentation/devicetree/bindings/power/supply/ltc3651-charger.txt
>> new file mode 100644
>> index 0000000..a7dd80f
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/power/supply/ltc3651-charger.txt
>> @@ -0,0 +1,26 @@
>> +ltc3651-charger
>> +
>> +Required properties:
>> + - compatible: "lltc,ltc3651-charger"
>> + - acpr-gpios: Connect to ACPR output. See remark below.
>> +
>> +Optional properties:
>> + - fault-gpios: Connect to FAULT output. See remark below.
>> + - chrg-gpios: Connect to CHRG output. See remark below.
>
> All the gpios need vendor prefix.
Will prefix "lltc," adjust the driver and submit new patches.
>
>> +
>> +The ltc3651 outputs are open-drain type and active low. The driver assumes the
>> +GPIO reports "active" when the output is asserted, so if the pins have been
>> +connected directly, the GPIO flags should be set to active low also.
>> +
>> +The driver will attempt to aquire interrupts for all GPIOs. If the system is
>> +not capabale of providing that, the driver cannot report changes and userspace
>> +will need to periodically read the sysfs attributes to detect changes.
>
> If these are interrupts, then you should use the interrupt binding
> instead (most GPIO controllers are also interrupt controllers).
They're GPIO (the driver needs the current state), the use of interrupts is
just to detect changes. Similar to gpio-charger for example. Interrupt
bindings cannot provide the current state of the line.
>
>> +
>> +Example:
>> +
>> + charger: battery-charger {
>> + compatible = "lltc,ltc3651-charger";
>> + acpr-gpios = <&gpio0 68 GPIO_ACTIVE_LOW>;
>> + fault-gpios = <&gpio0 64 GPIO_ACTIVE_LOW>;
>> + chrg-gpios = <&gpio0 63 GPIO_ACTIVE_LOW>;
>> + };
>> --
>> 1.9.1
>>
Kind regards,
Mike Looijmans
System Expert
TOPIC Products
Materiaalweg 4, NL-5681 RJ Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: mike.looijmans@topicproducts.com
Website: www.topicproducts.com
Please consider the environment before printing this e-mail
next prev parent reply other threads:[~2017-05-09 5:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-05 6:38 Mike Looijmans
2017-05-08 17:12 ` Rob Herring
2017-05-09 5:26 ` Mike Looijmans [this message]
2017-05-09 5:36 ` [PATCH v2] " Mike Looijmans
2017-05-12 20:11 ` Rob Herring
2017-05-15 13:17 ` Sebastian Reichel
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=1d046814-8a0b-099b-0a5b-b704623e1b92@topic.nl \
--to=mike.looijmans@topic.nl \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.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
all inboxes | Powered by JetHome®