Skip to contentSkip to conversation

dt-bindings: iio/adc: qcom,spmi: fix up examples

PATCH Applied Johan Hovold 3 participants 10 messages Nov 30, 2023 – Dec 4, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover dt-bindings: iio/adc: qcom,spmi: fix up examples

When reviewing the various SPMI PMIC bindings, I noticed that several examples were incorrect and misleading and could also use some cleanup.

This series addresses the iio/adc ones.

Johan

Johan Hovold (6):
dt-bindings: iio/adc: qcom,spmi-iadc: fix reg description
dt-bindings: iio/adc: qcom,spmi-iadc: fix example node name
dt-bindings: iio/adc: qcom,spmi-iadc: clean up example
dt-bindings: iio/adc: qcom,spmi-rradc: clean up example
dt-bindings: iio/adc: qcom,spmi-vadc: fix example node names
dt-bindings: iio/adc: qcom,spmi-vadc: clean up examples

 .../devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml    | 10 ++++++----
 .../devicetree/bindings/iio/adc/qcom,spmi-rradc.yaml   |  4 ++--
 .../devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml    |  9 +++++----
 3 files changed, 13 insertions(+), 10 deletions(-)
Signature · 1 line
2.41.0
#1 lore raw

PATCH 1/6 dt-bindings: iio/adc: qcom,spmi-iadc: fix reg description

The IADC register is just the base address in the SPMI PMIC and does not include any length.

---
 Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml +1 -1
index 73def67fbe01..e0e0aa9d5d5b 100644
@@ -25,7 +25,7 @@ properties:
       - const: qcom,spmi-iadc
 
   reg:
-    description: IADC base address and length in the SPMI PMIC register map
+    description: IADC base address in the SPMI PMIC register map
     maxItems: 1
 
   qcom,external-resistor-micro-ohms:
Signature · 1 line
2.41.0
#2 lore raw

PATCH 2/6 dt-bindings: iio/adc: qcom,spmi-iadc: fix example node name

In reply to Johan Hovold

The IADC is a child of an SPMI PMIC, which in turn sits on an SPMI bus.

Fixes a4e6bf69418c ("dt-bindings:iio:adc:qcom,spmi-iadc: txt to yaml format conversion.")
---
 Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml +2 -1
index e0e0aa9d5d5b..16889d2d3575 100644
@@ -50,7 +50,8 @@ additionalProperties: false
 examples:
   - |
     #include <dt-bindings/interrupt-controller/irq.h>
