All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] dt-bindings: IIO: Drop wrong use of io-channel-ranges then drop it as well.
@ 2020-11-15 19:29 ` Jonathan Cameron
  0 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-15 19:29 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel; +Cc: robh+dt, Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Rob Herring pointed out that the recent addition of io-channel provider
consumer interfaces to the dt_schema repo [1] has highlighted some misuse of
this property.   It is also clear that we don't have any places where
it is actually needed.

There is at least 1 remaining instance of this in a txt file but that
gets cleaned up in patches already under review to convert that binding
to yaml.

1-2 fix up examples in dts schema where this is missued.
3-6,8 fix up places where the property was given for providers of io-channels
rather than consumers.
7 drops a consumer case where it doesn't seem to be needed
9 is an RFC to drop the support entirely if we don't have any known correct
users of this property outside mainline.  I'm willing to leave the code
in place is we can identify it being used, but still wish to deprecate
it and remote the property from examples and dt_schema.

All of these can go through relevant trees as there should be no
cross dependencies.

[1] https://github.com/devicetree-org/dt-schema/commit/170a908a2204838652407662d326f30cbeb87142

Jonathan Cameron (9):
  dt-bindings:iio:qcom-spmi-vadc drop incorrect io-channel-ranges from
    example
  dt-bindings:iio:samsung,exynos-adc: drop missuse of io-channel-ranges
  ARM: dts: Cygnus: Drop incorrect io-channel-ranges property.
  ARM: dts: exynos: Drop incorrect use of io-channel-ranges
  ARM: dts: s5pv210: Drop incorrect use of io-channel-ranges property.
  ARM: dts: qcom-pma8084: Drop incorrect use of io-channel-ranges
  ARM: dts: s5pv210-aries: Drop unneeded io-channel-ranges property.
  arm64: dts: exynos: Drop incorrect use of io-channel-ranges property.
  iio: inkern: Drop io-channel-ranges dt property support

 .../bindings/iio/adc/qcom,spmi-vadc.yaml      |  3 --
 .../bindings/iio/adc/samsung,exynos-adc.yaml  |  4 --
 arch/arm/boot/dts/bcm-cygnus.dtsi             |  1 -
 arch/arm/boot/dts/exynos3250.dtsi             |  1 -
 arch/arm/boot/dts/exynos4412.dtsi             |  1 -
 arch/arm/boot/dts/exynos5250.dtsi             |  1 -
 arch/arm/boot/dts/exynos54xx.dtsi             |  1 -
 arch/arm/boot/dts/qcom-pma8084.dtsi           |  1 -
 arch/arm/boot/dts/s5pv210-aries.dtsi          |  1 -
 arch/arm/boot/dts/s5pv210.dtsi                |  1 -
 arch/arm64/boot/dts/exynos/exynos5433.dtsi    |  1 -
 arch/arm64/boot/dts/exynos/exynos7.dtsi       |  1 -
 drivers/iio/inkern.c                          | 49 +++++++------------
 13 files changed, 17 insertions(+), 49 deletions(-)

-- 
2.28.0


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

* [PATCH 0/9] dt-bindings: IIO: Drop wrong use of io-channel-ranges then drop it as well.
@ 2020-11-15 19:29 ` Jonathan Cameron
  0 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-15 19:29 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel; +Cc: robh+dt, Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Rob Herring pointed out that the recent addition of io-channel provider
consumer interfaces to the dt_schema repo [1] has highlighted some misuse of
this property.   It is also clear that we don't have any places where
it is actually needed.

There is at least 1 remaining instance of this in a txt file but that
gets cleaned up in patches already under review to convert that binding
to yaml.

1-2 fix up examples in dts schema where this is missued.
3-6,8 fix up places where the property was given for providers of io-channels
rather than consumers.
7 drops a consumer case where it doesn't seem to be needed
9 is an RFC to drop the support entirely if we don't have any known correct
users of this property outside mainline.  I'm willing to leave the code
in place is we can identify it being used, but still wish to deprecate
it and remote the property from examples and dt_schema.

All of these can go through relevant trees as there should be no
cross dependencies.

[1] https://github.com/devicetree-org/dt-schema/commit/170a908a2204838652407662d326f30cbeb87142

Jonathan Cameron (9):
  dt-bindings:iio:qcom-spmi-vadc drop incorrect io-channel-ranges from
    example
  dt-bindings:iio:samsung,exynos-adc: drop missuse of io-channel-ranges
  ARM: dts: Cygnus: Drop incorrect io-channel-ranges property.
  ARM: dts: exynos: Drop incorrect use of io-channel-ranges
  ARM: dts: s5pv210: Drop incorrect use of io-channel-ranges property.
  ARM: dts: qcom-pma8084: Drop incorrect use of io-channel-ranges
  ARM: dts: s5pv210-aries: Drop unneeded io-channel-ranges property.
  arm64: dts: exynos: Drop incorrect use of io-channel-ranges property.
  iio: inkern: Drop io-channel-ranges dt property support

 .../bindings/iio/adc/qcom,spmi-vadc.yaml      |  3 --
 .../bindings/iio/adc/samsung,exynos-adc.yaml  |  4 --
 arch/arm/boot/dts/bcm-cygnus.dtsi             |  1 -
 arch/arm/boot/dts/exynos3250.dtsi             |  1 -
 arch/arm/boot/dts/exynos4412.dtsi             |  1 -
 arch/arm/boot/dts/exynos5250.dtsi             |  1 -
 arch/arm/boot/dts/exynos54xx.dtsi             |  1 -
 arch/arm/boot/dts/qcom-pma8084.dtsi           |  1 -
 arch/arm/boot/dts/s5pv210-aries.dtsi          |  1 -
 arch/arm/boot/dts/s5pv210.dtsi                |  1 -
 arch/arm64/boot/dts/exynos/exynos5433.dtsi    |  1 -
 arch/arm64/boot/dts/exynos/exynos7.dtsi       |  1 -
 drivers/iio/inkern.c                          | 49 +++++++------------
 13 files changed, 17 insertions(+), 49 deletions(-)

-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 1/9] dt-bindings:iio:qcom-spmi-vadc drop incorrect io-channel-ranges from example
  2020-11-15 19:29 ` Jonathan Cameron
@ 2020-11-15 19:29   ` Jonathan Cameron
  -1 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-15 19:29 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: robh+dt, Jonathan Cameron, Rob Herring, Andy Gross,
	Bjorn Andersson, Jishnu Prakash

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

io-channel-ranges is a property for io-channel consumers. Here
it is in an example of a provider of channels so doesn't do anything
useful.

Recent additions to dt-schema check this property is only provided
alongside io-channels which is not true here and hence an error is
reported.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reported-by: Rob Herring <robh@kernel.org>
Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Jishnu Prakash <jprakash@codeaurora.org>
---
 Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
index 7f4f827c57a7..95cc705b961b 100644
--- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
@@ -48,8 +48,6 @@ properties:
     description:
       End of conversion interrupt.
 
-  io-channel-ranges: true
-
 required:
   - compatible
   - reg
@@ -249,7 +247,6 @@ examples:
         #address-cells = <1>;
         #size-cells = <0>;
         #io-channel-cells = <1>;
-        io-channel-ranges;
 
         /* Channel node */
         adc-chan@39 {
-- 
2.28.0


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

* [PATCH 1/9] dt-bindings:iio:qcom-spmi-vadc drop incorrect io-channel-ranges from example
@ 2020-11-15 19:29   ` Jonathan Cameron
  0 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-15 19:29 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: Rob Herring, Jishnu Prakash, Andy Gross, Bjorn Andersson,
	robh+dt, Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

io-channel-ranges is a property for io-channel consumers. Here
it is in an example of a provider of channels so doesn't do anything
useful.

Recent additions to dt-schema check this property is only provided
alongside io-channels which is not true here and hence an error is
reported.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reported-by: Rob Herring <robh@kernel.org>
Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Jishnu Prakash <jprakash@codeaurora.org>
---
 Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
index 7f4f827c57a7..95cc705b961b 100644
--- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
@@ -48,8 +48,6 @@ properties:
     description:
       End of conversion interrupt.
 
-  io-channel-ranges: true
-
 required:
   - compatible
   - reg
@@ -249,7 +247,6 @@ examples:
         #address-cells = <1>;
         #size-cells = <0>;
         #io-channel-cells = <1>;
-        io-channel-ranges;
 
         /* Channel node */
         adc-chan@39 {
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/9] dt-bindings:iio:samsung,exynos-adc: drop missuse of io-channel-ranges
  2020-11-15 19:29 ` Jonathan Cameron
@ 2020-11-15 19:29   ` Jonathan Cameron
  -1 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-15 19:29 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: robh+dt, Jonathan Cameron, Rob Herring, Krzysztof Kozlowski

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

io-channel-ranges is a property for consumers of io-channels, not
providers.  Hence it is not relevant in this binding or the examples
given.

Recent changes to dt-schema result int his being reported as an error
as a dependency is enforced between this property and io-channels.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reported-by: Rob Herring <robh@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
---
 .../devicetree/bindings/iio/adc/samsung,exynos-adc.yaml       | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
index 5ebb0ab250bd..c65921e66dc1 100644
--- a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
@@ -49,8 +49,6 @@ properties:
   "#io-channel-cells":
     const: 1
 
-  io-channel-ranges: true
-
   vdd-supply: true
 
   samsung,syscon-phandle:
@@ -130,7 +128,6 @@ examples:
         reg = <0x12d10000 0x100>;
         interrupts = <0 106 0>;
         #io-channel-cells = <1>;
-        io-channel-ranges;
 
         clocks = <&clock 303>;
         clock-names = "adc";
@@ -156,7 +153,6 @@ examples:
         reg = <0x126C0000 0x100>;
         interrupts = <0 137 0>;
         #io-channel-cells = <1>;
-        io-channel-ranges;
 
         clocks = <&cmu CLK_TSADC>,
                  <&cmu CLK_SCLK_TSADC>;
-- 
2.28.0


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

* [PATCH 2/9] dt-bindings:iio:samsung, exynos-adc: drop missuse of io-channel-ranges
@ 2020-11-15 19:29   ` Jonathan Cameron
  0 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-15 19:29 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: Rob Herring, robh+dt, Krzysztof Kozlowski, Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

io-channel-ranges is a property for consumers of io-channels, not
providers.  Hence it is not relevant in this binding or the examples
given.

Recent changes to dt-schema result int his being reported as an error
as a dependency is enforced between this property and io-channels.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reported-by: Rob Herring <robh@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
---
 .../devicetree/bindings/iio/adc/samsung,exynos-adc.yaml       | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
index 5ebb0ab250bd..c65921e66dc1 100644
--- a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
@@ -49,8 +49,6 @@ properties:
   "#io-channel-cells":
     const: 1
 
-  io-channel-ranges: true
-
   vdd-supply: true
 
   samsung,syscon-phandle:
@@ -130,7 +128,6 @@ examples:
         reg = <0x12d10000 0x100>;
         interrupts = <0 106 0>;
         #io-channel-cells = <1>;
-        io-channel-ranges;
 
         clocks = <&clock 303>;
         clock-names = "adc";
@@ -156,7 +153,6 @@ examples:
         reg = <0x126C0000 0x100>;
         interrupts = <0 137 0>;
         #io-channel-cells = <1>;
-        io-channel-ranges;
 
         clocks = <&cmu CLK_TSADC>,
                  <&cmu CLK_SCLK_TSADC>;
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 3/9] ARM: dts: Cygnus: Drop incorrect io-channel-ranges property.
  2020-11-15 19:29 ` Jonathan Cameron
@ 2020-11-15 19:29   ` Jonathan Cameron
  -1 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-15 19:29 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: robh+dt, Jonathan Cameron, Florian Fainelli

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This property applies to consumers of io-channels.  In this case we
have a provider so the property is not used.

Not dt_schema will now detect this as an error due to a dependency
between this property and the io-channels property.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm/boot/dts/bcm-cygnus.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/boot/dts/bcm-cygnus.dtsi b/arch/arm/boot/dts/bcm-cygnus.dtsi
index dacaef2c14ca..0025c88f660c 100644
--- a/arch/arm/boot/dts/bcm-cygnus.dtsi
+++ b/arch/arm/boot/dts/bcm-cygnus.dtsi
@@ -591,7 +591,6 @@ touchscreen: touchscreen@180a6000 {
 		adc: adc@180a6000 {
 			compatible = "brcm,iproc-static-adc";
 			#io-channel-cells = <1>;
-			io-channel-ranges;
 			adc-syscon = <&ts_adc_syscon>;
 			clocks = <&asiu_clks BCM_CYGNUS_ASIU_ADC_CLK>;
 			clock-names = "tsc_clk";
-- 
2.28.0


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

* [PATCH 3/9] ARM: dts: Cygnus: Drop incorrect io-channel-ranges property.
@ 2020-11-15 19:29   ` Jonathan Cameron
  0 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-15 19:29 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: Florian Fainelli, robh+dt, Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This property applies to consumers of io-channels.  In this case we
have a provider so the property is not used.

Not dt_schema will now detect this as an error due to a dependency
between this property and the io-channels property.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm/boot/dts/bcm-cygnus.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/boot/dts/bcm-cygnus.dtsi b/arch/arm/boot/dts/bcm-cygnus.dtsi
index dacaef2c14ca..0025c88f660c 100644
--- a/arch/arm/boot/dts/bcm-cygnus.dtsi
+++ b/arch/arm/boot/dts/bcm-cygnus.dtsi
@@ -591,7 +591,6 @@ touchscreen: touchscreen@180a6000 {
 		adc: adc@180a6000 {
 			compatible = "brcm,iproc-static-adc";
 			#io-channel-cells = <1>;
-			io-channel-ranges;
 			adc-syscon = <&ts_adc_syscon>;
 			clocks = <&asiu_clks BCM_CYGNUS_ASIU_ADC_CLK>;
 			clock-names = "tsc_clk";
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 4/9] ARM: dts: exynos: Drop incorrect use of io-channel-ranges
  2020-11-15 19:29 ` Jonathan Cameron
@ 2020-11-15 19:29   ` Jonathan Cameron
  -1 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-15 19:29 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: robh+dt, Jonathan Cameron, Krzysztof Kozlowski

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This property is only relevant to consumers of io-channels, not providers.
All these dtsi files have it alongside #io-channel-cells which indicates
they are providers of io-channels, not consumers.

Note that dt_schema will now flag this up due to a dependency between
this property and io-channels.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
---
 arch/arm/boot/dts/exynos3250.dtsi | 1 -
 arch/arm/boot/dts/exynos4412.dtsi | 1 -
 arch/arm/boot/dts/exynos5250.dtsi | 1 -
 arch/arm/boot/dts/exynos54xx.dtsi | 1 -
 4 files changed, 4 deletions(-)

diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi
index a1e93fb7f694..2dcc6b848937 100644
--- a/arch/arm/boot/dts/exynos3250.dtsi
+++ b/arch/arm/boot/dts/exynos3250.dtsi
@@ -439,7 +439,6 @@ adc: adc@126c0000 {
 			clock-names = "adc", "sclk";
 			clocks = <&cmu CLK_TSADC>, <&cmu CLK_SCLK_TSADC>;
 			#io-channel-cells = <1>;
-			io-channel-ranges;
 			samsung,syscon-phandle = <&pmu_system_controller>;
 			status = "disabled";
 		};
diff --git a/arch/arm/boot/dts/exynos4412.dtsi b/arch/arm/boot/dts/exynos4412.dtsi
index e76881dc0014..a9df16015fef 100644
--- a/arch/arm/boot/dts/exynos4412.dtsi
+++ b/arch/arm/boot/dts/exynos4412.dtsi
@@ -274,7 +274,6 @@ adc: adc@126c0000 {
 			clocks = <&clock CLK_TSADC>;
 			clock-names = "adc";
 			#io-channel-cells = <1>;
-			io-channel-ranges;
 			samsung,syscon-phandle = <&pmu_system_controller>;
 			status = "disabled";
 		};
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index bd2d8835dd36..c43e99b6c1cc 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -844,7 +844,6 @@ adc: adc@12d10000 {
 			clocks = <&clock CLK_ADC>;
 			clock-names = "adc";
 			#io-channel-cells = <1>;
-			io-channel-ranges;
 			samsung,syscon-phandle = <&pmu_system_controller>;
 			status = "disabled";
 		};
diff --git a/arch/arm/boot/dts/exynos54xx.dtsi b/arch/arm/boot/dts/exynos54xx.dtsi
index 8aa5117e58ce..18a7559054dc 100644
--- a/arch/arm/boot/dts/exynos54xx.dtsi
+++ b/arch/arm/boot/dts/exynos54xx.dtsi
@@ -101,7 +101,6 @@ adc: adc@12d10000 {
 			reg = <0x12d10000 0x100>;
 			interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
 			#io-channel-cells = <1>;
-			io-channel-ranges;
 			status = "disabled";
 		};
 
-- 
2.28.0


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

* [PATCH 4/9] ARM: dts: exynos: Drop incorrect use of io-channel-ranges
@ 2020-11-15 19:29   ` Jonathan Cameron
  0 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-15 19:29 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: robh+dt, Krzysztof Kozlowski, Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This property is only relevant to consumers of io-channels, not providers.
All these dtsi files have it alongside #io-channel-cells which indicates
they are providers of io-channels, not consumers.

Note that dt_schema will now flag this up due to a dependency between
this property and io-channels.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
---
 arch/arm/boot/dts/exynos3250.dtsi | 1 -
 arch/arm/boot/dts/exynos4412.dtsi | 1 -
 arch/arm/boot/dts/exynos5250.dtsi | 1 -
 arch/arm/boot/dts/exynos54xx.dtsi | 1 -
 4 files changed, 4 deletions(-)

diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi
index a1e93fb7f694..2dcc6b848937 100644
--- a/arch/arm/boot/dts/exynos3250.dtsi
+++ b/arch/arm/boot/dts/exynos3250.dtsi
@@ -439,7 +439,6 @@ adc: adc@126c0000 {
 			clock-names = "adc", "sclk";
 			clocks = <&cmu CLK_TSADC>, <&cmu CLK_SCLK_TSADC>;
 			#io-channel-cells = <1>;
-			io-channel-ranges;
 			samsung,syscon-phandle = <&pmu_system_controller>;
 			status = "disabled";
 		};
diff --git a/arch/arm/boot/dts/exynos4412.dtsi b/arch/arm/boot/dts/exynos4412.dtsi
index e76881dc0014..a9df16015fef 100644
--- a/arch/arm/boot/dts/exynos4412.dtsi
+++ b/arch/arm/boot/dts/exynos4412.dtsi
@@ -274,7 +274,6 @@ adc: adc@126c0000 {
 			clocks = <&clock CLK_TSADC>;
 			clock-names = "adc";
 			#io-channel-cells = <1>;
-			io-channel-ranges;
 			samsung,syscon-phandle = <&pmu_system_controller>;
 			status = "disabled";
 		};
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index bd2d8835dd36..c43e99b6c1cc 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -844,7 +844,6 @@ adc: adc@12d10000 {
 			clocks = <&clock CLK_ADC>;
 			clock-names = "adc";
 			#io-channel-cells = <1>;
-			io-channel-ranges;
 			samsung,syscon-phandle = <&pmu_system_controller>;
 			status = "disabled";
 		};
diff --git a/arch/arm/boot/dts/exynos54xx.dtsi b/arch/arm/boot/dts/exynos54xx.dtsi
index 8aa5117e58ce..18a7559054dc 100644
--- a/arch/arm/boot/dts/exynos54xx.dtsi
+++ b/arch/arm/boot/dts/exynos54xx.dtsi
@@ -101,7 +101,6 @@ adc: adc@12d10000 {
 			reg = <0x12d10000 0x100>;
 			interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
 			#io-channel-cells = <1>;
-			io-channel-ranges;
 			status = "disabled";
 		};
 
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 5/9] ARM: dts: s5pv210: Drop incorrect use of io-channel-ranges property.
  2020-11-15 19:29 ` Jonathan Cameron
@ 2020-11-15 19:29   ` Jonathan Cameron
  -1 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-15 19:29 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: robh+dt, Jonathan Cameron, Krzysztof Kozlowski

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This property is relevant to consumers of io-channels.  Here it is
used by a provider.

dt_schema will now report and error as this property must be in the
same node as io-channels and it is not here.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
---
 arch/arm/boot/dts/s5pv210.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
index 2871351ab907..353ba7b09a0c 100644
--- a/arch/arm/boot/dts/s5pv210.dtsi
+++ b/arch/arm/boot/dts/s5pv210.dtsi
@@ -149,7 +149,6 @@ adc: adc@e1700000 {
 			clocks = <&clocks CLK_TSADC>;
 			clock-names = "adc";
 			#io-channel-cells = <1>;
-			io-channel-ranges;
 			status = "disabled";
 		};
 
-- 
2.28.0


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

* [PATCH 5/9] ARM: dts: s5pv210: Drop incorrect use of io-channel-ranges property.
@ 2020-11-15 19:29   ` Jonathan Cameron
  0 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-15 19:29 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: robh+dt, Krzysztof Kozlowski, Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This property is relevant to consumers of io-channels.  Here it is
used by a provider.

dt_schema will now report and error as this property must be in the
same node as io-channels and it is not here.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
---
 arch/arm/boot/dts/s5pv210.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
index 2871351ab907..353ba7b09a0c 100644
--- a/arch/arm/boot/dts/s5pv210.dtsi
+++ b/arch/arm/boot/dts/s5pv210.dtsi
@@ -149,7 +149,6 @@ adc: adc@e1700000 {
 			clocks = <&clocks CLK_TSADC>;
 			clock-names = "adc";
 			#io-channel-cells = <1>;
-			io-channel-ranges;
 			status = "disabled";
 		};
 
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 6/9] ARM: dts: qcom-pma8084: Drop incorrect use of io-channel-ranges
  2020-11-15 19:29 ` Jonathan Cameron
@ 2020-11-15 19:29   ` Jonathan Cameron
  -1 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-15 19:29 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: robh+dt, Jonathan Cameron, Andy Gross, Bjorn Andersson

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This property is used by io-channel consumers, not providers so should
not present here.  Note dt_schema will now detect this error as there
is a dependency between this property and io-channels.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 arch/arm/boot/dts/qcom-pma8084.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom-pma8084.dtsi b/arch/arm/boot/dts/qcom-pma8084.dtsi
index ea1ca166165c..e921c5e93a5d 100644
--- a/arch/arm/boot/dts/qcom-pma8084.dtsi
+++ b/arch/arm/boot/dts/qcom-pma8084.dtsi
@@ -68,7 +68,6 @@ pma8084_vadc: vadc@3100 {
 			#address-cells = <1>;
 			#size-cells = <0>;
 			#io-channel-cells = <1>;
-			io-channel-ranges;
 
 			die_temp {
 				reg = <VADC_DIE_TEMP>;
-- 
2.28.0


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

* [PATCH 6/9] ARM: dts: qcom-pma8084: Drop incorrect use of io-channel-ranges
@ 2020-11-15 19:29   ` Jonathan Cameron
  0 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-15 19:29 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: Andy Gross, robh+dt, Bjorn Andersson, Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This property is used by io-channel consumers, not providers so should
not present here.  Note dt_schema will now detect this error as there
is a dependency between this property and io-channels.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 arch/arm/boot/dts/qcom-pma8084.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom-pma8084.dtsi b/arch/arm/boot/dts/qcom-pma8084.dtsi
index ea1ca166165c..e921c5e93a5d 100644
--- a/arch/arm/boot/dts/qcom-pma8084.dtsi
+++ b/arch/arm/boot/dts/qcom-pma8084.dtsi
@@ -68,7 +68,6 @@ pma8084_vadc: vadc@3100 {
 			#address-cells = <1>;
 			#size-cells = <0>;
 			#io-channel-cells = <1>;
-			io-channel-ranges;
 
 			die_temp {
 				reg = <VADC_DIE_TEMP>;
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 7/9] ARM: dts: s5pv210-aries: Drop unneeded io-channel-ranges property.
  2020-11-15 19:29 ` Jonathan Cameron
@ 2020-11-15 19:29   ` Jonathan Cameron
  -1 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-15 19:29 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: robh+dt, Jonathan Cameron, Krzysztof Kozlowski

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This property is only useful if a node has children as it allows them
to then use io-channel properties in the parent.  Here there are no
children.

This is harmless, but we are planning to shortly drop this property
as it is rarely used correctly and there is little reason it would
ever be needed as we can just provide the io-channels property to
any child nodes that need it.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
---
 arch/arm/boot/dts/s5pv210-aries.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/boot/dts/s5pv210-aries.dtsi b/arch/arm/boot/dts/s5pv210-aries.dtsi
index bd4450dbdcb6..1ad9582db1ee 100644
--- a/arch/arm/boot/dts/s5pv210-aries.dtsi
+++ b/arch/arm/boot/dts/s5pv210-aries.dtsi
@@ -589,7 +589,6 @@ gp2a_shunt: current-sense-shunt {
 		io-channels = <&adc 9>;
 		shunt-resistor-micro-ohms = <47000000>; /* 47 ohms */
 		#io-channel-cells = <0>;
-		io-channel-ranges;
 	};
 };
 
-- 
2.28.0


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

* [PATCH 7/9] ARM: dts: s5pv210-aries: Drop unneeded io-channel-ranges property.
@ 2020-11-15 19:29   ` Jonathan Cameron
  0 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-15 19:29 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: robh+dt, Krzysztof Kozlowski, Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This property is only useful if a node has children as it allows them
to then use io-channel properties in the parent.  Here there are no
children.

This is harmless, but we are planning to shortly drop this property
as it is rarely used correctly and there is little reason it would
ever be needed as we can just provide the io-channels property to
any child nodes that need it.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
---
 arch/arm/boot/dts/s5pv210-aries.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/boot/dts/s5pv210-aries.dtsi b/arch/arm/boot/dts/s5pv210-aries.dtsi
index bd4450dbdcb6..1ad9582db1ee 100644
--- a/arch/arm/boot/dts/s5pv210-aries.dtsi
+++ b/arch/arm/boot/dts/s5pv210-aries.dtsi
@@ -589,7 +589,6 @@ gp2a_shunt: current-sense-shunt {
 		io-channels = <&adc 9>;
 		shunt-resistor-micro-ohms = <47000000>; /* 47 ohms */
 		#io-channel-cells = <0>;
-		io-channel-ranges;
 	};
 };
 
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 8/9] arm64: dts: exynos: Drop incorrect use of io-channel-ranges property.
  2020-11-15 19:29 ` Jonathan Cameron
@ 2020-11-15 19:29   ` Jonathan Cameron
  -1 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-15 19:29 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: robh+dt, Jonathan Cameron, Krzysztof Kozlowski

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This property is for consumers of io-channels. Here it is used in
providers of those channels.

Note dt_schema will currently flag this as an error due to a dependency
between this property and io-channels.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
---
 arch/arm64/boot/dts/exynos/exynos5433.dtsi | 1 -
 arch/arm64/boot/dts/exynos/exynos7.dtsi    | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
index 8eb4576da8f3..ac33372f611b 100644
--- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
@@ -1445,7 +1445,6 @@ adc: adc@14d10000 {
 			clock-names = "adc";
 			clocks = <&cmu_peric CLK_PCLK_ADCIF>;
 			#io-channel-cells = <1>;
-			io-channel-ranges;
 			status = "disabled";
 		};
 
diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi
index b9ed6a33e290..1f59e437e606 100644
--- a/arch/arm64/boot/dts/exynos/exynos7.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi
@@ -567,7 +567,6 @@ adc: adc@13620000 {
 			clocks = <&clock_peric0 PCLK_ADCIF>;
 			clock-names = "adc";
 			#io-channel-cells = <1>;
-			io-channel-ranges;
 			status = "disabled";
 		};
 
-- 
2.28.0


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

* [PATCH 8/9] arm64: dts: exynos: Drop incorrect use of io-channel-ranges property.
@ 2020-11-15 19:29   ` Jonathan Cameron
  0 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-15 19:29 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: robh+dt, Krzysztof Kozlowski, Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This property is for consumers of io-channels. Here it is used in
providers of those channels.

Note dt_schema will currently flag this as an error due to a dependency
between this property and io-channels.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
---
 arch/arm64/boot/dts/exynos/exynos5433.dtsi | 1 -
 arch/arm64/boot/dts/exynos/exynos7.dtsi    | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
index 8eb4576da8f3..ac33372f611b 100644
--- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
@@ -1445,7 +1445,6 @@ adc: adc@14d10000 {
 			clock-names = "adc";
 			clocks = <&cmu_peric CLK_PCLK_ADCIF>;
 			#io-channel-cells = <1>;
-			io-channel-ranges;
 			status = "disabled";
 		};
 
diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi
index b9ed6a33e290..1f59e437e606 100644
--- a/arch/arm64/boot/dts/exynos/exynos7.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi
@@ -567,7 +567,6 @@ adc: adc@13620000 {
 			clocks = <&clock_peric0 PCLK_ADCIF>;
 			clock-names = "adc";
 			#io-channel-cells = <1>;
-			io-channel-ranges;
 			status = "disabled";
 		};
 
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [RFC PATCH 9/9] iio: inkern: Drop io-channel-ranges dt property support
  2020-11-15 19:29 ` Jonathan Cameron
@ 2020-11-15 19:29   ` Jonathan Cameron
  -1 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-15 19:29 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: robh+dt, Jonathan Cameron, Guenter Roeck, Lars-Peter Clausen

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This property has been almost exclusively missused in mainline and
we don't actually have any instances of it being necessary.

As such Rob Herring suggested we just drop it and I can't immediately
see any reason to disagree.

If anyone has an out of tree dts file that makes use of this then let
me know.  I'm not against keeping the code, but documenting it as a
deprecated property not to be used in new dts files.

Note build tested only. If someone could give it a sanity check
on a platform that uses this interface that would be great.
If not I'll mock something up before applying this.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/inkern.c | 49 +++++++++++++++-----------------------------
 1 file changed, 17 insertions(+), 32 deletions(-)

diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
index ede99e0d5371..85a6f6103ee9 100644
--- a/drivers/iio/inkern.c
+++ b/drivers/iio/inkern.c
@@ -184,40 +184,25 @@ static struct iio_channel *of_iio_channel_get_by_name(struct device_node *np,
 						      const char *name)
 {
 	struct iio_channel *chan = NULL;
-
-	/* Walk up the tree of devices looking for a matching iio channel */
-	while (np) {
-		int index = 0;
-
-		/*
-		 * For named iio channels, first look up the name in the
-		 * "io-channel-names" property.  If it cannot be found, the
-		 * index will be an error code, and of_iio_channel_get()
-		 * will fail.
-		 */
-		if (name)
-			index = of_property_match_string(np, "io-channel-names",
+	int index = 0;
+
+	/*
+	 * For named iio channels, first look up the name in the
+	 * "io-channel-names" property.  If it cannot be found, the
+	 * index will be an error code, and of_iio_channel_get()
+	 * will fail.
+	 */
+	if (name)
+		index = of_property_match_string(np, "io-channel-names",
 							 name);
-		chan = of_iio_channel_get(np, index);
-		if (!IS_ERR(chan) || PTR_ERR(chan) == -EPROBE_DEFER)
-			break;
-		else if (name && index >= 0) {
-			pr_err("ERROR: could not get IIO channel %pOF:%s(%i)\n",
-				np, name ? name : "", index);
-			return NULL;
-		}
+	chan = of_iio_channel_get(np, index);
+	if (!IS_ERR(chan) || PTR_ERR(chan) == -EPROBE_DEFER)
+		return chan;
+	else if (name && index >= 0)
+		pr_err("ERROR: could not get IIO channel %pOF:%s(%i)\n",
+		       np, name ? name : "", index);
 
-		/*
-		 * No matching IIO channel found on this node.
-		 * If the parent node has a "io-channel-ranges" property,
-		 * then we can try one of its channels.
-		 */
-		np = np->parent;
-		if (np && !of_get_property(np, "io-channel-ranges", NULL))
-			return NULL;
-	}
-
-	return chan;
+	return NULL;
 }
 
 static struct iio_channel *of_iio_channel_get_all(struct device *dev)
-- 
2.28.0


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

* [RFC PATCH 9/9] iio: inkern: Drop io-channel-ranges dt property support
@ 2020-11-15 19:29   ` Jonathan Cameron
  0 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-15 19:29 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: robh+dt, Lars-Peter Clausen, Guenter Roeck, Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This property has been almost exclusively missused in mainline and
we don't actually have any instances of it being necessary.

As such Rob Herring suggested we just drop it and I can't immediately
see any reason to disagree.

If anyone has an out of tree dts file that makes use of this then let
me know.  I'm not against keeping the code, but documenting it as a
deprecated property not to be used in new dts files.

Note build tested only. If someone could give it a sanity check
on a platform that uses this interface that would be great.
If not I'll mock something up before applying this.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/inkern.c | 49 +++++++++++++++-----------------------------
 1 file changed, 17 insertions(+), 32 deletions(-)

diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
index ede99e0d5371..85a6f6103ee9 100644
--- a/drivers/iio/inkern.c
+++ b/drivers/iio/inkern.c
@@ -184,40 +184,25 @@ static struct iio_channel *of_iio_channel_get_by_name(struct device_node *np,
 						      const char *name)
 {
 	struct iio_channel *chan = NULL;
-
-	/* Walk up the tree of devices looking for a matching iio channel */
-	while (np) {
-		int index = 0;
-
-		/*
-		 * For named iio channels, first look up the name in the
-		 * "io-channel-names" property.  If it cannot be found, the
-		 * index will be an error code, and of_iio_channel_get()
-		 * will fail.
-		 */
-		if (name)
-			index = of_property_match_string(np, "io-channel-names",
+	int index = 0;
+
+	/*
+	 * For named iio channels, first look up the name in the
+	 * "io-channel-names" property.  If it cannot be found, the
+	 * index will be an error code, and of_iio_channel_get()
+	 * will fail.
+	 */
+	if (name)
+		index = of_property_match_string(np, "io-channel-names",
 							 name);
-		chan = of_iio_channel_get(np, index);
-		if (!IS_ERR(chan) || PTR_ERR(chan) == -EPROBE_DEFER)
-			break;
-		else if (name && index >= 0) {
-			pr_err("ERROR: could not get IIO channel %pOF:%s(%i)\n",
-				np, name ? name : "", index);
-			return NULL;
-		}
+	chan = of_iio_channel_get(np, index);
+	if (!IS_ERR(chan) || PTR_ERR(chan) == -EPROBE_DEFER)
+		return chan;
+	else if (name && index >= 0)
+		pr_err("ERROR: could not get IIO channel %pOF:%s(%i)\n",
+		       np, name ? name : "", index);
 
-		/*
-		 * No matching IIO channel found on this node.
-		 * If the parent node has a "io-channel-ranges" property,
-		 * then we can try one of its channels.
-		 */
-		np = np->parent;
-		if (np && !of_get_property(np, "io-channel-ranges", NULL))
-			return NULL;
-	}
-
-	return chan;
+	return NULL;
 }
 
 static struct iio_channel *of_iio_channel_get_all(struct device *dev)
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 3/9] ARM: dts: Cygnus: Drop incorrect io-channel-ranges property.
  2020-11-15 19:29   ` Jonathan Cameron
@ 2020-11-16  3:23     ` Florian Fainelli
  -1 siblings, 0 replies; 48+ messages in thread
From: Florian Fainelli @ 2020-11-16  3:23 UTC (permalink / raw)
  To: Jonathan Cameron, linux-iio, devicetree, linux-arm-kernel
  Cc: robh+dt, Jonathan Cameron



On 11/15/2020 11:29 AM, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This property applies to consumers of io-channels.  In this case we
> have a provider so the property is not used.
> 
> Not dt_schema will now detect this as an error due to a dependency
> between this property and the io-channels property.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Florian Fainelli <f.fainelli@gmail.com>

Applied to devicetree/next, with the second paragraph fixed to:

"""
Recent changes to dt-schema result int his being reported as an error
as a dependency is enforced between this property and io-channels.
""""

since it did not look like a correct sentence making sense otherwise.

PS: please make sure you run get_maintainer.pl, this patch did not land
in our patchwork instance since bcm-kernel-feedback-list@broadcom.com
was not copied.

Thanks you
-- 
Florian

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

* Re: [PATCH 3/9] ARM: dts: Cygnus: Drop incorrect io-channel-ranges property.
@ 2020-11-16  3:23     ` Florian Fainelli
  0 siblings, 0 replies; 48+ messages in thread
From: Florian Fainelli @ 2020-11-16  3:23 UTC (permalink / raw)
  To: Jonathan Cameron, linux-iio, devicetree, linux-arm-kernel
  Cc: robh+dt, Jonathan Cameron



On 11/15/2020 11:29 AM, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This property applies to consumers of io-channels.  In this case we
> have a provider so the property is not used.
> 
> Not dt_schema will now detect this as an error due to a dependency
> between this property and the io-channels property.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Florian Fainelli <f.fainelli@gmail.com>

Applied to devicetree/next, with the second paragraph fixed to:

"""
Recent changes to dt-schema result int his being reported as an error
as a dependency is enforced between this property and io-channels.
""""

since it did not look like a correct sentence making sense otherwise.

PS: please make sure you run get_maintainer.pl, this patch did not land
in our patchwork instance since bcm-kernel-feedback-list@broadcom.com
was not copied.

Thanks you
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 3/9] ARM: dts: Cygnus: Drop incorrect io-channel-ranges property.
  2020-11-16  3:23     ` Florian Fainelli
@ 2020-11-16  9:44       ` Jonathan Cameron
  -1 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-16  9:44 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Jonathan Cameron, linux-iio, devicetree, linux-arm-kernel, robh+dt

On Sun, 15 Nov 2020 19:23:21 -0800
Florian Fainelli <f.fainelli@gmail.com> wrote:

> On 11/15/2020 11:29 AM, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > This property applies to consumers of io-channels.  In this case we
> > have a provider so the property is not used.
> > 
> > Not dt_schema will now detect this as an error due to a dependency
> > between this property and the io-channels property.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Florian Fainelli <f.fainelli@gmail.com>  
> 
> Applied to devicetree/next, with the second paragraph fixed to:
> 
> """
> Recent changes to dt-schema result int his being reported as an error
> as a dependency is enforced between this property and io-channels.
> """"
> 
> since it did not look like a correct sentence making sense otherwise.
Oops. I shouldn't write patch descriptions on a Sunday evening.  Indeed
it was garbage.

> 
> PS: please make sure you run get_maintainer.pl, this patch did not land
> in our patchwork instance since bcm-kernel-feedback-list@broadcom.com
> was not copied.

Sorry, these cross tree patch series are a bit of a pain to deal with
but I should have picked up on that one.

Jonathan

> 
> Thanks you


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

* Re: [PATCH 3/9] ARM: dts: Cygnus: Drop incorrect io-channel-ranges property.
@ 2020-11-16  9:44       ` Jonathan Cameron
  0 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-16  9:44 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: linux-iio, devicetree, robh+dt, linux-arm-kernel, Jonathan Cameron

On Sun, 15 Nov 2020 19:23:21 -0800
Florian Fainelli <f.fainelli@gmail.com> wrote:

> On 11/15/2020 11:29 AM, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > This property applies to consumers of io-channels.  In this case we
> > have a provider so the property is not used.
> > 
> > Not dt_schema will now detect this as an error due to a dependency
> > between this property and the io-channels property.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Florian Fainelli <f.fainelli@gmail.com>  
> 
> Applied to devicetree/next, with the second paragraph fixed to:
> 
> """
> Recent changes to dt-schema result int his being reported as an error
> as a dependency is enforced between this property and io-channels.
> """"
> 
> since it did not look like a correct sentence making sense otherwise.
Oops. I shouldn't write patch descriptions on a Sunday evening.  Indeed
it was garbage.

> 
> PS: please make sure you run get_maintainer.pl, this patch did not land
> in our patchwork instance since bcm-kernel-feedback-list@broadcom.com
> was not copied.

Sorry, these cross tree patch series are a bit of a pain to deal with
but I should have picked up on that one.

Jonathan

> 
> Thanks you


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/9] dt-bindings:iio:samsung,exynos-adc: drop missuse of io-channel-ranges
  2020-11-15 19:29   ` [PATCH 2/9] dt-bindings:iio:samsung, exynos-adc: " Jonathan Cameron
@ 2020-11-17  9:49     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 48+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-17  9:49 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, devicetree, linux-arm-kernel, robh+dt,
	Jonathan Cameron, Rob Herring

On Sun, Nov 15, 2020 at 07:29:44PM +0000, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> io-channel-ranges is a property for consumers of io-channels, not
> providers.  Hence it is not relevant in this binding or the examples
> given.
> 
> Recent changes to dt-schema result int his being reported as an error

s/int his/in this/

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

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

* Re: [PATCH 2/9] dt-bindings:iio:samsung,exynos-adc: drop missuse of io-channel-ranges
@ 2020-11-17  9:49     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 48+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-17  9:49 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: devicetree, Rob Herring, linux-iio, robh+dt, Jonathan Cameron,
	linux-arm-kernel

On Sun, Nov 15, 2020 at 07:29:44PM +0000, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> io-channel-ranges is a property for consumers of io-channels, not
> providers.  Hence it is not relevant in this binding or the examples
> given.
> 
> Recent changes to dt-schema result int his being reported as an error

s/int his/in this/

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 4/9] ARM: dts: exynos: Drop incorrect use of io-channel-ranges
  2020-11-15 19:29   ` Jonathan Cameron
@ 2020-11-17 19:45     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 48+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-17 19:45 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, devicetree, linux-arm-kernel, robh+dt, Jonathan Cameron

On Sun, Nov 15, 2020 at 07:29:46PM +0000, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This property is only relevant to consumers of io-channels, not providers.
> All these dtsi files have it alongside #io-channel-cells which indicates
> they are providers of io-channels, not consumers.
> 
> Note that dt_schema will now flag this up due to a dependency between
> this property and io-channels.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  arch/arm/boot/dts/exynos3250.dtsi | 1 -
>  arch/arm/boot/dts/exynos4412.dtsi | 1 -
>  arch/arm/boot/dts/exynos5250.dtsi | 1 -
>  arch/arm/boot/dts/exynos54xx.dtsi | 1 -
>  4 files changed, 4 deletions(-)

Thanks, applied.

Best regards,
Krzysztof


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

* Re: [PATCH 4/9] ARM: dts: exynos: Drop incorrect use of io-channel-ranges
@ 2020-11-17 19:45     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 48+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-17 19:45 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, devicetree, robh+dt, linux-arm-kernel, Jonathan Cameron

On Sun, Nov 15, 2020 at 07:29:46PM +0000, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This property is only relevant to consumers of io-channels, not providers.
> All these dtsi files have it alongside #io-channel-cells which indicates
> they are providers of io-channels, not consumers.
> 
> Note that dt_schema will now flag this up due to a dependency between
> this property and io-channels.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  arch/arm/boot/dts/exynos3250.dtsi | 1 -
>  arch/arm/boot/dts/exynos4412.dtsi | 1 -
>  arch/arm/boot/dts/exynos5250.dtsi | 1 -
>  arch/arm/boot/dts/exynos54xx.dtsi | 1 -
>  4 files changed, 4 deletions(-)

Thanks, applied.

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 5/9] ARM: dts: s5pv210: Drop incorrect use of io-channel-ranges property.
  2020-11-15 19:29   ` Jonathan Cameron
