[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4446481.1MqT47xhP8@phil>
Date: Wed, 12 Mar 2014 15:57:18 +0100
From: Heiko Stübner <heiko@...ech.de>
To: Rob Herring <robherring2@...il.com>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
David Woodhouse <dwmw2@...radead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: [PATCH 1/3] dt-bindings: document gpio-charger bindings
Hi Rob,
Am Mittwoch, 12. März 2014, 09:28:46 schrieb Rob Herring:
> On Wed, Mar 12, 2014 at 8:46 AM, Heiko Stübner <heiko@...ech.de> wrote:
> > From: Heiko Stuebner <heiko.stuebner@...com>
> >
> > This documents the binding for the gpio-charger power-supply.
>
> How does this relate to what's documented in power_supply.txt and
> charger-manager.txt? Both have references to USB charging. Doesn't
> this need some connection to a battery node?
Yep, the gpio-charger takes the position of the "some,usb-charger" from
power_supply.txt .
usb_charger: charger {
compatible = "gpio-charger";
charger-type = "usb-sdp";
gpios = <&gpf0 2 0 0 0>;
}
battery {
power-supplies = <&usb_charger>;
};
I guess the binding doc could reflect this.
I haven't deeply looked into what charger-manager does, bit it seems to be a
layer on top of chargers and batteries, controlling them. So it seems to be
used with more intelligent components.
My setup using gpio-charger for example is vastly simpler, it's just a gpio
reporting charger present (for gpio-charger), an adc reporting the battery
voltage and another gpio reporting the charging state (which is already
handled in generic-adc-battery, but needs a dt binding too).
Heiko
> > Signed-off-by: Heiko Stuebner <heiko.stuebner@...com>
> > ---
> >
> > .../bindings/power_supply/gpio-charger.txt | 23
> > ++++++++++++++++++++++ 1 file changed, 23 insertions(+)
> > create mode 100644
> > Documentation/devicetree/bindings/power_supply/gpio-charger.txt>
> > diff --git
> > a/Documentation/devicetree/bindings/power_supply/gpio-charger.txt
> > b/Documentation/devicetree/bindings/power_supply/gpio-charger.txt new
> > file mode 100644
> > index 0000000..fad87a4
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/power_supply/gpio-charger.txt
> > @@ -0,0 +1,23 @@
> > +gpio-charger
> > +
> > +Required properties :
> > + - compatible : "gpio-charger"
> > + - gpios : GPIO indicating the charger presence.
> > + See GPIO binding in bindings/gpio/gpio.txt .
> > + - charger-type : power supply type, one of
> > + unknown
> > + battery
> > + ups
> > + mains
> > + usb-sdp (USB standard downstream port)
> > + usb-dcp (USB dedicated charging port)
> > + usb-cdp (USB charging downstream port)
> > + usb-aca (USB accessory charger adapter)
> > +
> > +Example:
> > +
> > + charger {
> > + compatible = "gpio-charger";
> > + charger-type = "usb-sdp";
> > + gpios = <&gpf0 2 0 0 0>;
> > + }
> > --
> > 1.8.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists