Skip to contentSkip to conversation

dt-bindings: IIO: Drop wrong use of io-channel-ranges then drop it as well.

PATCH Applied Jonathan Cameron 6 participants 24 messages Nov 15, 2020 – Feb 21, 2021

Subsystems (5)
lore
Share & tools
lore

Jonathan Cameron

author maintainer
#0 lore raw

cover dt-bindings: IIO: Drop wrong use of io-channel-ranges then drop it as well.

From: Jonathan Cameron <[email protected]>

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(-)
Signature · 1 line
2.28.0
author maintainer
#1 lore raw

PATCH 1/9 dt-bindings:iio:qcom-spmi-vadc drop incorrect io-channel-ranges from example

From: Jonathan Cameron <[email protected]>

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.

Cc Andy Gross <[email protected]>
Cc Bjorn Andersson <[email protected]>
Cc Jishnu Prakash <[email protected]>
---
 Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml | 3 ---
 1 file changed, 3 deletions(-)
Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml +0 -3
index 7f4f827c57a7..95cc705b961b 100644
@@ -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 {
Signature · 1 line
2.28.0
#2 lore raw

Re: [PATCH 1/9] dt-bindings:iio:qcom-spmi-vadc drop incorrect io-channel-ranges from example

Quoted 10 lines · On Sun, 15 Nov 2020 19:29:43 +0000 Jonathan Cameron <[email protected]> wrote:

From: Jonathan Cameron <[email protected]>

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.

Quoted 5 lines
Cc Andy Gross <[email protected]>
Cc Bjorn Andersson <[email protected]>
Cc Jishnu Prakash <[email protected]>

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

Quoted 18 lines
---
 Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml | 3 ---
 1 file changed, 3 deletions(-)
Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml +0 -2
index 7f4f827c57a7..95cc705b961b 100644
@@ -48,8 +48,6 @@ properties:
     description:
       End of conversion interrupt.
 
-  io-channel-ranges: true
-
 required:
   - compatible
   - reg

Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml examples: · line 252

Quoted 7 lines
Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml +0 -1
@@ -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
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Reviewed-by on v1 1/9
#3 lore raw

Re: [PATCH 1/9] dt-bindings:iio:qcom-spmi-vadc drop incorrect io-channel-ranges from example

In reply to Jonathan Cameron
Quoted 10 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

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.

Quoted 5 lines
Cc Andy Gross <[email protected]>
Cc Bjorn Andersson <[email protected]>
Cc Jishnu Prakash <[email protected]>

Regards,
Bjorn

Quoted 28 lines
---
 Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml | 3 ---
 1 file changed, 3 deletions(-)
Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml +0 -3
index 7f4f827c57a7..95cc705b961b 100644
@@ -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 {
Signature · 1 line
2.28.0

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author maintainer
#4 lore raw

PATCH 2/9 dt-bindings:iio:samsung, exynos-adc: drop missuse of io-channel-ranges

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

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.

---
 .../devicetree/bindings/iio/adc/samsung,exynos-adc.yaml       | 4 ----
 1 file changed, 4 deletions(-)
Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml +0 -4
index 5ebb0ab250bd..c65921e66dc1 100644
@@ -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>;
Signature · 1 line
2.28.0
maintainer Reviewed-by on v1 2/9
#5 lore raw

Re: [PATCH 2/9] dt-bindings:iio:samsung,exynos-adc: drop missuse of io-channel-ranges

Quoted 7 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

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/

Best regards,
Krzysztof

author maintainer
#6 lore raw

Re: [PATCH 2/9] dt-bindings:iio:samsung,exynos-adc: drop missuse of io-channel-ranges

Quoted 7 lines · On Tue, 17 Nov 2020 10:49:11 +0100 Krzysztof Kozlowski <[email protected]> wrote:
Quoted 6 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

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.

Quoted 5 lines
Quoted 1 line

Recent changes to dt-schema result int his being reported as an error

s/int his/in this/

Thanks + applied.

Jonathan

Quoted 3 lines

Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author maintainer
#7 lore raw

PATCH 3/9 ARM: dts: Cygnus: Drop incorrect io-channel-ranges property.

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

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.

---
 arch/arm/boot/dts/bcm-cygnus.dtsi | 1 -
 1 file changed, 1 deletion(-)
arch/arm/boot/dts/bcm-cygnus.dtsi +0 -1
index dacaef2c14ca..0025c88f660c 100644
@@ -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";
Signature · 1 line
2.28.0
#8 lore raw

Re: [PATCH 3/9] ARM: dts: Cygnus: Drop incorrect io-channel-ranges property.

Quoted 10 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

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.

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 [email protected] was not copied.

Thanks you

Signature · 1 line
Florian
#9 lore raw

Re: [PATCH 3/9] ARM: dts: Cygnus: Drop incorrect io-channel-ranges property.

Quoted 12 lines · On Sun, 15 Nov 2020 19:23:21 -0800 Florian Fainelli <[email protected]>…
Quoted 10 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

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.

Quoted 8 lines

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.

Quoted 4 lines

PS: please make sure you run get_maintainer.pl, this patch did not land in our patchwork instance since [email protected] 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

Quoted 2 lines

Thanks you

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author maintainer
#10 lore raw

PATCH 4/9 ARM: dts: exynos: Drop incorrect use of io-channel-ranges

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

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.

Cc Krzysztof Kozlowski <[email protected]>
---
 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(-)
arch/arm/boot/dts/exynos3250.dtsi +0 -1
index a1e93fb7f694..2dcc6b848937 100644
@@ -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";
 		};
arch/arm/boot/dts/exynos4412.dtsi +0 -1
index e76881dc0014..a9df16015fef 100644
@@ -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";
 		};
arch/arm/boot/dts/exynos5250.dtsi +0 -1
index bd2d8835dd36..c43e99b6c1cc 100644
@@ -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";
 		};
arch/arm/boot/dts/exynos54xx.dtsi +0 -1
index 8aa5117e58ce..18a7559054dc 100644
@@ -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";
 		};
 
Signature · 1 line
2.28.0
maintainer Applied
#11 lore raw

Re: [PATCH 4/9] ARM: dts: exynos: Drop incorrect use of io-channel-ranges

Quoted 9 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

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.

Quoted 8 lines
Cc Krzysztof Kozlowski <[email protected]>
---
 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

author maintainer
#12 lore raw

PATCH 5/9 ARM: dts: s5pv210: Drop incorrect use of io-channel-ranges property.

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

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.

Cc Krzysztof Kozlowski <[email protected]>
---
 arch/arm/boot/dts/s5pv210.dtsi | 1 -
 1 file changed, 1 deletion(-)
arch/arm/boot/dts/s5pv210.dtsi +0 -1
index 2871351ab907..353ba7b09a0c 100644
@@ -149,7 +149,6 @@ adc: adc@e1700000 {
 			clocks = <&clocks CLK_TSADC>;
 			clock-names = "adc";
 			#io-channel-cells = <1>;
-			io-channel-ranges;
 			status = "disabled";
 		};
 
Signature · 1 line
2.28.0
maintainer Applied
#13 lore raw

Re: [PATCH 5/9] ARM: dts: s5pv210: Drop incorrect use of io-channel-ranges property.

Quoted 5 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

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

Quoted 8 lines

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

Cc Krzysztof Kozlowski <[email protected]>
---
 arch/arm/boot/dts/s5pv210.dtsi | 1 -
 1 file changed, 1 deletion(-)

Thanks, applied.

Best regards,
Krzysztof

author maintainer
#14 lore raw

PATCH 6/9 ARM: dts: qcom-pma8084: Drop incorrect use of io-channel-ranges

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

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.

Cc Andy Gross <[email protected]>
Cc Bjorn Andersson <[email protected]>
---
 arch/arm/boot/dts/qcom-pma8084.dtsi | 1 -
 1 file changed, 1 deletion(-)
arch/arm/boot/dts/qcom-pma8084.dtsi +0 -1
index ea1ca166165c..e921c5e93a5d 100644
@@ -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>;
Signature · 1 line
2.28.0
author maintainer
#15 lore raw

Re: [PATCH 6/9] ARM: dts: qcom-pma8084: Drop incorrect use of io-channel-ranges

Quoted 9 lines · On Sun, 15 Nov 2020 19:29:48 +0000 Jonathan Cameron <[email protected]> wrote:

From: Jonathan Cameron <[email protected]>

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.

Cc Andy Gross <[email protected]>
Cc Bjorn Andersson <[email protected]>

+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

Quoted 9 lines
---
 arch/arm/boot/dts/qcom-pma8084.dtsi | 1 -
 1 file changed, 1 deletion(-)
arch/arm/boot/dts/qcom-pma8084.dtsi +0 -0
index ea1ca166165c..e921c5e93a5d 100644