@ 2020-11-17 19:46     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 48+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-17 19:46 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, devicetree, linux-arm-kernel, robh+dt, Jonathan Cameron

On Sun, Nov 15, 2020 at 07:29:47PM +0000, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This property is relevant to consumers of io-channels.  Here it is
> used by a provider.
> 
> dt_schema will now report and error as this property must be in the
> same node as io-channels and it is not here.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  arch/arm/boot/dts/s5pv210.dtsi | 1 -
>  1 file changed, 1 deletion(-)

Thanks, applied.

Best regards,
Krzysztof


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

* Re: [PATCH 5/9] ARM: dts: s5pv210: Drop incorrect use of io-channel-ranges property.
@ 2020-11-17 19:46     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 48+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-17 19:46 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, devicetree, robh+dt, linux-arm-kernel, Jonathan Cameron

On Sun, Nov 15, 2020 at 07:29:47PM +0000, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This property is relevant to consumers of io-channels.  Here it is
> used by a provider.
> 
> dt_schema will now report and error as this property must be in the
> same node as io-channels and it is not here.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  arch/arm/boot/dts/s5pv210.dtsi | 1 -
>  1 file changed, 1 deletion(-)

Thanks, applied.

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 7/9] ARM: dts: s5pv210-aries: Drop unneeded io-channel-ranges property.
  2020-11-15 19:29   ` Jonathan Cameron
@ 2020-11-17 19:47     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 48+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-17 19:47 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, devicetree, linux-arm-kernel, robh+dt, Jonathan Cameron

On Sun, Nov 15, 2020 at 07:29:49PM +0000, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This property is only useful if a node has children as it allows them
> to then use io-channel properties in the parent.  Here there are no
> children.
> 
> This is harmless, but we are planning to shortly drop this property
> as it is rarely used correctly and there is little reason it would
> ever be needed as we can just provide the io-channels property to
> any child nodes that need it.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  arch/arm/boot/dts/s5pv210-aries.dtsi | 1 -
>  1 file changed, 1 deletion(-)

Thanks, applied.

Best regards,
Krzysztof


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

* Re: [PATCH 7/9] ARM: dts: s5pv210-aries: Drop unneeded io-channel-ranges property.
@ 2020-11-17 19:47     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 48+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-17 19:47 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, devicetree, robh+dt, linux-arm-kernel, Jonathan Cameron

On Sun, Nov 15, 2020 at 07:29:49PM +0000, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This property is only useful if a node has children as it allows them
> to then use io-channel properties in the parent.  Here there are no
> children.
> 
> This is harmless, but we are planning to shortly drop this property
> as it is rarely used correctly and there is little reason it would
> ever be needed as we can just provide the io-channels property to
> any child nodes that need it.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  arch/arm/boot/dts/s5pv210-aries.dtsi | 1 -
>  1 file changed, 1 deletion(-)

Thanks, applied.

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 8/9] arm64: dts: exynos: Drop incorrect use of io-channel-ranges property.
  2020-11-15 19:29   ` Jonathan Cameron
@ 2020-11-17 19:48     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 48+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-17 19:48 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, devicetree, linux-arm-kernel, robh+dt, Jonathan Cameron

On Sun, Nov 15, 2020 at 07:29:50PM +0000, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This property is for consumers of io-channels. Here it is used in
> providers of those channels.
> 
> Note dt_schema will currently flag this as an error due to a dependency
> between this property and io-channels.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  arch/arm64/boot/dts/exynos/exynos5433.dtsi | 1 -
>  arch/arm64/boot/dts/exynos/exynos7.dtsi    | 1 -
>  2 files changed, 2 deletions(-)

Thanks, applied.

Best regards,
Krzysztof


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

* Re: [PATCH 8/9] arm64: dts: exynos: Drop incorrect use of io-channel-ranges property.
@ 2020-11-17 19:48     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 48+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-17 19:48 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, devicetree, robh+dt, linux-arm-kernel, Jonathan Cameron

On Sun, Nov 15, 2020 at 07:29:50PM +0000, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This property is for consumers of io-channels. Here it is used in
> providers of those channels.
> 
> Note dt_schema will currently flag this as an error due to a dependency
> between this property and io-channels.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  arch/arm64/boot/dts/exynos/exynos5433.dtsi | 1 -
>  arch/arm64/boot/dts/exynos/exynos7.dtsi    | 1 -
>  2 files changed, 2 deletions(-)

Thanks, applied.

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/9] dt-bindings:iio:qcom-spmi-vadc drop incorrect io-channel-ranges from example
  2020-11-15 19:29   ` Jonathan Cameron
@ 2020-11-28 15:33     ` Jonathan Cameron
  -1 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-28 15:33 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: robh+dt, Jonathan Cameron, Rob Herring, Andy Gross,
	Bjorn Andersson, Jishnu Prakash

On Sun, 15 Nov 2020 19:29:43 +0000
Jonathan Cameron <jic23@kernel.org> wrote:

> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> io-channel-ranges is a property for io-channel consumers. Here
> it is in an example of a provider of channels so doesn't do anything
> useful.
> 
> Recent additions to dt-schema check this property is only provided
> alongside io-channels which is not true here and hence an error is
> reported.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Reported-by: Rob Herring <robh@kernel.org>
> Cc: Andy Gross <agross@kernel.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Jishnu Prakash <jprakash@codeaurora.org>

I'm not usually keen on taking my own patches without review, but I don't want
to leave this obvious breakage in tree longer than necessary.

So I've applied this to the togreg branch of iio.git and pushed it out as
testing for the autobuilders to poke at it.

Note still time for last minute reviews as can rebase for next day or two.

Thanks,

Jonathan

> ---
>  Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
> index 7f4f827c57a7..95cc705b961b 100644
> --- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
> @@ -48,8 +48,6 @@ properties:
>      description:
>        End of conversion interrupt.
>  
> -  io-channel-ranges: true
> -
>  required:
>    - compatible
>    - reg
> @@ -249,7 +247,6 @@ examples:
>          #address-cells = <1>;
>          #size-cells = <0>;
>          #io-channel-cells = <1>;
> -        io-channel-ranges;
>  
>          /* Channel node */
>          adc-chan@39 {


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

* Re: [PATCH 1/9] dt-bindings:iio:qcom-spmi-vadc drop incorrect io-channel-ranges from example
@ 2020-11-28 15:33     ` Jonathan Cameron
  0 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-28 15:33 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: Rob Herring, Jishnu Prakash, Andy Gross, Bjorn Andersson,
	robh+dt, Jonathan Cameron

On Sun, 15 Nov 2020 19:29:43 +0000
Jonathan Cameron <jic23@kernel.org> wrote:

> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> io-channel-ranges is a property for io-channel consumers. Here
> it is in an example of a provider of channels so doesn't do anything
> useful.
> 
> Recent additions to dt-schema check this property is only provided
> alongside io-channels which is not true here and hence an error is
> reported.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Reported-by: Rob Herring <robh@kernel.org>
> Cc: Andy Gross <agross@kernel.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Jishnu Prakash <jprakash@codeaurora.org>

I'm not usually keen on taking my own patches without review, but I don't want
to leave this obvious breakage in tree longer than necessary.

So I've applied this to the togreg branch of iio.git and pushed it out as
testing for the autobuilders to poke at it.

Note still time for last minute reviews as can rebase for next day or two.

Thanks,

Jonathan

> ---
>  Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
> index 7f4f827c57a7..95cc705b961b 100644
> --- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
> @@ -48,8 +48,6 @@ properties:
>      description:
>        End of conversion interrupt.
>  
> -  io-channel-ranges: true
> -
>  required:
>    - compatible
>    - reg
> @@ -249,7 +247,6 @@ examples:
>          #address-cells = <1>;
>          #size-cells = <0>;
>          #io-channel-cells = <1>;
> -        io-channel-ranges;
>  
>          /* Channel node */
>          adc-chan@39 {


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/9] dt-bindings:iio:samsung,exynos-adc: drop missuse of io-channel-ranges
  2020-11-17  9:49     ` Krzysztof Kozlowski
@ 2020-11-28 15:35       ` Jonathan Cameron
  -1 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-28 15:35 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-iio, devicetree, linux-arm-kernel, robh+dt,
	Jonathan Cameron, Rob Herring

On Tue, 17 Nov 2020 10:49:11 +0100
Krzysztof Kozlowski <krzk@kernel.org> wrote:

> On Sun, Nov 15, 2020 at 07:29:44PM +0000, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > io-channel-ranges is a property for consumers of io-channels, not
> > providers.  Hence it is not relevant in this binding or the examples
> > given.
> > 
> > Recent changes to dt-schema result int his being reported as an error  
> 
> s/int his/in this/
> 
> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Thanks + applied.

Jonathan

> 
> Best regards,
> Krzysztof


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

* Re: [PATCH 2/9] dt-bindings:iio:samsung,exynos-adc: drop missuse of io-channel-ranges
@ 2020-11-28 15:35       ` Jonathan Cameron
  0 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-28 15:35 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: devicetree, Rob Herring, linux-iio, robh+dt, Jonathan Cameron,
	linux-arm-kernel

On Tue, 17 Nov 2020 10:49:11 +0100
Krzysztof Kozlowski <krzk@kernel.org> wrote:

> On Sun, Nov 15, 2020 at 07:29:44PM +0000, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > io-channel-ranges is a property for consumers of io-channels, not
> > providers.  Hence it is not relevant in this binding or the examples
> > given.
> > 
> > Recent changes to dt-schema result int his being reported as an error  
> 
> s/int his/in this/
> 
> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Thanks + applied.

Jonathan

> 
> Best regards,
> Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 6/9] ARM: dts: qcom-pma8084: Drop incorrect use of io-channel-ranges
  2020-11-15 19:29   ` Jonathan Cameron
@ 2020-11-28 15:37     ` Jonathan Cameron
  -1 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-28 15:37 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: robh+dt, Jonathan Cameron, Andy Gross, Bjorn Andersson, linux-arm-msm

