This patch adds binding document for MAX77659 MFD driver.
Signed-off-by: Nurettin Bolucu <Nurettin.Bolucu@analog.com>
Signed-off-by: Zeynep Arslanbenzer <Zeynep.Arslanbenzer@analog.com>
---
.../devicetree/bindings/mfd/adi,max77659.yaml | 70 +++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 71 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mfd/adi,max77659.yaml
diff --git a/Documentation/devicetree/bindings/mfd/adi,max77659.yaml b/Documentation/devicetree/bindings/mfd/adi,max77659.yaml
new file mode 100644
index 000000000000..6bec11607615
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/adi,max77659.yaml
@@ -0,0 +1,70 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/adi,max77659.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MAX77659 SIMO PMIC from ADI.
+
+maintainers:
+ - Nurettin Bolucu <Nurettin.Bolucu@analog.com>
+ - Zeynep Arslanbenzer <Zeynep.Arslanbenzer@analog.com>
+
+description: |
+ MAX77659 is an PMIC providing battery charging and power
+ supply solutions for low-power applications.
+
+ For device-tree bindings of other sub-modules (regulator, power supply
+ refer to the binding documents under the respective
+ sub-system directories.
+
+properties:
+ compatible:
+ const: adi,max77659
+
+ reg:
+ description:
+ I2C device address.
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ charger:
+ $ref: ../power/supply/adi,max77659-charger.yaml
+
+ regulator:
+ $ref: ../regulator/adi,max77659-regulator.yaml
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pmic@40 {
+ compatible = "adi,max77659";
+ reg = <0x40>;
+ interrupt-parent = <&gpio>;
+ #interrupt-cells = <2>;
+ interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
+ regulator {
+ compatible = "adi,max77659-regulator";
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ charger {
+ compatible = "adi,max77659-charger";
+ adi,fast-charge-timer = <5>;
+ adi,fast-charge-microamp = <15000>;
+ adi,topoff-timer = <30>;
+ };
+ };
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index 45a8a471c7c0..e7a9cadf0ff2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12645,6 +12645,7 @@ M: Nurettin Bolucu <Nurettin.Bolucu@analog.com>
M: Zeynep Arslanbenzer <Zeynep.Arslanbenzer@analog.com>
L: linux-kernel@vger.kernel.org
S: Maintained
+F: Documentation/devicetree/bindings/mfd/adi,max77659.yaml
F: drivers/mfd/max77659.c
F: include/linux/mfd/max77659.h
--
2.25.1
On Tue, 20 Dec 2022 16:22:46 +0300, Zeynep Arslanbenzer wrote:
> This patch adds binding document for MAX77659 MFD driver.
>
> Signed-off-by: Nurettin Bolucu <Nurettin.Bolucu@analog.com>
> Signed-off-by: Zeynep Arslanbenzer <Zeynep.Arslanbenzer@analog.com>
> ---
> .../devicetree/bindings/mfd/adi,max77659.yaml | 70 +++++++++++++++++++
> MAINTAINERS | 1 +
> 2 files changed, 71 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/mfd/adi,max77659.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:
dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/mfd/adi,max77659.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/power/supply/adi,max77659-charger.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/adi,max77659.example.dtb: pmic@40: charger: False schema does not allow {'compatible': ['adi,max77659-charger'], 'adi,fast-charge-timer': [[5]], 'adi,fast-charge-microamp': [[15000]], 'adi,topoff-timer': [[30]]}
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/adi,max77659.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/adi,max77659.example.dtb: pmic@40: regulator: False schema does not allow {'compatible': ['adi,max77659-regulator'], 'regulator-boot-on': True, 'regulator-always-on': True}
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/adi,max77659.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/adi,max77659.example.dtb: pmic@40: '#interrupt-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/adi,max77659.yaml
Documentation/devicetree/bindings/mfd/adi,max77659.example.dtb:0:0: /example-0/i2c/pmic@40/regulator: failed to match any schema with compatible: ['adi,max77659-regulator']
Documentation/devicetree/bindings/mfd/adi,max77659.example.dtb:0:0: /example-0/i2c/pmic@40/charger: failed to match any schema with compatible: ['adi,max77659-charger']
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20221220132250.19383-3-Zeynep.Arslanbenzer@analog.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
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 after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
On 20/12/2022 14:22, Zeynep Arslanbenzer wrote:
> This patch adds binding document for MAX77659 MFD driver.
1. Do not use "This commit/patch".
https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95
2. Subject: drop second, redundant "binding".
>
> Signed-off-by: Nurettin Bolucu <Nurettin.Bolucu@analog.com>
> Signed-off-by: Zeynep Arslanbenzer <Zeynep.Arslanbenzer@analog.com>
> ---
> .../devicetree/bindings/mfd/adi,max77659.yaml | 70 +++++++++++++++++++
> MAINTAINERS | 1 +
> 2 files changed, 71 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/mfd/adi,max77659.yaml
>
> diff --git a/Documentation/devicetree/bindings/mfd/adi,max77659.yaml b/Documentation/devicetree/bindings/mfd/adi,max77659.yaml
> new file mode 100644
> index 000000000000..6bec11607615
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/adi,max77659.yaml
> @@ -0,0 +1,70 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/adi,max77659.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MAX77659 SIMO PMIC from ADI.
Drop full stop.
> +
> +maintainers:
> + - Nurettin Bolucu <Nurettin.Bolucu@analog.com>
> + - Zeynep Arslanbenzer <Zeynep.Arslanbenzer@analog.com>
> +
> +description: |
> + MAX77659 is an PMIC providing battery charging and power
> + supply solutions for low-power applications.
> +
> + For device-tree bindings of other sub-modules (regulator, power supply
> + refer to the binding documents under the respective
> + sub-system directories.
Drop this part, not really relevant.
> +
> +properties:
> + compatible:
> + const: adi,max77659
> +
> + reg:
> + description:
> + I2C device address.
Drop description.
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + charger:
> + $ref: ../power/supply/adi,max77659-charger.yaml
Full path, so /schemas/
There is no such file so you did not test the patch.
> +
> + regulator:
> + $ref: ../regulator/adi,max77659-regulator.yaml
Ditto
There is no such file so you did not test the patch.
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/irq.h>
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + pmic@40 {
> + compatible = "adi,max77659";
> + reg = <0x40>;
> + interrupt-parent = <&gpio>;
> + #interrupt-cells = <2>;
> + interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
> + regulator {
> + compatible = "adi,max77659-regulator";
> + regulator-boot-on;
> + regulator-always-on;
> + };
> + charger {
> + compatible = "adi,max77659-charger";
> + adi,fast-charge-timer = <5>;
That's not DT coding style...
> + adi,fast-charge-microamp = <15000>;
> + adi,topoff-timer = <30>;
Same problem.
>
Best regards,
Krzysztof
© 2016 - 2026 Red Hat, Inc.