2023-06-13 08:53:34

by Sahin, Okan

[permalink] [raw]
Subject: [PATCH v1 0/2] Add MAX77857/MAX77831 Regulator Support

High efficiency buck-boost regulator driver and bindings for
MAX77857/MAX77831. The patches are required to be applied
in sequence.

Okan Sahin (2):
dt-bindings: regulator: max77857: Add ADI MAX77831/MAX77831 Regulator
regulator: max77857: Add ADI MAX77857/MAX77831 Regulator Support

.../bindings/regulator/adi,max77857.yaml | 83 ++++
drivers/regulator/Kconfig | 9 +
drivers/regulator/Makefile | 1 +
drivers/regulator/max77857-regulator.c | 382 ++++++++++++++++++
4 files changed, 475 insertions(+)
create mode 100644 Documentation/devicetree/bindings/regulator/adi,max77857.yaml
create mode 100644 drivers/regulator/max77857-regulator.c

--
2.30.2



2023-06-13 09:06:59

by Sahin, Okan

[permalink] [raw]
Subject: [PATCH v1 1/2] dt-bindings: regulator: max77857: Add ADI MAX77831/MAX77831 Regulator

Add ADI MAX77857 and MAX77831 Regulator device tree document.

Signed-off-by: Okan Sahin <[email protected]>
---
.../bindings/regulator/adi,max77857.yaml | 83 +++++++++++++++++++
1 file changed, 83 insertions(+)
create mode 100644 Documentation/devicetree/bindings/regulator/adi,max77857.yaml

diff --git a/Documentation/devicetree/bindings/regulator/adi,max77857.yaml b/Documentation/devicetree/bindings/regulator/adi,max77857.yaml
new file mode 100644
index 000000000000..f07c60a3eda1
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/adi,max77857.yaml
@@ -0,0 +1,83 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2022 Analog Devices Inc.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/adi,max77857.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices MAX77857 Buck-Boost Converter
+
+maintainers:
+ - Ibrahim Tilki <[email protected]>
+
+description: Analog Devices MAX77857 Buck-Boost Converter
+
+properties:
+ compatible:
+ enum:
+ - adi,max77831
+ - adi,max77857
+
+ reg:
+ description: I2C address of the device
+ items:
+ - enum: [0x66, 0x67, 0x6E, 0x6F]
+
+ interrupts:
+ maxItems: 1
+
+ adi,switch-frequency-hz:
+ description: Switching frequency of the Buck-Boost converter in Hz.
+ items:
+ - enum: [1200000, 1500000, 1800000, 2100000]
+
+ adi,rtop-ohms:
+ description: Top feedback resistor value in ohms for external feedback.
+ minimum: 150000
+ maximum: 330000
+
+ adi,rbot-ohms:
+ description: Bottom feedback resistor value in ohms for external feedback.
+
+dependencies:
+ adi,rtop-ohms: [ 'adi,rbot-ohms' ]
+ adi,rbot-ohms: [ 'adi,rtop-ohms' ]
+
+required:
+ - compatible
+ - reg
+
+allOf:
+ - $ref: regulator.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - adi,max77831
+
+ then:
+ properties:
+ adi,switch-frequency-hz:
+ items:
+ enum: [1200000, 1500000, 1800000]
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ regulator@66 {
+ reg = <0x66>;
+ compatible = "adi,max77857";
+ interrupt-parent = <&gpio>;
+ interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
+
+ adi,rtop-ohms = <312000>;
+ adi,rbot-ohms = <12000>;
+ };
+ };
--
2.30.2


2023-06-13 09:28:41

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v1 1/2] dt-bindings: regulator: max77857: Add ADI MAX77831/MAX77831 Regulator


On Tue, 13 Jun 2023 11:05:49 +0300, Okan Sahin wrote:
> Add ADI MAX77857 and MAX77831 Regulator device tree document.
>
> Signed-off-by: Okan Sahin <[email protected]>
> ---
> .../bindings/regulator/adi,max77857.yaml | 83 +++++++++++++++++++
> 1 file changed, 83 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/regulator/adi,max77857.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:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml: $defs:qcom-pmic-mpp-state:properties:qcom,paired: [{'description': 'Indicates that the pin should be operating in paired mode.'}] is not of type 'object', 'boolean'
from schema $id: http://devicetree.org/meta-schemas/core.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

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.


2023-06-13 13:52:10

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v1 1/2] dt-bindings: regulator: max77857: Add ADI MAX77831/MAX77831 Regulator


On Tue, 13 Jun 2023 11:05:49 +0300, Okan Sahin wrote:
> Add ADI MAX77857 and MAX77831 Regulator device tree document.
>
> Signed-off-by: Okan Sahin <[email protected]>
> ---
> .../bindings/regulator/adi,max77857.yaml | 83 +++++++++++++++++++
> 1 file changed, 83 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/regulator/adi,max77857.yaml
>

Reviewed-by: Rob Herring <[email protected]>


2023-06-13 13:56:12

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v1 1/2] dt-bindings: regulator: max77857: Add ADI MAX77831/MAX77831 Regulator

On Tue, Jun 13, 2023 at 03:18:49AM -0600, Rob Herring wrote:
>
> On Tue, 13 Jun 2023 11:05:49 +0300, Okan Sahin wrote:
> > Add ADI MAX77857 and MAX77831 Regulator device tree document.
> >
> > Signed-off-by: Okan Sahin <[email protected]>
> > ---
> > .../bindings/regulator/adi,max77857.yaml | 83 +++++++++++++++++++
> > 1 file changed, 83 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/regulator/adi,max77857.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:
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml: $defs:qcom-pmic-mpp-state:properties:qcom,paired: [{'description': 'Indicates that the pin should be operating in paired mode.'}] is not of type 'object', 'boolean'
> from schema $id: http://devicetree.org/meta-schemas/core.yaml#

Unrelated, this can be ignored.

Rob