[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160823030329.zy6kgncj2ov5ypnj@earth>
Date: Tue, 23 Aug 2016 05:03:29 +0200
From: Sebastian Reichel <sre@...nel.org>
To: Wenyou Yang <wenyou.yang@...el.com>,
Rob Herring <robh+dt@...nel.org>
Cc: Pawel Moll <pawel.moll@....com>, Mark Brown <broonie@...nel.org>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
Nicolas Ferre <nicolas.ferre@...el.com>,
linux-pm@...r.kernel.org
Subject: Re: [PATCH v7 7/7] doc: bindings: act8945a-charger: Update properties
Hi,
On Mon, Aug 22, 2016 at 02:49:17PM +0800, Wenyou Yang wrote:
> Due the driver improvements, update the properties,
> - Remove "active-semi,check-battery-temperature" property.
> - Add the properties, "active-semi,irq_gpio"
> and "active-semi,lbo-gpios".
>
> Signed-off-by: Wenyou Yang <wenyou.yang@...el.com>
> Acked-by: Rob Herring <robh@...nel.org>
I wonder if it's too late to slightly break the DT API by
introducing a proper sub-device for the charger and having all those
charger specific details described there. Not being able to use the
devm_ functions because all properties are assigned to the parent
device is not very nice.
We could easily support reading timeouts and threshold information
from the both (parent and sub-device) and just mark the parent
binding deprecated. The only real API break would be
"active-semi,chglev-gpios", which is currently broken anyways in the
driver as far as I can see (I should have reviewed this more
carefully previously).
In other words I suggest the following:
pmic@5b {
compatible = "active-semi,act8945a";
reg = <0x5b>;
status = "okay";
/* the following 3 are deprecated, but still supported */
//active-semi,input-voltage-threshold-microvolt = <6600>;
//active-semi,precondition-timeout = <40>;
//active-semi,total-timeout = <3>;
/* no longer supported, never worked properly */
//active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
/* this is new, mfd should register charger sub-dev independently
* of the subnode for backwards compatibility. Then optional
* gpios/irqs are not available. But those either never worked
* or did not exist before this update. */
charger {
active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
interrupt-parent = <&pioA>;
interrupts = <45 GPIO_ACTIVE_LOW>
active-semi,input-voltage-threshold-microvolt = <6600>;
active-semi,precondition-timeout = <40>;
active-semi,total-timeout = <3>;
};
};
-- Sebastian
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists