2022-10-27 14:59:57

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 1/2] dt-bindings: iio: adc: qcom,spmi-vadc: simplify compatible enum

The second compatible item in oneOf is just an enum, not a list.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
index 8bac0c4120dd..a848df37db06 100644
--- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
@@ -22,13 +22,11 @@ properties:
- items:
- const: qcom,pms405-adc
- const: qcom,spmi-adc-rev2
-
- - items:
- - enum:
- - qcom,spmi-vadc
- - qcom,spmi-adc5
- - qcom,spmi-adc-rev2
- - qcom,spmi-adc7
+ - enum:
+ - qcom,spmi-vadc
+ - qcom,spmi-adc5
+ - qcom,spmi-adc-rev2
+ - qcom,spmi-adc7

reg:
description: VADC base address in the SPMI PMIC register map
--
2.34.1



2022-10-27 15:16:30

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 2/2] dt-bindings: iio: adc: qcom,spmi-vadc: extend example

Cleanup existing example (generic node name for spmi, use 4-space
indentation) and add example for ADCv7 copied from
Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/iio/adc/qcom,spmi-vadc.yaml | 94 ++++++++++++-------
1 file changed, 62 insertions(+), 32 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
index a848df37db06..f1522196042d 100644
--- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
@@ -236,42 +236,72 @@ additionalProperties: false

examples:
- |
- spmi_bus {
- #address-cells = <1>;
- #size-cells = <0>;
- /* VADC node */
- pmic_vadc: adc@3100 {
- compatible = "qcom,spmi-vadc";
- reg = <0x3100>;
- interrupts = <0x0 0x31 0x0 0x1>;
+ spmi {
#address-cells = <1>;
#size-cells = <0>;
- #io-channel-cells = <1>;
-
- /* Channel node */
- adc-chan@39 {
- reg = <0x39>;
- qcom,decimation = <512>;
- qcom,ratiometric;
- qcom,hw-settle-time = <200>;
- qcom,avg-samples = <1>;
- qcom,pre-scaling = <1 3>;
- };
-
- adc-chan@9 {
- reg = <0x9>;
- };
-
- adc-chan@a {
- reg = <0xa>;
+ /* VADC node */
+ pmic_vadc: adc@3100 {
+ compatible = "qcom,spmi-vadc";
+ reg = <0x3100>;
+ interrupts = <0x0 0x31 0x0 0x1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #io-channel-cells = <1>;
+
+ /* Channel node */
+ adc-chan@39 {
+ reg = <0x39>;
+ qcom,decimation = <512>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ qcom,avg-samples = <1>;
+ qcom,pre-scaling = <1 3>;
+ };
+
+ adc-chan@9 {
+ reg = <0x9>;
+ };
+
+ adc-chan@a {
+ reg = <0xa>;
+ };
+
+ adc-chan@e {
+ reg = <0xe>;
+ };
+
+ adc-chan@f {
+ reg = <0xf>;
+ };
};
+ };

- adc-chan@e {
- reg = <0xe>;
- };
+ - |
+ #include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
+ #include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
+ #include <dt-bindings/interrupt-controller/irq.h>

- adc-chan@f {
- reg = <0xf>;
+ spmi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ adc@3100 {
+ reg = <0x3100>;
+ compatible = "qcom,spmi-adc7";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #io-channel-cells = <1>;
+
+ /* Other properties are omitted */
+ xo-therm@44 {
+ reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ };
+
+ conn-therm@47 {
+ reg = <PM8350_ADC7_AMUX_THM4_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ };
};
- };
};
--
2.34.1


2022-10-31 16:47:39

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 2/2] dt-bindings: iio: adc: qcom,spmi-vadc: extend example


On Thu, 27 Oct 2022 10:34:11 -0400, Krzysztof Kozlowski wrote:
> Cleanup existing example (generic node name for spmi, use 4-space
> indentation) and add example for ADCv7 copied from
> Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> .../bindings/iio/adc/qcom,spmi-vadc.yaml | 94 ++++++++++++-------
> 1 file changed, 62 insertions(+), 32 deletions(-)
>

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

2022-10-31 16:49:30

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: iio: adc: qcom,spmi-vadc: simplify compatible enum


On Thu, 27 Oct 2022 10:34:10 -0400, Krzysztof Kozlowski wrote:
> The second compatible item in oneOf is just an enum, not a list.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> .../devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 deletions(-)
>

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

2022-11-06 12:30:33

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: iio: adc: qcom,spmi-vadc: simplify compatible enum

On Mon, 31 Oct 2022 11:33:47 -0500
Rob Herring <[email protected]> wrote:

> On Thu, 27 Oct 2022 10:34:10 -0400, Krzysztof Kozlowski wrote:
> > The second compatible item in oneOf is just an enum, not a list.
> >
> > Signed-off-by: Krzysztof Kozlowski <[email protected]>
> > ---
> > .../devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml | 12 +++++-------
> > 1 file changed, 5 insertions(+), 7 deletions(-)
> >
>
> Acked-by: Rob Herring <[email protected]>

Series applied to the togreg branch of iio.git.
Initially pushed out as testing to let 0-day poke at the whole tree before
I make a mess of linux-next.

Thanks,

Jonathan

2022-12-06 18:38:17

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH 2/2] dt-bindings: iio: adc: qcom,spmi-vadc: extend example

On Thu, 27 Oct 2022 10:34:11 -0400, Krzysztof Kozlowski wrote:
> Cleanup existing example (generic node name for spmi, use 4-space
> indentation) and add example for ADCv7 copied from
> Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml.
>
>

Applied, thanks!

[2/2] dt-bindings: iio: adc: qcom,spmi-vadc: extend example
commit: 74e903461b178faa5d0873254b77ee18fca5d059

Best regards,
--
Bjorn Andersson <[email protected]>

2022-12-06 18:39:19

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: iio: adc: qcom,spmi-vadc: simplify compatible enum

On Thu, 27 Oct 2022 10:34:10 -0400, Krzysztof Kozlowski wrote:
> The second compatible item in oneOf is just an enum, not a list.
>
>

Applied, thanks!

[1/2] dt-bindings: iio: adc: qcom,spmi-vadc: simplify compatible enum
(no commit info)
[2/2] dt-bindings: iio: adc: qcom,spmi-vadc: extend example
commit: 74e903461b178faa5d0873254b77ee18fca5d059

Best regards,
--
Bjorn Andersson <[email protected]>