arch/arm/boot/dts/qcom-pma8084.dtsi pma8084_vadc: vadc@3100 { · line 73

Quoted 7 lines
arch/arm/boot/dts/qcom-pma8084.dtsi +0 -1
@@ -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
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#16 lore raw

Re: [PATCH 6/9] ARM: dts: qcom-pma8084: Drop incorrect use of io-channel-ranges

Quoted 9 lines · Jonathan Cameron
Quoted 6 lines · On Sun, 15 Nov 2020 19:29:48 +0000 Jonathan Cameron <[email protected]> wrote:

From: Jonathan Cameron <[email protected]>

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.

Quoted 9 lines
Quoted 3 lines
Cc Andy Gross <[email protected]>
Cc Bjorn Andersson <[email protected]>

+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

Quoted 18 lines

Thanks,

Jonathan

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

arch/arm/boot/dts/qcom-pma8084.dtsi pma8084_vadc: vadc@3100 { · line 73

Quoted 2 lines
arch/arm/boot/dts/qcom-pma8084.dtsi +0 -0
 			die_temp {
 				reg = <VADC_DIE_TEMP>;

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author maintainer
#17 lore raw

Re: [PATCH 6/9] ARM: dts: qcom-pma8084: Drop incorrect use of io-channel-ranges

Quoted 17 lines · On Sat, 28 Nov 2020 12:30:10 -0600 Bjorn Andersson…
Quoted 15 lines · Jonathan Cameron
Quoted 9 lines · On Sun, 15 Nov 2020 19:29:48 +0000 Jonathan Cameron <[email protected]> wrote:

From: Jonathan Cameron <[email protected]>

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.

Cc Andy Gross <[email protected]>
Cc Bjorn Andersson <[email protected]>

+CC Andy on an up to date email. Also added linux-arm-msm which I should have cc'd in the first place.

Quoted 6 lines
Quoted 3 lines

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

Quoted 25 lines

Regards,
Bjorn

Quoted 21 lines

Thanks,

Jonathan

Quoted 16 lines
---
 arch/arm/boot/dts/qcom-pma8084.dtsi | 1 -
 1 file changed, 1 deletion(-)
arch/arm/boot/dts/qcom-pma8084.dtsi +0 -1
index ea1ca166165c..e921c5e93a5d 100644
@@ -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
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author maintainer
#18 lore raw

PATCH 7/9 ARM: dts: s5pv210-aries: Drop unneeded io-channel-ranges property.

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

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.

Cc Krzysztof Kozlowski <[email protected]>
---
 arch/arm/boot/dts/s5pv210-aries.dtsi | 1 -
 1 file changed, 1 deletion(-)
arch/arm/boot/dts/s5pv210-aries.dtsi +0 -1
index bd4450dbdcb6..1ad9582db1ee 100644
@@ -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;
 	};
 };
 
Signature · 1 line
2.28.0
maintainer Applied
#19 lore raw

Re: [PATCH 7/9] ARM: dts: s5pv210-aries: Drop unneeded io-channel-ranges property.

Quoted 11 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

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.

Quoted 5 lines
Cc Krzysztof Kozlowski <[email protected]>
---
 arch/arm/boot/dts/s5pv210-aries.dtsi | 1 -
 1 file changed, 1 deletion(-)

Thanks, applied.

Best regards,
Krzysztof

author maintainer
#20 lore raw

PATCH 8/9 arm64: dts: exynos: Drop incorrect use of io-channel-ranges property.

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

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.

Cc Krzysztof Kozlowski <[email protected]>
---
 arch/arm64/boot/dts/exynos/exynos5433.dtsi | 1 -
 arch/arm64/boot/dts/exynos/exynos7.dtsi    | 1 -
 2 files changed, 2 deletions(-)
arch/arm64/boot/dts/exynos/exynos5433.dtsi +0 -1
index 8eb4576da8f3..ac33372f611b 100644
@@ -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";
 		};
 
arch/arm64/boot/dts/exynos/exynos7.dtsi +0 -1
index b9ed6a33e290..1f59e437e606 100644
@@ -567,7 +567,6 @@ adc: adc@13620000 {
 			clocks = <&clock_peric0 PCLK_ADCIF>;
 			clock-names = "adc";
 			#io-channel-cells = <1>;
-			io-channel-ranges;
 			status = "disabled";
 		};
 
Signature · 1 line
2.28.0
maintainer Applied
#21 lore raw

Re: [PATCH 8/9] arm64: dts: exynos: Drop incorrect use of io-channel-ranges property.

Quoted 8 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

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.

Quoted 6 lines
Cc Krzysztof Kozlowski <[email protected]>
---
 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

author maintainer
#22 lore raw

RFC PATCH 9/9 iio: inkern: Drop io-channel-ranges dt property support

In reply to Jonathan Cameron

From: Jonathan Cameron <[email protected]>

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.

Cc Guenter Roeck <[email protected]>
Cc Lars-Peter Clausen <[email protected]>
---
 drivers/iio/inkern.c | 49 +++++++++++++++-----------------------------
 1 file changed, 17 insertions(+), 32 deletions(-)
drivers/iio/inkern.c +17 -32
index ede99e0d5371..85a6f6103ee9 100644
@@ -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)
Signature · 1 line
2.28.0
author maintainer
#23 lore raw

Re: [RFC PATCH 9/9] iio: inkern: Drop io-channel-ranges dt property support

Quoted 12 lines · On Sun, 15 Nov 2020 19:29:51 +0000 Jonathan Cameron <[email protected]> wrote:

From: Jonathan Cameron <[email protected]>

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.

Quoted 5 lines

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.

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

Quoted 68 lines
Cc Guenter Roeck <[email protected]>
Cc Lars-Peter Clausen <[email protected]>
---
 drivers/iio/inkern.c | 49 +++++++++++++++-----------------------------
 1 file changed, 17 insertions(+), 32 deletions(-)
drivers/iio/inkern.c +17 -32
index ede99e0d5371..85a6f6103ee9 100644
@@ -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)