On Sun, 15 Nov 2020 19:29:48 +0000
Jonathan Cameron <jic23@kernel.org> wrote:

> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This property is used by io-channel consumers, not providers so should
> not present here.  Note dt_schema will now detect this error as there
> is a dependency between this property and io-channels.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Andy Gross <andy.gross@linaro.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
+CC Andy on an up to date email. Also added linux-arm-msm
which I should have cc'd in the first place.

I've taken the yaml fix related to this so just a question of
cleaning up this loose end in the dtsi

Thanks,

Jonathan

> ---
>  arch/arm/boot/dts/qcom-pma8084.dtsi | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/qcom-pma8084.dtsi b/arch/arm/boot/dts/qcom-pma8084.dtsi
> index ea1ca166165c..e921c5e93a5d 100644
> --- a/arch/arm/boot/dts/qcom-pma8084.dtsi
> +++ b/arch/arm/boot/dts/qcom-pma8084.dtsi
> @@ -68,7 +68,6 @@ pma8084_vadc: vadc@3100 {
>  			#address-cells = <1>;
>  			#size-cells = <0>;
>  			#io-channel-cells = <1>;
> -			io-channel-ranges;
>  
>  			die_temp {
>  				reg = <VADC_DIE_TEMP>;


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

* Re: [PATCH 6/9] ARM: dts: qcom-pma8084: Drop incorrect use of io-channel-ranges
@ 2020-11-28 15:37     ` Jonathan Cameron
  0 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-28 15:37 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: linux-arm-msm, robh+dt, Bjorn Andersson, Andy Gross, Jonathan Cameron

On Sun, 15 Nov 2020 19:29:48 +0000
Jonathan Cameron <jic23@kernel.org> wrote:

> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This property is used by io-channel consumers, not providers so should
> not present here.  Note dt_schema will now detect this error as there
> is a dependency between this property and io-channels.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Andy Gross <andy.gross@linaro.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
+CC Andy on an up to date email. Also added linux-arm-msm
which I should have cc'd in the first place.

I've taken the yaml fix related to this so just a question of
cleaning up this loose end in the dtsi

Thanks,

Jonathan

> ---
>  arch/arm/boot/dts/qcom-pma8084.dtsi | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/qcom-pma8084.dtsi b/arch/arm/boot/dts/qcom-pma8084.dtsi
> index ea1ca166165c..e921c5e93a5d 100644
> --- a/arch/arm/boot/dts/qcom-pma8084.dtsi
> +++ b/arch/arm/boot/dts/qcom-pma8084.dtsi
> @@ -68,7 +68,6 @@ pma8084_vadc: vadc@3100 {
>  			#address-cells = <1>;
>  			#size-cells = <0>;
>  			#io-channel-cells = <1>;
> -			io-channel-ranges;
>  
>  			die_temp {
>  				reg = <VADC_DIE_TEMP>;


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/9] dt-bindings:iio:qcom-spmi-vadc drop incorrect io-channel-ranges from example
  2020-11-15 19:29   ` Jonathan Cameron
@ 2020-11-28 18:26     ` Bjorn Andersson
  -1 siblings, 0 replies; 48+ messages in thread
From: Bjorn Andersson @ 2020-11-28 18:26 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, devicetree, linux-arm-kernel, robh+dt,
	Jonathan Cameron, Rob Herring, Andy Gross, Jishnu Prakash

On Sun 15 Nov 13:29 CST 2020, Jonathan Cameron wrote:

> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> io-channel-ranges is a property for io-channel consumers. Here
> it is in an example of a provider of channels so doesn't do anything
> useful.
> 
> Recent additions to dt-schema check this property is only provided
> alongside io-channels which is not true here and hence an error is
> reported.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Reported-by: Rob Herring <robh@kernel.org>
> Cc: Andy Gross <agross@kernel.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Jishnu Prakash <jprakash@codeaurora.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
>  Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
> index 7f4f827c57a7..95cc705b961b 100644
> --- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
> @@ -48,8 +48,6 @@ properties:
>      description:
>        End of conversion interrupt.
>  
> -  io-channel-ranges: true
> -
>  required:
>    - compatible
>    - reg
> @@ -249,7 +247,6 @@ examples:
>          #address-cells = <1>;
>          #size-cells = <0>;
>          #io-channel-cells = <1>;
> -        io-channel-ranges;
>  
>          /* Channel node */
>          adc-chan@39 {
> -- 
> 2.28.0
> 

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

* Re: [PATCH 1/9] dt-bindings:iio:qcom-spmi-vadc drop incorrect io-channel-ranges from example
@ 2020-11-28 18:26     ` Bjorn Andersson
  0 siblings, 0 replies; 48+ messages in thread
From: Bjorn Andersson @ 2020-11-28 18:26 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: devicetree, Jishnu Prakash, Rob Herring, linux-iio, Andy Gross,
	robh+dt, Jonathan Cameron, linux-arm-kernel

On Sun 15 Nov 13:29 CST 2020, Jonathan Cameron wrote:

> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> io-channel-ranges is a property for io-channel consumers. Here
> it is in an example of a provider of channels so doesn't do anything
> useful.
> 
> Recent additions to dt-schema check this property is only provided
> alongside io-channels which is not true here and hence an error is
> reported.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Reported-by: Rob Herring <robh@kernel.org>
> Cc: Andy Gross <agross@kernel.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Jishnu Prakash <jprakash@codeaurora.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
>  Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
> index 7f4f827c57a7..95cc705b961b 100644
> --- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
> @@ -48,8 +48,6 @@ properties:
>      description:
>        End of conversion interrupt.
>  
> -  io-channel-ranges: true
> -
>  required:
>    - compatible
>    - reg
> @@ -249,7 +247,6 @@ examples:
>          #address-cells = <1>;
>          #size-cells = <0>;
>          #io-channel-cells = <1>;
> -        io-channel-ranges;
>  
>          /* Channel node */
>          adc-chan@39 {
> -- 
> 2.28.0
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 6/9] ARM: dts: qcom-pma8084: Drop incorrect use of io-channel-ranges
  2020-11-28 15:37     ` Jonathan Cameron
@ 2020-11-28 18:30       ` Bjorn Andersson
  -1 siblings, 0 replies; 48+ messages in thread
From: Bjorn Andersson @ 2020-11-28 18:30 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, devicetree, linux-arm-kernel, robh+dt,
	Jonathan Cameron, Andy Gross, linux-arm-msm

On Sat 28 Nov 09:37 CST 2020, Jonathan Cameron wrote:

> On Sun, 15 Nov 2020 19:29:48 +0000
> Jonathan Cameron <jic23@kernel.org> wrote:
> 
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > This property is used by io-channel consumers, not providers so should
> > not present here.  Note dt_schema will now detect this error as there
> > is a dependency between this property and io-channels.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Andy Gross <andy.gross@linaro.org>
> > Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> +CC Andy on an up to date email. Also added linux-arm-msm
> which I should have cc'd in the first place.
> 
> I've taken the yaml fix related to this so just a question of
> cleaning up this loose end in the dtsi
> 

Thanks Jonathan, I missed your patches earlier. The yaml change looks
correct and I've merged this for 5.11.

Regards,
Bjorn

> Thanks,
> 
> Jonathan
> 
> > ---
> >  arch/arm/boot/dts/qcom-pma8084.dtsi | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/arch/arm/boot/dts/qcom-pma8084.dtsi b/arch/arm/boot/dts/qcom-pma8084.dtsi
> > index ea1ca166165c..e921c5e93a5d 100644
> > --- a/arch/arm/boot/dts/qcom-pma8084.dtsi
> > +++ b/arch/arm/boot/dts/qcom-pma8084.dtsi
> > @@ -68,7 +68,6 @@ pma8084_vadc: vadc@3100 {
> >  			#address-cells = <1>;
> >  			#size-cells = <0>;
> >  			#io-channel-cells = <1>;
> > -			io-channel-ranges;
> >  
> >  			die_temp {
> >  				reg = <VADC_DIE_TEMP>;
> 

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

* Re: [PATCH 6/9] ARM: dts: qcom-pma8084: Drop incorrect use of io-channel-ranges
@ 2020-11-28 18:30       ` Bjorn Andersson
  0 siblings, 0 replies; 48+ messages in thread
From: Bjorn Andersson @ 2020-11-28 18:30 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: devicetree, linux-iio, linux-arm-msm, Andy Gross, robh+dt,
	Jonathan Cameron, linux-arm-kernel

On Sat 28 Nov 09:37 CST 2020, Jonathan Cameron wrote:

> On Sun, 15 Nov 2020 19:29:48 +0000
> Jonathan Cameron <jic23@kernel.org> wrote:
> 
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > This property is used by io-channel consumers, not providers so should
> > not present here.  Note dt_schema will now detect this error as there
> > is a dependency between this property and io-channels.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Andy Gross <andy.gross@linaro.org>
> > Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> +CC Andy on an up to date email. Also added linux-arm-msm
> which I should have cc'd in the first place.
> 
> I've taken the yaml fix related to this so just a question of
> cleaning up this loose end in the dtsi
> 

Thanks Jonathan, I missed your patches earlier. The yaml change looks
correct and I've merged this for 5.11.

Regards,
Bjorn

> Thanks,
> 
> Jonathan
> 
> > ---
> >  arch/arm/boot/dts/qcom-pma8084.dtsi | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/arch/arm/boot/dts/qcom-pma8084.dtsi b/arch/arm/boot/dts/qcom-pma8084.dtsi
> > index ea1ca166165c..e921c5e93a5d 100644
> > --- a/arch/arm/boot/dts/qcom-pma8084.dtsi
> > +++ b/arch/arm/boot/dts/qcom-pma8084.dtsi
> > @@ -68,7 +68,6 @@ pma8084_vadc: vadc@3100 {
> >  			#address-cells = <1>;
> >  			#size-cells = <0>;
> >  			#io-channel-cells = <1>;
> > -			io-channel-ranges;
> >  
> >  			die_temp {
> >  				reg = <VADC_DIE_TEMP>;
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 6/9] ARM: dts: qcom-pma8084: Drop incorrect use of io-channel-ranges
  2020-11-28 18:30       ` Bjorn Andersson
@ 2020-11-28 18:59         ` Jonathan Cameron
  -1 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-28 18:59 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: linux-iio, devicetree, linux-arm-kernel, robh+dt,
	Jonathan Cameron, Andy Gross, linux-arm-msm

On Sat, 28 Nov 2020 12:30:10 -0600
Bjorn Andersson <bjorn.andersson@linaro.org> wrote:

> On Sat 28 Nov 09:37 CST 2020, Jonathan Cameron wrote:
> 
> > On Sun, 15 Nov 2020 19:29:48 +0000
> > Jonathan Cameron <jic23@kernel.org> wrote:
> >   
> > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > 
> > > This property is used by io-channel consumers, not providers so should
> > > not present here.  Note dt_schema will now detect this error as there
> > > is a dependency between this property and io-channels.
> > > 
> > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > Cc: Andy Gross <andy.gross@linaro.org>
> > > Cc: Bjorn Andersson <bjorn.andersson@linaro.org>  
> > +CC Andy on an up to date email. Also added linux-arm-msm
> > which I should have cc'd in the first place.
> > 
> > I've taken the yaml fix related to this so just a question of
> > cleaning up this loose end in the dtsi
> >   
> 
> Thanks Jonathan, I missed your patches earlier. The yaml change looks
> correct and I've merged this for 5.11.

No problem. I've added your tag to the yaml change.

Thanks,

Jonathan


> 
> Regards,
> Bjorn
> 
> > Thanks,
> > 
> > Jonathan
> >   
> > > ---
> > >  arch/arm/boot/dts/qcom-pma8084.dtsi | 1 -
> > >  1 file changed, 1 deletion(-)
> > > 
> > > diff --git a/arch/arm/boot/dts/qcom-pma8084.dtsi b/arch/arm/boot/dts/qcom-pma8084.dtsi
> > > index ea1ca166165c..e921c5e93a5d 100644
> > > --- a/arch/arm/boot/dts/qcom-pma8084.dtsi
> > > +++ b/arch/arm/boot/dts/qcom-pma8084.dtsi
> > > @@ -68,7 +68,6 @@ pma8084_vadc: vadc@3100 {
> > >  			#address-cells = <1>;
> > >  			#size-cells = <0>;
> > >  			#io-channel-cells = <1>;
> > > -			io-channel-ranges;
> > >  
> > >  			die_temp {
> > >  				reg = <VADC_DIE_TEMP>;  
> >   


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

* Re: [PATCH 6/9] ARM: dts: qcom-pma8084: Drop incorrect use of io-channel-ranges
@ 2020-11-28 18:59         ` Jonathan Cameron
  0 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2020-11-28 18:59 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: devicetree, linux-iio, linux-arm-msm, Andy Gross, robh+dt,
	Jonathan Cameron, linux-arm-kernel

On Sat, 28 Nov 2020 12:30:10 -0600
Bjorn Andersson <bjorn.andersson@linaro.org> wrote:

> On Sat 28 Nov 09:37 CST 2020, Jonathan Cameron wrote:
> 
> > On Sun, 15 Nov 2020 19:29:48 +0000
> > Jonathan Cameron <jic23@kernel.org> wrote:
> >   
> > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > 
> > > This property is used by io-channel consumers, not providers so should
> > > not present here.  Note dt_schema will now detect this error as there
> > > is a dependency between this property and io-channels.
> > > 
> > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > Cc: Andy Gross <andy.gross@linaro.org>
> > > Cc: Bjorn Andersson <bjorn.andersson@linaro.org>  
> > +CC Andy on an up to date email. Also added linux-arm-msm
> > which I should have cc'd in the first place.
> > 
> > I've taken the yaml fix related to this so just a question of
> > cleaning up this loose end in the dtsi
> >   
> 
> Thanks Jonathan, I missed your patches earlier. The yaml change looks
> correct and I've merged this for 5.11.

No problem. I've added your tag to the yaml change.

Thanks,

Jonathan


> 
> Regards,
> Bjorn
> 
> > Thanks,
> > 
> > Jonathan
> >   
> > > ---
> > >  arch/arm/boot/dts/qcom-pma8084.dtsi | 1 -
> > >  1 file changed, 1 deletion(-)
> > > 
> > > diff --git a/arch/arm/boot/dts/qcom-pma8084.dtsi b/arch/arm/boot/dts/qcom-pma8084.dtsi
> > > index ea1ca166165c..e921c5e93a5d 100644
> > > --- a/arch/arm/boot/dts/qcom-pma8084.dtsi
> > > +++ b/arch/arm/boot/dts/qcom-pma8084.dtsi
> > > @@ -68,7 +68,6 @@ pma8084_vadc: vadc@3100 {
> > >  			#address-cells = <1>;
> > >  			#size-cells = <0>;
> > >  			#io-channel-cells = <1>;
> > > -			io-channel-ranges;
> > >  
> > >  			die_temp {
> > >  				reg = <VADC_DIE_TEMP>;  
> >   


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [RFC PATCH 9/9] iio: inkern: Drop io-channel-ranges dt property support
  2020-11-15 19:29   ` Jonathan Cameron
@ 2021-02-21 16:31     ` Jonathan Cameron
  -1 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2021-02-21 16:31 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: robh+dt, Jonathan Cameron, Guenter Roeck, Lars-Peter Clausen

On Sun, 15 Nov 2020 19:29:51 +0000
Jonathan Cameron <jic23@kernel.org> wrote:

> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This property has been almost exclusively missused in mainline and
> we don't actually have any instances of it being necessary.
> 
> As such Rob Herring suggested we just drop it and I can't immediately
> see any reason to disagree.
> 
> If anyone has an out of tree dts file that makes use of this then let
> me know.  I'm not against keeping the code, but documenting it as a
> deprecated property not to be used in new dts files.
> 
> Note build tested only. If someone could give it a sanity check
> on a platform that uses this interface that would be great.
> If not I'll mock something up before applying this.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Hi all,

I plan to apply this given no one has mentioned using it in out of tree
dts files.  If someone has time to sanity check I didn't actually mess
up the patch below that would be great!

Thanks,

Jonathan

> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> ---
>  drivers/iio/inkern.c | 49 +++++++++++++++-----------------------------
>  1 file changed, 17 insertions(+), 32 deletions(-)
> 
> diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
> index ede99e0d5371..85a6f6103ee9 100644
> --- a/drivers/iio/inkern.c
> +++ b/drivers/iio/inkern.c
> @@ -184,40 +184,25 @@ static struct iio_channel *of_iio_channel_get_by_name(struct device_node *np,
>  						      const char *name)
>  {
>  	struct iio_channel *chan = NULL;
> -
> -	/* Walk up the tree of devices looking for a matching iio channel */
> -	while (np) {
> -		int index = 0;
> -
> -		/*
> -		 * For named iio channels, first look up the name in the
> -		 * "io-channel-names" property.  If it cannot be found, the
> -		 * index will be an error code, and of_iio_channel_get()
> -		 * will fail.
> -		 */
> -		if (name)
> -			index = of_property_match_string(np, "io-channel-names",
> +	int index = 0;
> +
> +	/*
> +	 * For named iio channels, first look up the name in the
> +	 * "io-channel-names" property.  If it cannot be found, the
> +	 * index will be an error code, and of_iio_channel_get()
> +	 * will fail.
> +	 */
> +	if (name)
> +		index = of_property_match_string(np, "io-channel-names",
>  							 name);
> -		chan = of_iio_channel_get(np, index);
> -		if (!IS_ERR(chan) || PTR_ERR(chan) == -EPROBE_DEFER)
> -			break;
> -		else if (name && index >= 0) {
> -			pr_err("ERROR: could not get IIO channel %pOF:%s(%i)\n",
> -				np, name ? name : "", index);
> -			return NULL;
> -		}
> +	chan = of_iio_channel_get(np, index);
> +	if (!IS_ERR(chan) || PTR_ERR(chan) == -EPROBE_DEFER)
> +		return chan;
> +	else if (name && index >= 0)
> +		pr_err("ERROR: could not get IIO channel %pOF:%s(%i)\n",
> +		       np, name ? name : "", index);
>  
> -		/*
> -		 * No matching IIO channel found on this node.
> -		 * If the parent node has a "io-channel-ranges" property,
> -		 * then we can try one of its channels.
> -		 */
> -		np = np->parent;
> -		if (np && !of_get_property(np, "io-channel-ranges", NULL))
> -			return NULL;
> -	}
> -
> -	return chan;
> +	return NULL;
>  }
>  
>  static struct iio_channel *of_iio_channel_get_all(struct device *dev)


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

* Re: [RFC PATCH 9/9] iio: inkern: Drop io-channel-ranges dt property support
@ 2021-02-21 16:31     ` Jonathan Cameron
  0 siblings, 0 replies; 48+ messages in thread
From: Jonathan Cameron @ 2021-02-21 16:31 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-arm-kernel
  Cc: robh+dt, Lars-Peter Clausen, Guenter Roeck, Jonathan Cameron

On Sun, 15 Nov 2020 19:29:51 +0000
Jonathan Cameron <jic23@kernel.org> wrote:

> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This property has been almost exclusively missused in mainline and
> we don't actually have any instances of it being necessary.
> 
> As such Rob Herring suggested we just drop it and I can't immediately
> see any reason to disagree.
> 
> If anyone has an out of tree dts file that makes use of this then let
> me know.  I'm not against keeping the code, but documenting it as a
> deprecated property not to be used in new dts files.
> 
> Note build tested only. If someone could give it a sanity check
> on a platform that uses this interface that would be great.
> If not I'll mock something up before applying this.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Hi all,

I plan to apply this given no one has mentioned using it in out of tree
dts files.  If someone has time to sanity check I didn't actually mess
up the patch below that would be great!

Thanks,

Jonathan

> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> ---
>  drivers/iio/inkern.c | 49 +++++++++++++++-----------------------------
>  1 file changed, 17 insertions(+), 32 deletions(-)
> 
> diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
> index ede99e0d5371..85a6f6103ee9 100644
> --- a/drivers/iio/inkern.c
> +++ b/drivers/iio/inkern.c
> @@ -184,40 +184,25 @@ static struct iio_channel *of_iio_channel_get_by_name(struct device_node *np,
>  						      const char *name)
>  {
>  	struct iio_channel *chan = NULL;
> -
> -	/* Walk up the tree of devices looking for a matching iio channel */
> -	while (np) {
> -		int index = 0;
> -
> -		/*
> -		 * For named iio channels, first look up the name in the
> -		 * "io-channel-names" property.  If it cannot be found, the
> -		 * index will be an error code, and of_iio_channel_get()
> -		 * will fail.
> -		 */
> -		if (name)
> -			index = of_property_match_string(np, "io-channel-names",
> +	int index = 0;
> +
> +	/*
> +	 * For named iio channels, first look up the name in the
> +	 * "io-channel-names" property.  If it cannot be found, the
> +	 * index will be an error code, and of_iio_channel_get()
> +	 * will fail.
> +	 */
> +	if (name)
> +		index = of_property_match_string(np, "io-channel-names",
>  							 name);
> -		chan = of_iio_channel_get(np, index);
> -		if (!IS_ERR(chan) || PTR_ERR(chan) == -EPROBE_DEFER)
> -			break;
> -		else if (name && index >= 0) {
> -			pr_err("ERROR: could not get IIO channel %pOF:%s(%i)\n",
> -				np, name ? name : "", index);
> -			return NULL;
> -		}
> +	chan = of_iio_channel_get(np, index);
> +	if (!IS_ERR(chan) || PTR_ERR(chan) == -EPROBE_DEFER)
> +		return chan;
> +	else if (name && index >= 0)
> +		pr_err("ERROR: could not get IIO channel %pOF:%s(%i)\n",
> +		       np, name ? name : "", index);
>  
> -		/*
> -		 * No matching IIO channel found on this node.
> -		 * If the parent node has a "io-channel-ranges" property,
> -		 * then we can try one of its channels.
> -		 */
> -		np = np->parent;
> -		if (np && !of_get_property(np, "io-channel-ranges", NULL))
> -			return NULL;
> -	}
> -
> -	return chan;
> +	return NULL;
>  }
>  
>  static struct iio_channel *of_iio_channel_get_all(struct device *dev)


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-02-21 16:33 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-15 19:29 [PATCH 0/9] dt-bindings: IIO: Drop wrong use of io-channel-ranges then drop it as well Jonathan Cameron
2020-11-15 19:29 ` Jonathan Cameron
2020-11-15 19:29 ` [PATCH 1/9] dt-bindings:iio:qcom-spmi-vadc drop incorrect io-channel-ranges from example Jonathan Cameron
2020-11-15 19:29   ` Jonathan Cameron
2020-11-28 15:33   ` Jonathan Cameron
2020-11-28 15:33     ` Jonathan Cameron
2020-11-28 18:26   ` Bjorn Andersson
2020-11-28 18:26     ` Bjorn Andersson
2020-11-15 19:29 ` [PATCH 2/9] dt-bindings:iio:samsung,exynos-adc: drop missuse of io-channel-ranges Jonathan Cameron
2020-11-15 19:29   ` [PATCH 2/9] dt-bindings:iio:samsung, exynos-adc: " Jonathan Cameron
2020-11-17  9:49   ` [PATCH 2/9] dt-bindings:iio:samsung,exynos-adc: " Krzysztof Kozlowski
2020-11-17  9:49     ` Krzysztof Kozlowski
2020-11-28 15:35     ` Jonathan Cameron
2020-11-28 15:35       ` Jonathan Cameron
2020-11-15 19:29 ` [PATCH 3/9] ARM: dts: Cygnus: Drop incorrect io-channel-ranges property Jonathan Cameron
2020-11-15 19:29   ` Jonathan Cameron
2020-11-16  3:23   ` Florian Fainelli
2020-11-16  3:23     ` Florian Fainelli
2020-11-16  9:44     ` Jonathan Cameron
2020-11-16  9:44       ` Jonathan Cameron
2020-11-15 19:29 ` [PATCH 4/9] ARM: dts: exynos: Drop incorrect use of io-channel-ranges Jonathan Cameron
2020-11-15 19:29   ` Jonathan Cameron
2020-11-17 19:45   ` Krzysztof Kozlowski
2020-11-17 19:45     ` Krzysztof Kozlowski
2020-11-15 19:29 ` [PATCH 5/9] ARM: dts: s5pv210: Drop incorrect use of io-channel-ranges property Jonathan Cameron
2020-11-15 19:29   ` Jonathan Cameron
2020-11-17 19:46   ` Krzysztof Kozlowski
2020-11-17 19:46     ` Krzysztof Kozlowski
2020-11-15 19:29 ` [PATCH 6/9] ARM: dts: qcom-pma8084: Drop incorrect use of io-channel-ranges Jonathan Cameron
2020-11-15 19:29   ` Jonathan Cameron
2020-11-28 15:37   ` Jonathan Cameron
2020-11-28 15:37     ` Jonathan Cameron
2020-11-28 18:30     ` Bjorn Andersson
2020-11-28 18:30       ` Bjorn Andersson
2020-11-28 18:59       ` Jonathan Cameron
2020-11-28 18:59         ` Jonathan Cameron
2020-11-15 19:29 ` [PATCH 7/9] ARM: dts: s5pv210-aries: Drop unneeded io-channel-ranges property Jonathan Cameron
2020-11-15 19:29   ` Jonathan Cameron
2020-11-17 19:47   ` Krzysztof Kozlowski
2020-11-17 19:47     ` Krzysztof Kozlowski
2020-11-15 19:29 ` [PATCH 8/9] arm64: dts: exynos: Drop incorrect use of " Jonathan Cameron
2020-11-15 19:29   ` Jonathan Cameron
2020-11-17 19:48   ` Krzysztof Kozlowski
2020-11-17 19:48     ` Krzysztof Kozlowski
2020-11-15 19:29 ` [RFC PATCH 9/9] iio: inkern: Drop io-channel-ranges dt property support Jonathan Cameron
2020-11-15 19:29   ` Jonathan Cameron
2021-02-21 16:31   ` Jonathan Cameron
2021-02-21 16:31     ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.