diff mbox series

[1/2] dt-bindings: power: Add the BQ27561 fuel gauge bindings

Message ID 20200417172227.28075-1-dmurphy@ti.com (mailing list archive)
State Not Applicable, archived
Headers show
Series [1/2] dt-bindings: power: Add the BQ27561 fuel gauge bindings | expand

Commit Message

Dan Murphy April 17, 2020, 5:22 p.m. UTC
Introduce the Texas Instrument BQ27561 and BQ27750 fuel gauge device
tree bindings.

Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Dan Murphy <dmurphy@ti.com>
---
 .../bindings/power/supply/bq27561.yaml        | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power/supply/bq27561.yaml

Comments

Sebastian Reichel April 29, 2020, 10:31 p.m. UTC | #1
Hi,

On Fri, Apr 17, 2020 at 12:22:26PM -0500, Dan Murphy wrote:
> Introduce the Texas Instrument BQ27561 and BQ27750 fuel gauge device
> tree bindings.
> 
> Cc: Rob Herring <robh@kernel.org>
> Signed-off-by: Dan Murphy <dmurphy@ti.com>
> ---

I think its best to just add them to bq27xxx.txt. Conversion to YAML
would still be nice of course :)

In any case the binding is incomplete, since batteries should contain
a power-supplies node referencing their charger via a phandle, see
power_suppliy.txt (which still needs to be converted to YAML).

-- Sebastian

>  .../bindings/power/supply/bq27561.yaml        | 46 +++++++++++++++++++
>  1 file changed, 46 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/power/supply/bq27561.yaml
> 
> diff --git a/Documentation/devicetree/bindings/power/supply/bq27561.yaml b/Documentation/devicetree/bindings/power/supply/bq27561.yaml
> new file mode 100644
> index 000000000000..abc9acdbc704
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/supply/bq27561.yaml
> @@ -0,0 +1,46 @@
> +# SPDX-License-Identifier: GPL-2.0
> +# Copyright (C) 2020 Texas Instruments Incorporated
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/power/supply/bq27561.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +
> +title: TI BQ27561 and BQ27750 Fuel Gauges
> +
> +maintainers:
> +  - Dan Murphy <dmurphy@ti.com>
> +
> +description: |
> +  The bq27z561 device provides a feature-rich gas gauging solution for
> +  single-cell battery pack applications.
> +
> +  Specifications about the charger can be found at:
> +    https://www.ti.com/lit/gpn/bq27z561
> +    https://www.ti.com/lit/gpn/bq27750
> +
> +properties:
> +  compatible:
> +    enum:
> +      - ti,bq27561
> +      - ti,bq27750
> +
> +  reg:
> +    maxItems: 1
> +    description: |
> +      I2C address of the device which is 0x55
> +
> +required:
> +  - compatible
> +  - reg
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c0 {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +      fuel_gauge@55 {
> +        compatible = "ti,bq27561";
> +        reg = <0x55>;
> +      };
> +    };
> -- 
> 2.25.1
>
Dan Murphy April 30, 2020, 12:44 p.m. UTC | #2
Sebastien

On 4/29/20 5:31 PM, Sebastian Reichel wrote:
> Hi,
>
> On Fri, Apr 17, 2020 at 12:22:26PM -0500, Dan Murphy wrote:
>> Introduce the Texas Instrument BQ27561 and BQ27750 fuel gauge device
>> tree bindings.
>>
>> Cc: Rob Herring <robh@kernel.org>
>> Signed-off-by: Dan Murphy <dmurphy@ti.com>
>> ---
> I think its best to just add them to bq27xxx.txt. Conversion to YAML
> would still be nice of course :)

Ack


> In any case the binding is incomplete, since batteries should contain
> a power-supplies node referencing their charger via a phandle, see
> power_suppliy.txt (which still needs to be converted to YAML).

Ack

Dan
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/power/supply/bq27561.yaml b/Documentation/devicetree/bindings/power/supply/bq27561.yaml
new file mode 100644
index 000000000000..abc9acdbc704
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/bq27561.yaml
@@ -0,0 +1,46 @@ 
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (C) 2020 Texas Instruments Incorporated
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/power/supply/bq27561.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: TI BQ27561 and BQ27750 Fuel Gauges
+
+maintainers:
+  - Dan Murphy <dmurphy@ti.com>
+
+description: |
+  The bq27z561 device provides a feature-rich gas gauging solution for
+  single-cell battery pack applications.
+
+  Specifications about the charger can be found at:
+    https://www.ti.com/lit/gpn/bq27z561
+    https://www.ti.com/lit/gpn/bq27750
+
+properties:
+  compatible:
+    enum:
+      - ti,bq27561
+      - ti,bq27750
+
+  reg:
+    maxItems: 1
+    description: |
+      I2C address of the device which is 0x55
+
+required:
+  - compatible
+  - reg
+additionalProperties: false
+
+examples:
+  - |
+    i2c0 {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      fuel_gauge@55 {
+        compatible = "ti,bq27561";
+        reg = <0x55>;
+      };
+    };