[v2,4/5] dt-bindings: regulator: adi,max77541-regulator.yaml Add MAX77541 Regulator bindings

Message ID 20221226223839.103460-5-okan.sahin@analog.com
State New
Headers
Series [v2,1/5] drivers: mfd: Add MAX77541/MAX77540 PMIC Support |

Commit Message

Sahin, Okan Dec. 26, 2022, 10:38 p.m. UTC
  The bindings for MAX77541 and MAX77540
regulator drivers.

Signed-off-by: Okan Sahin <okan.sahin@analog.com>
---
 .../regulator/adi,max77541-regulator.yaml     | 44 +++++++++++++++++++
 MAINTAINERS                                   |  1 +
 2 files changed, 45 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/adi,max77541-regulator.yaml
  

Comments

Krzysztof Kozlowski Dec. 27, 2022, 7:56 a.m. UTC | #1
On 26/12/2022 23:38, Okan Sahin wrote:
> The bindings for MAX77541 and MAX77540
> regulator drivers.

1. Again:
https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95

2. Please wrap commit message according to Linux coding style /
submission process (neither too early nor over the limit):
https://elixir.bootlin.com/linux/v5.18-rc4/source/Documentation/process/submitting-patches.rst#L586

3. Subject: drop second, redundant "bindings".


> 
> Signed-off-by: Okan Sahin <okan.sahin@analog.com>
> ---
>  .../regulator/adi,max77541-regulator.yaml     | 44 +++++++++++++++++++
>  MAINTAINERS                                   |  1 +
>  2 files changed, 45 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/regulator/adi,max77541-regulator.yaml
> 
> diff --git a/Documentation/devicetree/bindings/regulator/adi,max77541-regulator.yaml b/Documentation/devicetree/bindings/regulator/adi,max77541-regulator.yaml
> new file mode 100644
> index 000000000000..67d48bfcb627
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/adi,max77541-regulator.yaml
> @@ -0,0 +1,44 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/regulator/adi,max77541-regulator.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Buck Converter for MAX77540/MAX77541
> +
> +maintainers:
> +  - Okan Sahin <okan.sahin@analog.com>
> +
> +description: |
> +  This is a part of device tree bindings for ADI MAX77540/MAX77541
> +
> +  The buck converter is represented as a sub-node of the PMIC node on the device tree.
> +
> +  The device has two buck regulators.
> +  See also Documentation/devicetree/bindings/mfd/adi,max77541.yaml for
> +  additional information and example.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - adi,max77540-regulator
> +      - adi,max77541-regulator
> +
> +patternProperties:
> +  "^BUCK[12]$":

Old DT example was correct - lowercase node names.

Best regards,
Krzysztof
  
kernel test robot Dec. 29, 2022, 4:49 a.m. UTC | #2
Hi Okan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on lee-mfd/for-mfd-next]
[cannot apply to broonie-regulator/for-next jic23-iio/togreg linus/master lee-mfd/for-mfd-fixes v6.2-rc1 next-20221226]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Okan-Sahin/dt-bindings-mfd-adi-max77541-yaml-Add-MAX77541-bindings/20221227-073859
base:   https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
patch link:    https://lore.kernel.org/r/20221226223839.103460-5-okan.sahin%40analog.com
patch subject: [PATCH v2 4/5] dt-bindings: regulator: adi,max77541-regulator.yaml Add MAX77541 Regulator bindings
reproduce:
        # https://github.com/intel-lab-lkp/linux/commit/c0440d7413fa9e08ba585982ccd2f5da1d029c13
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Okan-Sahin/dt-bindings-mfd-adi-max77541-yaml-Add-MAX77541-bindings/20221227-073859
        git checkout c0440d7413fa9e08ba585982ccd2f5da1d029c13
        make menuconfig
        # enable CONFIG_COMPILE_TEST, CONFIG_WARN_MISSING_DOCUMENTS, CONFIG_WARN_ABI_ERRORS
        make htmldocs

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> Warning: MAINTAINERS references a file that doesn't exist: Documentation/devicetree/bindings/regulator/adi,max77541.yaml
  
Sahin, Okan Jan. 15, 2023, 5:41 p.m. UTC | #3
Hi Krzysztof,

Thank you for your feedback and efforts. I also have a few question below.