-    spmi {
+
+    pmic {
         #address-cells = <1>;
         #size-cells = <0>;
         pmic_iadc: adc@3600 {
Signature · 1 line
2.41.0
#3 lore raw

PATCH 3/6 dt-bindings: iio/adc: qcom,spmi-iadc: clean up example

In reply to Johan Hovold

Clean up the IADC example by adding a newline separator, dropping an unnecessary label and removing stray white space.

---
 .../devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml          | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml +3 -2
index 16889d2d3575..5ed893ef5c18 100644
@@ -54,12 +54,13 @@ examples:
     pmic {
         #address-cells = <1>;
         #size-cells = <0>;
-        pmic_iadc: adc@3600 {
+
+        adc@3600 {
             compatible = "qcom,pm8941-iadc", "qcom,spmi-iadc";
             reg = <0x3600>;
             interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>;
             qcom,external-resistor-micro-ohms = <10000>;
-            #io-channel-cells  = <1>;
+            #io-channel-cells = <1>;
         };
     };
 ...
Signature · 1 line
2.41.0
#4 lore raw

PATCH 4/6 dt-bindings: iio/adc: qcom,spmi-rradc: clean up example

In reply to Johan Hovold

Clean up the RRADC example by dropping an unnecessary label and removing stray white space.

---
 .../devicetree/bindings/iio/adc/qcom,spmi-rradc.yaml          | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/iio/adc/qcom,spmi-rradc.yaml +2 -2
index b3a626389870..f39bc92c2b99 100644
@@ -43,9 +43,9 @@ examples:
         #address-cells = <1>;
         #size-cells = <0>;
 
-        pmic_rradc: adc@4500 {
+        adc@4500 {
             compatible = "qcom,pmi8998-rradc";
             reg = <0x4500>;
-            #io-channel-cells  = <1>;
+            #io-channel-cells = <1>;
         };
     };
Signature · 1 line
2.41.0
#5 lore raw

PATCH 5/6 dt-bindings: iio/adc: qcom,spmi-vadc: fix example node names

In reply to Johan Hovold

The VADC is a child of an SPMI PMIC, which in turn sits on an SPMI bus.

Fixes 74e903461b17 ("dt-bindings: iio: adc: qcom,spmi-vadc: extend example")
Fixes 5a471662b5d9 ("iio: adc: Convert the QCOM SPMI ADC bindings to .yaml format")
---
 Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml +2 -2
index ad7d6fc49de5..eb02715bf691 100644
@@ -236,7 +236,7 @@ additionalProperties: false
 
 examples:
   - |
-    spmi {
+    pmic {
         #address-cells = <1>;
         #size-cells = <0>;
         /* VADC node */
@@ -281,7 +281,7 @@ examples:
     #include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
     #include <dt-bindings/interrupt-controller/irq.h>
 
-    spmi {
+    pmic {
         #address-cells = <1>;
         #size-cells = <0>;
         adc@3100 {
Signature · 1 line
2.41.0
#6 lore raw

PATCH 6/6 dt-bindings: iio/adc: qcom,spmi-vadc: clean up examples

In reply to Johan Hovold

Clean up the VADC examples by dropping a comment, dropping unnecessary labels and adding newline separators.

---
 .../devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml          | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml +3 -2
index eb02715bf691..40fa0710f1f0 100644
@@ -239,8 +239,8 @@ examples:
     pmic {
         #address-cells = <1>;
         #size-cells = <0>;
-        /* VADC node */
-        pmic_vadc: adc@3100 {
+
+        adc@3100 {
             compatible = "qcom,spmi-vadc";
             reg = <0x3100>;
             interrupts = <0x0 0x31 0x0 0x1>;
@@ -284,6 +284,7 @@ examples:
     pmic {
         #address-cells = <1>;
         #size-cells = <0>;
+
         adc@3100 {
             reg = <0x3100>;
             compatible = "qcom,spmi-adc7";
Signature · 1 line
2.41.0
maintainer
#7 lore raw
In reply to Johan Hovold
Quoted 4 lines · On Thu, 30 Nov 2023 18:16:22 +0100 Johan Hovold <[email protected]> wrote:

When reviewing the various SPMI PMIC bindings, I noticed that several examples were incorrect and misleading and could also use some cleanup.

This series addresses the iio/adc ones.

All look fine to me. Just waiting for the DT folk to have time to take a look.

Quoted 17 lines

Johan

Johan Hovold (6):
dt-bindings: iio/adc: qcom,spmi-iadc: fix reg description
dt-bindings: iio/adc: qcom,spmi-iadc: fix example node name
dt-bindings: iio/adc: qcom,spmi-iadc: clean up example
dt-bindings: iio/adc: qcom,spmi-rradc: clean up example
dt-bindings: iio/adc: qcom,spmi-vadc: fix example node names
dt-bindings: iio/adc: qcom,spmi-vadc: clean up examples

 .../devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml    | 10 ++++++----
 .../devicetree/bindings/iio/adc/qcom,spmi-rradc.yaml   |  4 ++--
 .../devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml    |  9 +++++----
 3 files changed, 13 insertions(+), 10 deletions(-)
Acked-by
#8 lore raw
Quoted 9 lines · Jonathan Cameron
Quoted 4 lines · On Thu, 30 Nov 2023 18:16:22 +0100 Johan Hovold <[email protected]> wrote:

When reviewing the various SPMI PMIC bindings, I noticed that several examples were incorrect and misleading and could also use some cleanup.

This series addresses the iio/adc ones.

All look fine to me. Just waiting for the DT folk to have time to take a look.

Yah, they all look grand to me.

Cheers,
Conor.

maintainer Applied
#9 lore raw
Quoted 9 lines · On Mon, 4 Dec 2023 16:25:34 +0000 Conor Dooley <[email protected]> wrote:
Quoted 8 lines · Jonathan Cameron
Quoted 4 lines · On Thu, 30 Nov 2023 18:16:22 +0100 Johan Hovold <[email protected]> wrote:

When reviewing the various SPMI PMIC bindings, I noticed that several examples were incorrect and misleading and could also use some cleanup.

This series addresses the iio/adc ones.

Quoted 7 lines
Quoted 1 line

All look fine to me. Just waiting for the DT folk to have time to take a look.

Yah, they all look grand to me.

Cheers,
Conor.

Applied. Thanks,

J