* [PATCH v4] dt-bindings: iio: afe: voltage-divider: Add io-channel-cells
@ 2024-02-06 10:55 Naresh Solanki
2024-02-06 15:22 ` Conor Dooley
0 siblings, 1 reply; 3+ messages in thread
From: Naresh Solanki @ 2024-02-06 10:55 UTC (permalink / raw)
To: Peter Rosin, Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: mazziesaccount, Naresh Solanki, linux-iio, devicetree,
linux-kernel
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 <naresh.solanki@9elements.com>
---
.../devicetree/bindings/iio/afe/voltage-divider.yaml | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml b/Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml
index dddf97b50549..fd3c511e1beb 100644
--- a/Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml
+++ b/Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml
@@ -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
--
2.42.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v4] dt-bindings: iio: afe: voltage-divider: Add io-channel-cells
2024-02-06 10:55 [PATCH v4] dt-bindings: iio: afe: voltage-divider: Add io-channel-cells Naresh Solanki
@ 2024-02-06 15:22 ` Conor Dooley
2024-02-10 16:46 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Conor Dooley @ 2024-02-06 15:22 UTC (permalink / raw)
To: Naresh Solanki
Cc: Peter Rosin, Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, mazziesaccount, linux-iio,
devicetree, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2179 bytes --]
On Tue, Feb 06, 2024 at 04:25:01PM +0530, Naresh Solanki wrote:
> 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 <naresh.solanki@9elements.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
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.
> ---
> .../devicetree/bindings/iio/afe/voltage-divider.yaml | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml b/Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml
> index dddf97b50549..fd3c511e1beb 100644
> --- a/Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml
> +++ b/Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml
> @@ -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.
"In this case, the voltage before the divider is desired".
Perhaps Jonathan can make that change, provided you are okay with it.
Cheers,
Conor.
> + const: 1
> +
> output-ohms:
> description:
> Resistance Rout over which the output voltage is measured. See full-ohms.
>
> base-commit: 99bd3cb0d12e85d5114425353552121ec8f93adc
> --
> 2.42.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v4] dt-bindings: iio: afe: voltage-divider: Add io-channel-cells
2024-02-06 15:22 ` Conor Dooley
@ 2024-02-10 16:46 ` Jonathan Cameron
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2024-02-10 16:46 UTC (permalink / raw)
To: Conor Dooley
Cc: Naresh Solanki, Peter Rosin, Lars-Peter Clausen, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, mazziesaccount, linux-iio,
devicetree, linux-kernel
On Tue, 6 Feb 2024 15:22:29 +0000
Conor Dooley <conor@kernel.org> wrote:
> On Tue, Feb 06, 2024 at 04:25:01PM +0530, Naresh Solanki wrote:
> > 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 <naresh.solanki@9elements.com>
>
> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
>
> 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.
>
> > ---
> > .../devicetree/bindings/iio/afe/voltage-divider.yaml | 11 +++++++++++
> > 1 file changed, 11 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml b/Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml
> > index dddf97b50549..fd3c511e1beb 100644
> > --- a/Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml
> > +++ b/Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml
> > @@ -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.
>
> "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
>
> Cheers,
> Conor.
>
> > + const: 1
> > +
> > output-ohms:
> > description:
> > Resistance Rout over which the output voltage is measured. See full-ohms.
> >
> > base-commit: 99bd3cb0d12e85d5114425353552121ec8f93adc
> > --
> > 2.42.0
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-10 16:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-06 10:55 [PATCH v4] dt-bindings: iio: afe: voltage-divider: Add io-channel-cells Naresh Solanki
2024-02-06 15:22 ` Conor Dooley
2024-02-10 16:46 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox