public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] dt-bindings: iio/adc: qcom,spmi: fix up examples
@ 2023-11-30 17:16 Johan Hovold
  2023-11-30 17:16 ` [PATCH 1/6] dt-bindings: iio/adc: qcom,spmi-iadc: fix reg description Johan Hovold
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Johan Hovold @ 2023-11-30 17:16 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-iio, devicetree, linux-kernel, Johan Hovold

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(-)

-- 
2.41.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/6] dt-bindings: iio/adc: qcom,spmi-iadc: fix reg description
  2023-11-30 17:16 [PATCH 0/6] dt-bindings: iio/adc: qcom,spmi: fix up examples Johan Hovold
@ 2023-11-30 17:16 ` Johan Hovold
  2023-11-30 17:16 ` [PATCH 2/6] dt-bindings: iio/adc: qcom,spmi-iadc: fix example node name Johan Hovold
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Johan Hovold @ 2023-11-30 17:16 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-iio, devicetree, linux-kernel, Johan Hovold

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

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml
index 73def67fbe01..e0e0aa9d5d5b 100644
--- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml
@@ -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:
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/6] dt-bindings: iio/adc: qcom,spmi-iadc: fix example node name
  2023-11-30 17:16 [PATCH 0/6] dt-bindings: iio/adc: qcom,spmi: fix up examples Johan Hovold
  2023-11-30 17:16 ` [PATCH 1/6] dt-bindings: iio/adc: qcom,spmi-iadc: fix reg description Johan Hovold
@ 2023-11-30 17:16 ` Johan Hovold
  2023-11-30 17:16 ` [PATCH 3/6] dt-bindings: iio/adc: qcom,spmi-iadc: clean up example Johan Hovold
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Johan Hovold @ 2023-11-30 17:16 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-iio, devicetree, linux-kernel, 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.")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml
index e0e0aa9d5d5b..16889d2d3575 100644
--- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml
@@ -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 {
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/6] dt-bindings: iio/adc: qcom,spmi-iadc: clean up example
  2023-11-30 17:16 [PATCH 0/6] dt-bindings: iio/adc: qcom,spmi: fix up examples Johan Hovold
  2023-11-30 17:16 ` [PATCH 1/6] dt-bindings: iio/adc: qcom,spmi-iadc: fix reg description Johan Hovold
  2023-11-30 17:16 ` [PATCH 2/6] dt-bindings: iio/adc: qcom,spmi-iadc: fix example node name Johan Hovold
@ 2023-11-30 17:16 ` Johan Hovold
  2023-11-30 17:16 ` [PATCH 4/6] dt-bindings: iio/adc: qcom,spmi-rradc: " Johan Hovold
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Johan Hovold @ 2023-11-30 17:16 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-iio, devicetree, linux-kernel, Johan Hovold

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

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml          | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml
index 16889d2d3575..5ed893ef5c18 100644
--- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml
@@ -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>;
         };
     };
 ...
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/6] dt-bindings: iio/adc: qcom,spmi-rradc: clean up example
  2023-11-30 17:16 [PATCH 0/6] dt-bindings: iio/adc: qcom,spmi: fix up examples Johan Hovold
                   ` (2 preceding siblings ...)
  2023-11-30 17:16 ` [PATCH 3/6] dt-bindings: iio/adc: qcom,spmi-iadc: clean up example Johan Hovold
@ 2023-11-30 17:16 ` Johan Hovold
  2023-11-30 17:16 ` [PATCH 5/6] dt-bindings: iio/adc: qcom,spmi-vadc: fix example node names Johan Hovold
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Johan Hovold @ 2023-11-30 17:16 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-iio, devicetree, linux-kernel, Johan Hovold

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

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../devicetree/bindings/iio/adc/qcom,spmi-rradc.yaml          | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-rradc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-rradc.yaml
index b3a626389870..f39bc92c2b99 100644
--- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-rradc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-rradc.yaml
@@ -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>;
         };
     };
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/6] dt-bindings: iio/adc: qcom,spmi-vadc: fix example node names
  2023-11-30 17:16 [PATCH 0/6] dt-bindings: iio/adc: qcom,spmi: fix up examples Johan Hovold
                   ` (3 preceding siblings ...)
  2023-11-30 17:16 ` [PATCH 4/6] dt-bindings: iio/adc: qcom,spmi-rradc: " Johan Hovold
