diff mbox series

[v2,1/4] dt-bindings: iio: adc: add common-mode-channel dependency

Message ID 20240617-iio-adc-ad4695-v2-1-63ef6583f25d@baylibre.com (mailing list archive)
State Changes Requested
Headers show
Series iio: adc: ad4695: new driver for AD4695 and similar ADCs | expand

Commit Message

David Lechner June 17, 2024, 7:53 p.m. UTC
The common-mode-channel property is only used in conjunction with the
single-channel property. This patch adds a dependency so that we will
get a validation error if common-mode-channel is used without also
specifying single-channel.

Signed-off-by: David Lechner <dlechner@baylibre.com>
---

v2 changes:
* New patch
* Depends on recently applied patch [1]

[1]: https://lore.kernel.org/linux-iio/20240607-ad4111-v7-1-97e3855900a0@analog.com/
---
 Documentation/devicetree/bindings/iio/adc/adc.yaml | 3 +++
 1 file changed, 3 insertions(+)

Comments

David Lechner June 18, 2024, 7:47 p.m. UTC | #1
On 6/17/24 2:53 PM, David Lechner wrote:
> The common-mode-channel property is only used in conjunction with the
> single-channel property. This patch adds a dependency so that we will
> get a validation error if common-mode-channel is used without also
> specifying single-channel.

It turns out, this might not be a valid assumption.

See https://lore.kernel.org/linux-iio/20240617-iio-adc-ad4695-v2-1-63ef6583f25d@baylibre.com/T/#m7b921cf9a7deb4a4f02dd2f05668a3dd99232ee9

> 
> Signed-off-by: David Lechner <dlechner@baylibre.com>
> ---
> 
> v2 changes:
> * New patch
> * Depends on recently applied patch [1]
> 
> [1]: https://lore.kernel.org/linux-iio/20240607-ad4111-v7-1-97e3855900a0@analog.com/
> ---
>  Documentation/devicetree/bindings/iio/adc/adc.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adc.yaml b/Documentation/devicetree/bindings/iio/adc/adc.yaml
> index 8e7835cf36fd..5baef30104dd 100644
> --- a/Documentation/devicetree/bindings/iio/adc/adc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/adc.yaml
> @@ -80,4 +80,7 @@ anyOf:
>    - required:
>        - reg
>  
> +dependencies:
> +  common-mode-channel: [single-channel]
> +
>  additionalProperties: true
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/adc.yaml b/Documentation/devicetree/bindings/iio/adc/adc.yaml
index 8e7835cf36fd..5baef30104dd 100644
--- a/Documentation/devicetree/bindings/iio/adc/adc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adc.yaml
@@ -80,4 +80,7 @@  anyOf:
   - required:
       - reg
 
+dependencies:
+  common-mode-channel: [single-channel]
+
 additionalProperties: true