diff mbox series

[1/2] dt-bindings: power: supply: add Maxim MAX77976 battery charger

Message ID 20211004130732.950512-1-luca@lucaceresoli.net (mailing list archive)
State Not Applicable, archived
Headers show
Series [1/2] dt-bindings: power: supply: add Maxim MAX77976 battery charger | expand

Commit Message

Luca Ceresoli Oct. 4, 2021, 1:07 p.m. UTC
Add bindings for the Maxim MAX77976 I2C-controlled battery charger.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 .../bindings/power/supply/maxim,max77976.yaml | 41 +++++++++++++++++++
 MAINTAINERS                                   |  5 +++
 2 files changed, 46 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power/supply/maxim,max77976.yaml

Comments

Sebastian Reichel Oct. 6, 2021, 4:15 p.m. UTC | #1
Hi,

On Mon, Oct 04, 2021 at 03:07:31PM +0200, Luca Ceresoli wrote:
> Add bindings for the Maxim MAX77976 I2C-controlled battery charger.
> 
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> ---
>  .../bindings/power/supply/maxim,max77976.yaml | 41 +++++++++++++++++++
>  MAINTAINERS                                   |  5 +++
>  2 files changed, 46 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/power/supply/maxim,max77976.yaml
> 
> diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max77976.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max77976.yaml
> new file mode 100644
> index 000000000000..b508d9cc04a0
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/supply/maxim,max77976.yaml
> @@ -0,0 +1,41 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/power/supply/maxim,max77976.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Maxim Integrated MAX77976 Battery charger
> +
> +maintainers:
> +  - Luca Ceresoli <luca@lucaceresoli.net>
> +
> +description: |
> +  The Maxim MAX77976 is a 19Vin / 5.5A, 1-Cell Li+ battery charger
> +  configured via I2C.
> +
> +properties:
> +  compatible:
> +    const: maxim,max77976
> +
> +  reg:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false

Add

allOf:
  - $ref: power-supply.yaml#

and replace additionalProperties with unevaluatedProperties, so that
the power-supplies property is also valid.

-- Sebastian

> +
> +examples:
> +  - |
> +    i2c {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      charger@6b {
> +        compatible = "maxim,max77976";
> +        reg = <0x6b>;
> +      };
> +    };
> +
> +...
> diff --git a/MAINTAINERS b/MAINTAINERS
> index eeb4c70b3d5b..b3a3667cef46 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -11388,6 +11388,11 @@ F:	Documentation/devicetree/bindings/*/*max77802.txt
>  F:	drivers/regulator/max77802-regulator.c
>  F:	include/dt-bindings/*/*max77802.h
>  
> +MAXIM MAX77976 BATTERY CHARGER
> +M:	Luca Ceresoli <luca@lucaceresoli.net>
> +S:	Supported
> +F:	Documentation/devicetree/bindings/power/supply/maxim,max77976.yaml
> +
>  MAXIM MUIC CHARGER DRIVERS FOR EXYNOS BASED BOARDS
>  M:	Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
>  M:	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> -- 
> 2.25.1
>
Luca Ceresoli Oct. 26, 2021, 11:53 a.m. UTC | #2
Hi Sebastian,

On 06/10/21 18:15, Sebastian Reichel wrote:
> Hi,
> 
> On Mon, Oct 04, 2021 at 03:07:31PM +0200, Luca Ceresoli wrote:
>> Add bindings for the Maxim MAX77976 I2C-controlled battery charger.
>>
>> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
>> ---
>>  .../bindings/power/supply/maxim,max77976.yaml | 41 +++++++++++++++++++
>>  MAINTAINERS                                   |  5 +++
>>  2 files changed, 46 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/power/supply/maxim,max77976.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max77976.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max77976.yaml
>> new file mode 100644
>> index 000000000000..b508d9cc04a0
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/power/supply/maxim,max77976.yaml
>> @@ -0,0 +1,41 @@
>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/power/supply/maxim,max77976.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Maxim Integrated MAX77976 Battery charger
>> +
>> +maintainers:
>> +  - Luca Ceresoli <luca@lucaceresoli.net>
>> +
>> +description: |
>> +  The Maxim MAX77976 is a 19Vin / 5.5A, 1-Cell Li+ battery charger
>> +  configured via I2C.
>> +
>> +properties:
>> +  compatible:
>> +    const: maxim,max77976
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +
>> +additionalProperties: false
> 
> Add
> 
> allOf:
>   - $ref: power-supply.yaml#
> 
> and replace additionalProperties with unevaluatedProperties, so that
> the power-supplies property is also valid.

OK, will fix.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max77976.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max77976.yaml
new file mode 100644
index 000000000000..b508d9cc04a0
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/maxim,max77976.yaml
@@ -0,0 +1,41 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/supply/maxim,max77976.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim Integrated MAX77976 Battery charger
+
+maintainers:
+  - Luca Ceresoli <luca@lucaceresoli.net>
+
+description: |
+  The Maxim MAX77976 is a 19Vin / 5.5A, 1-Cell Li+ battery charger
+  configured via I2C.
+
+properties:
+  compatible:
+    const: maxim,max77976
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      charger@6b {
+        compatible = "maxim,max77976";
+        reg = <0x6b>;
+      };
+    };
+
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index eeb4c70b3d5b..b3a3667cef46 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11388,6 +11388,11 @@  F:	Documentation/devicetree/bindings/*/*max77802.txt
 F:	drivers/regulator/max77802-regulator.c
 F:	include/dt-bindings/*/*max77802.h
 
+MAXIM MAX77976 BATTERY CHARGER
+M:	Luca Ceresoli <luca@lucaceresoli.net>
+S:	Supported
+F:	Documentation/devicetree/bindings/power/supply/maxim,max77976.yaml
+
 MAXIM MUIC CHARGER DRIVERS FOR EXYNOS BASED BOARDS
 M:	Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
 M:	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>