dt-bindings: iio: afe: voltage-divider: Add io-channel-cells
Subsystems (3)
PATCH v4 1/1 dt-bindings: iio: afe: voltage-divider: Add io-channel-cells
Enable the voltage divider to both receive and provide measurement services by adding #io-channel-cells.
This is especially valuable in scenarios where an ADC has an analog frontend, like a voltage divider, and obtaining its raw value isn't interesting. It is desired to get the real voltage before the voltage divider.
--- .../devicetree/bindings/iio/afe/voltage-divider.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+)
Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml +11 -0
@@ -39,6 +39,17 @@ properties: description: | Channel node of a voltage io-channel. + '#io-channel-cells': + description: + In addition to consuming the measurement services of a voltage + output channel, the voltage divider can act as a provider of + measurement services to other devices. This is particularly + useful in scenarios wherein an ADC has an analog frontend, + such as a voltage divider, and then consuming its raw value + isn't interesting. It is desired to get the real voltage + before the voltage divider. + const: 1 + output-ohms: description: Resistance Rout over which the output voltage is measured. See full-ohms.
base-commit: 99bd3cb0d12e85d5114425353552121ec8f93adc
Signature · 1 line
2.42.0
Quoted 9 lines · Naresh Solanki
Enable the voltage divider to both receive and provide measurement services by adding #io-channel-cells.
This is especially valuable in scenarios where an ADC has an analog frontend, like a voltage divider, and obtaining its raw value isn't interesting. It is desired to get the real voltage before the voltage divider.
Signed-off-by Naresh Solanki <[email protected]>
Thanks for adding the example. I have one comment about the wording, cos the last sentence doesn't really make sense without something referring back to the scenario you describe.
Quoted 21 lines
--- .../devicetree/bindings/iio/afe/voltage-divider.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+)Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml +8
-0@@ -39,6 +39,17 @@ properties: description: | Channel node of a voltage io-channel. + '#io-channel-cells': + description: + In addition to consuming the measurement services of a voltage + output channel, the voltage divider can act as a provider of + measurement services to other devices. This is particularly + useful in scenarios wherein an ADC has an analog frontend, + such as a voltage divider, and then consuming its raw value + isn't interesting.
Quoted 2 lines
It is desired to get the real voltage
+ before the voltage divider.
"In this case, the voltage before the divider is desired".
Perhaps Jonathan can make that change, provided you are okay with it.
Cheers,
Conor.
Quoted 10 lines
Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml +2
-0+ const: 1 + output-ohms: description: Resistance Rout over which the output voltage is measured. See full-ohms.base-commit:
99bd3cb0d12e85d5114425353552121ec8f93adcSignature · 1 line
2.42.0
Jonathan Cameron
maintainerQuoted 38 lines · On Tue, 6 Feb 2024 15:22:29 +0000 Conor Dooley <[email protected]> wrote:
Quoted 9 lines · Naresh Solanki
Enable the voltage divider to both receive and provide measurement services by adding #io-channel-cells.
This is especially valuable in scenarios where an ADC has an analog frontend, like a voltage divider, and obtaining its raw value isn't interesting. It is desired to get the real voltage before the voltage divider.
Signed-off-by Naresh Solanki <[email protected]>Reviewed-by Conor Dooley <[email protected]>Thanks for adding the example. I have one comment about the wording, cos the last sentence doesn't really make sense without something referring back to the scenario you describe.
Quoted 20 lines
--- .../devicetree/bindings/iio/afe/voltage-divider.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+)Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml +8
-0@@ -39,6 +39,17 @@ properties: description: | Channel node of a voltage io-channel. + '#io-channel-cells': + description: + In addition to consuming the measurement services of a voltage + output channel, the voltage divider can act as a provider of + measurement services to other devices. This is particularly + useful in scenarios wherein an ADC has an analog frontend, + such as a voltage divider, and then consuming its raw value + isn't interesting.
Quoted 6 lines
Quoted 2 lines
It is desired to get the real voltage
+ before the voltage divider."In this case, the voltage before the divider is desired".
Perhaps Jonathan can make that change, provided you are okay with it.
I've made the change and applied this patch. Given it will only initially be pushed out for 0-day to take a look at it, feel free to shout if you'd prefer different wording from Conor's suggestion.
Thanks,
Jonathan
Quoted 14 lines
Cheers,
Conor.Quoted 10 lines
Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml +2
-0+ const: 1 + output-ohms: description: Resistance Rout over which the output voltage is measured. See full-ohms.base-commit:
99bd3cb0d12e85d5114425353552121ec8f93adcSignature · 1 line
2.42.0