On Tue, 27 Dec 2022 10:57 AM
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> On 26/12/2022 23:38, Okan Sahin wrote:
> > The bindings for MAX77541 and MAX77540 regulator drivers.
> 
> 1. Again:
> https://urldefense.com/v3/__https://elixir.bootlin.com/linux/v5.17.1/source/D
> ocumentation/process/submitting-
> patches.rst*L95__;Iw!!A3Ni8CS0y2Y!7nAM0w0tZiMzaqSFijTSs6_FiIcbPVz-
> n0BajxVC1WDh0GfsgL7XoVFoFToHza-Cy2_p8o0UEEc82BOnwgesjPcas_9m$
> 
> 2. Please wrap commit message according to Linux coding style / submission
> process (neither too early nor over the limit):
> https://urldefense.com/v3/__https://elixir.bootlin.com/linux/v5.18-
> rc4/source/Documentation/process/submitting-
> patches.rst*L586__;Iw!!A3Ni8CS0y2Y!7nAM0w0tZiMzaqSFijTSs6_FiIcbPVz-
> n0BajxVC1WDh0GfsgL7XoVFoFToHza-Cy2_p8o0UEEc82BOnwgesjE6sDUk6$
> 
> 3. Subject: drop second, redundant "bindings".
> 
> 
I will update like you suggest. Is there any command that you can advise to check format of commit is suitable or not by using check_patch?
I just added checkpatch into .git/hooks/post-commit file.
> >
> > Signed-off-by: Okan Sahin <okan.sahin@analog.com>
> > ---
> >  .../regulator/adi,max77541-regulator.yaml     | 44 +++++++++++++++++++
> >  MAINTAINERS                                   |  1 +
> >  2 files changed, 45 insertions(+)
> >  create mode 100644
> > Documentation/devicetree/bindings/regulator/adi,max77541-regulator.yam
> > l
> >
> > diff --git
> > a/Documentation/devicetree/bindings/regulator/adi,max77541-regulator.y
> > aml
> > b/Documentation/devicetree/bindings/regulator/adi,max77541-regulator.y
> > aml
> > new file mode 100644
> > index 000000000000..67d48bfcb627
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/regulator/adi,max77541-regulat
> > +++ or.yaml
> > @@ -0,0 +1,44 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2
> > +---
> > +$id:
> > +https://urldefense.com/v3/__http://devicetree.org/schemas/regulator/a
> > +di,max77541-
> regulator.yaml*__;Iw!!A3Ni8CS0y2Y!7nAM0w0tZiMzaqSFijTSs6_
> > +FiIcbPVz-n0BajxVC1WDh0GfsgL7XoVFoFToHza-
> Cy2_p8o0UEEc82BOnwgesjKsOQbIb
> > +$
> > +$schema:
> > +https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.y
> > +aml*__;Iw!!A3Ni8CS0y2Y!7nAM0w0tZiMzaqSFijTSs6_FiIcbPVz-
> n0BajxVC1WDh0G
> > +fsgL7XoVFoFToHza-Cy2_p8o0UEEc82BOnwgesjEgbPQFe$
> > +
> > +title: Buck Converter for MAX77540/MAX77541
> > +
> > +maintainers:
> > +  - Okan Sahin <okan.sahin@analog.com>
> > +
> > +description: |
> > +  This is a part of device tree bindings for ADI MAX77540/MAX77541
> > +
> > +  The buck converter is represented as a sub-node of the PMIC node on the
> device tree.
> > +
> > +  The device has two buck regulators.
> > +  See also Documentation/devicetree/bindings/mfd/adi,max77541.yaml
> > + for  additional information and example.
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - adi,max77540-regulator
> > +      - adi,max77541-regulator
> > +
> > +patternProperties:
> > +  "^BUCK[12]$":
> 
> Old DT example was correct - lowercase node names.
Actually, I did not change this part of the patch. I checked other examples, and it looks like using upper case under regulators node seems correct to me. Additionally, there is no warning or error after "make dt_binding_check".
> 
> Best regards,
> Krzysztof

Best regards,
Okan
  
Krzysztof Kozlowski Jan. 15, 2023, 7:12 p.m. UTC | #4
On 15/01/2023 18:41, Sahin, Okan wrote:
>>> +patternProperties:
>>> +  "^BUCK[12]$":
>>
>> Old DT example was correct - lowercase node names.
> Actually, I did not change this part of the patch. I checked other examples, and it looks like using upper case under regulators node seems correct to me. Additionally, there is no warning or error after "make dt_binding_check".

What do you mean "correct"? The convention is simple - all node names
are lowercase. Why this is an exception?

Best regards,
Krzysztof
  

Patch

diff --git a/Documentation/devicetree/bindings/regulator/adi,max77541-regulator.yaml b/Documentation/devicetree/bindings/regulator/adi,max77541-regulator.yaml
new file mode 100644
index 000000000000..67d48bfcb627
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/adi,max77541-regulator.yaml
@@ -0,0 +1,44 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/adi,max77541-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Buck Converter for MAX77540/MAX77541
+
+maintainers:
+  - Okan Sahin <okan.sahin@analog.com>
+
+description: |
+  This is a part of device tree bindings for ADI MAX77540/MAX77541
+
+  The buck converter is represented as a sub-node of the PMIC node on the device tree.
+
+  The device has two buck regulators.
+  See also Documentation/devicetree/bindings/mfd/adi,max77541.yaml for
+  additional information and example.
+
+properties:
+  compatible:
+    enum:
+      - adi,max77540-regulator
+      - adi,max77541-regulator
+
+patternProperties:
+  "^BUCK[12]$":
+    type: object
+    $ref: regulator.yaml#
+    additionalProperties: false
+    description: |
+      Buck regulator.
+
+    properties:
+      regulator-name: true
+      regulator-always-on: true
+      regulator-boot-on: true
+      regulator-min-microvolt:
+        minimum: 300000
+      regulator-max-microvolt:
+        maximum: 5200000
+
+additionalProperties: false
diff --git a/MAINTAINERS b/MAINTAINERS
index 5704ed5afce3..8e5572b28a8c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12502,6 +12502,7 @@  M:	Okan Sahin <okan.sahin@analog.com>
 L:	linux-kernel@vger.kernel.org
 S:	Maintained
 F:	Documentation/devicetree/bindings/mfd/adi,max77541.yaml
+F:	Documentation/devicetree/bindings/regulator/adi,max77541.yaml
 F:	drivers/mfd/max77541.c
 F:	drivers/regulator/max77541-regulator.c
 F:	include/linux/mfd/max77541.h