Add ADI MAX77654/58/59 power supply devicetree document.
Signed-off-by: Nurettin Bolucu <Nurettin.Bolucu@analog.com>
Signed-off-by: Zeynep Arslanbenzer <Zeynep.Arslanbenzer@analog.com>
---
.../power/supply/adi,max77658-charger.yaml | 53 +++++++++++++++++++
1 file changed, 53 insertions(+)
create mode 100644 Documentation/devicetree/bindings/power/supply/adi,max77658-charger.yaml
diff --git a/Documentation/devicetree/bindings/power/supply/adi,max77658-charger.yaml b/Documentation/devicetree/bindings/power/supply/adi,max77658-charger.yaml
new file mode 100644
index 000000000000..1b487d82cdbf
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/adi,max77658-charger.yaml
@@ -0,0 +1,53 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/supply/adi,max77658-charger.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Battery charger for MAX77658 PMICs family from ADI
+
+maintainers:
+ - Nurettin Bolucu <Nurettin.Bolucu@analog.com>
+ - Zeynep Arslanbenzer <Zeynep.Arslanbenzer@analog.com>
+
+description: |
+ This module is part of the MAX77658 MFD device. For more details
+ see Documentation/devicetree/bindings/mfd/adi,max77658.yaml.
+
+ The charger is represented as a sub-node of the PMIC node on the device tree.
+
+properties:
+ compatible:
+ enum:
+ - adi,max77654-charger
+ - adi,max77658-charger
+ - adi,max77659-charger
+
+ adi,input-current-limit-microamp:
+ description: Input current limit value.
+
+ monitored-battery:
+ description: >
+ This property must be a phandle to a node using the format described
+ in battery.yaml, with the following properties being required:
+ - constant-charge-current-max-microamp
+
+allOf:
+ - $ref: power-supply.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - adi,max77659-charger
+
+ then:
+ properties:
+ adi,input-current-limit-microamp: false
+
+required:
+ - compatible
+
+additionalProperties: false
+
+...
--
2.25.1
On 08/05/2023 15:10, Zeynep Arslanbenzer wrote: > Add ADI MAX77654/58/59 power supply devicetree document. > > Signed-off-by: Nurettin Bolucu <Nurettin.Bolucu@analog.com> > Signed-off-by: Zeynep Arslanbenzer <Zeynep.Arslanbenzer@analog.com> > --- > .../power/supply/adi,max77658-charger.yaml | 53 +++++++++++++++++++ > 1 file changed, 53 insertions(+) > create mode 100644 Documentation/devicetree/bindings/power/supply/adi,max77658-charger.yaml > > diff --git a/Documentation/devicetree/bindings/power/supply/adi,max77658-charger.yaml b/Documentation/devicetree/bindings/power/supply/adi,max77658-charger.yaml > new file mode 100644 > index 000000000000..1b487d82cdbf > --- /dev/null > +++ b/Documentation/devicetree/bindings/power/supply/adi,max77658-charger.yaml > @@ -0,0 +1,53 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/power/supply/adi,max77658-charger.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Battery charger for MAX77658 PMICs family from ADI > + > +maintainers: > + - Nurettin Bolucu <Nurettin.Bolucu@analog.com> > + - Zeynep Arslanbenzer <Zeynep.Arslanbenzer@analog.com> > + > +description: | > + This module is part of the MAX77658 MFD device. For more details > + see Documentation/devicetree/bindings/mfd/adi,max77658.yaml. > + > + The charger is represented as a sub-node of the PMIC node on the device tree. > + > +properties: > + compatible: > + enum: > + - adi,max77654-charger > + - adi,max77658-charger > + - adi,max77659-charger What are the differences between them? Driver suggests they are compatible. Your match data is empty there. > + > + adi,input-current-limit-microamp: > + description: Input current limit value. Your description is an exact copy of property name. That's not helpful. What do you limit? Total current? Charging current? Top-off current? You have default value, why it is not here? minimum/maximum? > + > + monitored-battery: > + description: > > + This property must be a phandle to a node using the format described > + in battery.yaml, with the following properties being required: > + - constant-charge-current-max-microamp > + > +allOf: > + - $ref: power-supply.yaml# > + - if: > + properties: > + compatible: > + contains: > + enum: > + - adi,max77659-charger > + > + then: > + properties: > + adi,input-current-limit-microamp: false > + > +required: > + - compatible > + > +additionalProperties: false > + > +... Best regards, Krzysztof
On 08/05/2023 21:45, Krzysztof Kozlowski wrote: > On 08/05/2023 15:10, Zeynep Arslanbenzer wrote: >> Add ADI MAX77654/58/59 power supply devicetree document. >> >> Signed-off-by: Nurettin Bolucu <Nurettin.Bolucu@analog.com> >> Signed-off-by: Zeynep Arslanbenzer <Zeynep.Arslanbenzer@analog.com> >> --- >> .../power/supply/adi,max77658-charger.yaml | 53 +++++++++++++++++++ >> 1 file changed, 53 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/power/supply/adi,max77658-charger.yaml >> >> diff --git a/Documentation/devicetree/bindings/power/supply/adi,max77658-charger.yaml b/Documentation/devicetree/bindings/power/supply/adi,max77658-charger.yaml >> new file mode 100644 >> index 000000000000..1b487d82cdbf >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/power/supply/adi,max77658-charger.yaml >> @@ -0,0 +1,53 @@ >> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/power/supply/adi,max77658-charger.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Battery charger for MAX77658 PMICs family from ADI >> + >> +maintainers: >> + - Nurettin Bolucu <Nurettin.Bolucu@analog.com> >> + - Zeynep Arslanbenzer <Zeynep.Arslanbenzer@analog.com> >> + >> +description: | >> + This module is part of the MAX77658 MFD device. For more details >> + see Documentation/devicetree/bindings/mfd/adi,max77658.yaml. >> + >> + The charger is represented as a sub-node of the PMIC node on the device tree. >> + >> +properties: >> + compatible: >> + enum: >> + - adi,max77654-charger >> + - adi,max77658-charger >> + - adi,max77659-charger > > What are the differences between them? Driver suggests they are > compatible. Your match data is empty there. > >> + >> + adi,input-current-limit-microamp: >> + description: Input current limit value. > > Your description is an exact copy of property name. That's not helpful. > What do you limit? Total current? Charging current? Top-off current? > > You have default value, why it is not here? minimum/maximum? > BTW, this is duplicating constant-charge-current-max-microamp. If it has different meaning, you need to explain this in description, not just say what property name is saying. Best regards, Krzysztof
On Mon, 08 May 2023 16:10:40 +0300, Zeynep Arslanbenzer wrote: > Add ADI MAX77654/58/59 power supply devicetree document. > > Signed-off-by: Nurettin Bolucu <Nurettin.Bolucu@analog.com> > Signed-off-by: Zeynep Arslanbenzer <Zeynep.Arslanbenzer@analog.com> > --- > .../power/supply/adi,max77658-charger.yaml | 53 +++++++++++++++++++ > 1 file changed, 53 insertions(+) > create mode 100644 Documentation/devicetree/bindings/power/supply/adi,max77658-charger.yaml > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: doc reference errors (make refcheckdocs): Documentation/devicetree/bindings/power/supply/adi,max77658-charger.yaml: Documentation/devicetree/bindings/mfd/adi,max77658.yaml See https://patchwork.ozlabs.org/patch/1778407 This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit.
On 08/05/2023 16:32, Krzysztof Kozlowski wrote: > On Mon, 08 May 2023 16:10:40 +0300, Zeynep Arslanbenzer wrote: >> Add ADI MAX77654/58/59 power supply devicetree document. >> >> Signed-off-by: Nurettin Bolucu <Nurettin.Bolucu@analog.com> >> Signed-off-by: Zeynep Arslanbenzer <Zeynep.Arslanbenzer@analog.com> >> --- >> .../power/supply/adi,max77658-charger.yaml | 53 +++++++++++++++++++ >> 1 file changed, 53 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/power/supply/adi,max77658-charger.yaml >> > > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' > on your patch (DT_CHECKER_FLAGS is new in v5.13): > > yamllint warnings/errors: > > doc reference errors (make refcheckdocs): > Documentation/devicetree/bindings/power/supply/adi,max77658-charger.yaml: Documentation/devicetree/bindings/mfd/adi,max77658.yaml This can be ignored, there is a kind of circular dependency so it's fine. Best regards, Krzysztof
© 2016 - 2026 Red Hat, Inc.