diff mbox series

[1/2,v2] dt-bindings: power: Extend battery bindings with type

Message ID 20210805085828.3451909-1-linus.walleij@linaro.org
State New
Headers show
Series [1/2,v2] dt-bindings: power: Extend battery bindings with type | expand

Commit Message

Linus Walleij Aug. 5, 2021, 8:58 a.m. UTC
This adds a battery-type property and bindings for the different
"technologies" that are used in Linux. More types can be added.

This is needed to convert the custom ST-Ericsson AB8500 battery
properties over to the generic battery bindings.

Cc: devicetree@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

---
ChangeLog v1->v2:
- Add devicetree list to Cc
- Use "device-chemistry" instead of "battery-type" as this
  has precedence in standards.
I need a bunch of new bindings for switch the STE AB8500 custom
bindings out, but I need to start somewhere, this is as good as
any place to start.
---
 .../devicetree/bindings/power/supply/battery.yaml  | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

-- 
2.31.1

Comments

Rob Herring Aug. 13, 2021, 6:26 p.m. UTC | #1
On Thu, Aug 05, 2021 at 10:58:27AM +0200, Linus Walleij wrote:
> This adds a battery-type property and bindings for the different


s/battery-type/"device-chemistry"/

Otherwise,

Reviewed-by: Rob Herring <robh@kernel.org>


> "technologies" that are used in Linux. More types can be added.

> 

> This is needed to convert the custom ST-Ericsson AB8500 battery

> properties over to the generic battery bindings.

> 

> Cc: devicetree@vger.kernel.org

> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

> ---

> ChangeLog v1->v2:

> - Add devicetree list to Cc

> - Use "device-chemistry" instead of "battery-type" as this

>   has precedence in standards.

> I need a bunch of new bindings for switch the STE AB8500 custom

> bindings out, but I need to start somewhere, this is as good as

> any place to start.

> ---

>  .../devicetree/bindings/power/supply/battery.yaml  | 14 ++++++++++++++

>  1 file changed, 14 insertions(+)
Linus Walleij Aug. 13, 2021, 9:46 p.m. UTC | #2
On Fri, Aug 13, 2021 at 8:26 PM Rob Herring <robh@kernel.org> wrote:
> On Thu, Aug 05, 2021 at 10:58:27AM +0200, Linus Walleij wrote:
> > This adds a battery-type property and bindings for the different
>
> s/battery-type/"device-chemistry"/
>
> Otherwise,
>
> Reviewed-by: Rob Herring <robh@kernel.org>

Thanks Rob, Sebastian tell me if you can fix this when applying
or if you want me to respin the patch.

Yours,
Linus Walleij
Sebastian Reichel Aug. 14, 2021, 10:55 a.m. UTC | #3
Hi,

On Fri, Aug 13, 2021 at 11:46:52PM +0200, Linus Walleij wrote:
> On Fri, Aug 13, 2021 at 8:26 PM Rob Herring <robh@kernel.org> wrote:
> > On Thu, Aug 05, 2021 at 10:58:27AM +0200, Linus Walleij wrote:
> > > This adds a battery-type property and bindings for the different
> >
> > s/battery-type/"device-chemistry"/
> >
> > Otherwise,
> >
> > Reviewed-by: Rob Herring <robh@kernel.org>
> 
> Thanks Rob, Sebastian tell me if you can fix this when applying
> or if you want me to respin the patch.

No, that's fine. I queued both patches with type changed to
chemistry in the commit messages.

-- Sebastian
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/power/supply/battery.yaml b/Documentation/devicetree/bindings/power/supply/battery.yaml
index c3b4b7543591..d56ac484fec5 100644
--- a/Documentation/devicetree/bindings/power/supply/battery.yaml
+++ b/Documentation/devicetree/bindings/power/supply/battery.yaml
@@ -31,6 +31,20 @@  properties:
   compatible:
     const: simple-battery
 
+  device-chemistry:
+    description: This describes the chemical technology of the battery.
+    oneOf:
+      - const: nickel-cadmium
+      - const: nickel-metal-hydride
+      - const: lithium-ion
+        description: This is a blanket type for all lithium-ion batteries,
+          including those below. If possible, a precise compatible string
+          from below should be used, but sometimes it is unknown which specific
+          lithium ion battery is employed and this wide compatible can be used.
+      - const: lithium-ion-polymer
+      - const: lithium-ion-iron-phosphate
+      - const: lithium-ion-manganese-oxide
+
   over-voltage-threshold-microvolt:
     description: battery over-voltage limit