@ 2023-11-30 17:16 ` Johan Hovold
  2023-11-30 17:16 ` [PATCH 6/6] dt-bindings: iio/adc: qcom,spmi-vadc: clean up examples Johan Hovold
  2023-12-04 13:26 ` [PATCH 0/6] dt-bindings: iio/adc: qcom,spmi: fix " Jonathan Cameron
  6 siblings, 0 replies; 10+ messages in thread
From: Johan Hovold @ 2023-11-30 17:16 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-iio, devicetree, linux-kernel, 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")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
index ad7d6fc49de5..eb02715bf691 100644
--- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
@@ -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 {
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 6/6] dt-bindings: iio/adc: qcom,spmi-vadc: clean up examples
  2023-11-30 17:16 [PATCH 0/6] dt-bindings: iio/adc: qcom,spmi: fix up examples Johan Hovold
                   ` (4 preceding siblings ...)
  2023-11-30 17:16 ` [PATCH 5/6] dt-bindings: iio/adc: qcom,spmi-vadc: fix example node names Johan Hovold
@ 2023-11-30 17:16 ` Johan Hovold
  2023-12-04 13:26 ` [PATCH 0/6] dt-bindings: iio/adc: qcom,spmi: fix " Jonathan Cameron
  6 siblings, 0 replies; 10+ messages in thread
From: Johan Hovold @ 2023-11-30 17:16 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-iio, devicetree, linux-kernel, Johan Hovold

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

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml          | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
index eb02715bf691..40fa0710f1f0 100644
--- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
@@ -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";
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/6] dt-bindings: iio/adc: qcom,spmi: fix up examples
  2023-11-30 17:16 [PATCH 0/6] dt-bindings: iio/adc: qcom,spmi: fix up examples Johan Hovold
                   ` (5 preceding siblings ...)
  2023-11-30 17:16 ` [PATCH 6/6] dt-bindings: iio/adc: qcom,spmi-vadc: clean up examples Johan Hovold
@ 2023-12-04 13:26 ` Jonathan Cameron
  2023-12-04 16:25   ` Conor Dooley
  6 siblings, 1 reply; 10+ messages in thread
From: Jonathan Cameron @ 2023-12-04 13:26 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-iio, devicetree, linux-kernel

On Thu, 30 Nov 2023 18:16:22 +0100
Johan Hovold <johan+linaro@kernel.org> 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.
> 
> 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(-)
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/6] dt-bindings: iio/adc: qcom,spmi: fix up examples
  2023-12-04 13:26 ` [PATCH 0/6] dt-bindings: iio/adc: qcom,spmi: fix " Jonathan Cameron
@ 2023-12-04 16:25   ` Conor Dooley
  2023-12-04 17:07     ` Jonathan Cameron
  0 siblings, 1 reply; 10+ messages in thread
From: Conor Dooley @ 2023-12-04 16:25 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Johan Hovold, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-iio, devicetree,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 555 bytes --]

On Mon, Dec 04, 2023 at 01:26:24PM +0000, Jonathan Cameron wrote:
> On Thu, 30 Nov 2023 18:16:22 +0100
> Johan Hovold <johan+linaro@kernel.org> 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.
Acked-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/6] dt-bindings: iio/adc: qcom,spmi: fix up examples
  2023-12-04 16:25   ` Conor Dooley
@ 2023-12-04 17:07     ` Jonathan Cameron
  0 siblings, 0 replies; 10+ messages in thread
From: Jonathan Cameron @ 2023-12-04 17:07 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Johan Hovold, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-iio, devicetree,
	linux-kernel

On Mon, 4 Dec 2023 16:25:34 +0000
Conor Dooley <conor@kernel.org> wrote:

> On Mon, Dec 04, 2023 at 01:26:24PM +0000, Jonathan Cameron wrote:
> > On Thu, 30 Nov 2023 18:16:22 +0100
> > Johan Hovold <johan+linaro@kernel.org> 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.
> Acked-by: Conor Dooley <conor.dooley@microchip.com>
> 
> Cheers,
> Conor.
Applied.  Thanks,

J

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-12-04 17:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-30 17:16 [PATCH 0/6] dt-bindings: iio/adc: qcom,spmi: fix up examples Johan Hovold
2023-11-30 17:16 ` [PATCH 1/6] dt-bindings: iio/adc: qcom,spmi-iadc: fix reg description Johan Hovold
2023-11-30 17:16 ` [PATCH 2/6] dt-bindings: iio/adc: qcom,spmi-iadc: fix example node name Johan Hovold
2023-11-30 17:16 ` [PATCH 3/6] dt-bindings: iio/adc: qcom,spmi-iadc: clean up example Johan Hovold
2023-11-30 17:16 ` [PATCH 4/6] dt-bindings: iio/adc: qcom,spmi-rradc: " Johan Hovold
2023-11-30 17:16 ` [PATCH 5/6] dt-bindings: iio/adc: qcom,spmi-vadc: fix example node names Johan Hovold
2023-11-30 17:16 ` [PATCH 6/6] dt-bindings: iio/adc: qcom,spmi-vadc: clean up examples Johan Hovold
2023-12-04 13:26 ` [PATCH 0/6] dt-bindings: iio/adc: qcom,spmi: fix " Jonathan Cameron
2023-12-04 16:25   ` Conor Dooley
2023-12-04 17:07     ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox