Re: [PATCH v3 5/8] dt-bindings: iio: add backend support to sd modulator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 03, 2024 at 06:05:30PM +0200, Olivier Moysan wrote:
> The legacy sd modulator driver registers the sigma delta modulator as
> an IIO channel provider. This implementation is not convenient when the
> SD modulator has to be cascaded with another IIO device. The scaling
> information is distributed across devices, which makes it difficult to
> report consistent scaling data on IIO devices.
> 
> The solution is to expose these cascaded IIO devices as an aggregate
> device, which report global scaling information.
> Add IIO backend support to SD modulator to allow scaling information
> management.
> 
> Signed-off-by: Olivier Moysan <olivier.moysan@xxxxxxxxxxx>
> ---
>  .../iio/adc/sigma-delta-modulator.yaml        | 24 +++++++++++++++++--
>  1 file changed, 22 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/sigma-delta-modulator.yaml b/Documentation/devicetree/bindings/iio/adc/sigma-delta-modulator.yaml
> index cab0d425eaa4..e34aa560da63 100644
> --- a/Documentation/devicetree/bindings/iio/adc/sigma-delta-modulator.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/sigma-delta-modulator.yaml
> @@ -18,18 +18,38 @@ properties:
>        - sd-modulator
>        - ads1201
>  
> +  '#io-backend-cells':
> +    const: 0
> +
>    '#io-channel-cells':
>      const: 0
>  
> +  reg:
> +    maxItems: 1
> +
> +  vref-supply:
> +    description: Phandle to the vref input analog reference voltage.
> +
>  required:
>    - compatible
> -  - '#io-channel-cells'
> +
> +allOf:

Don't need allOf

> +  - anyOf:
> +    - required: ['#io-backend-cells']
> +    - required: ['#io-channel-cells']
>  
>  additionalProperties: false
>  
>  examples:
>    - |
> -    ads1202: adc {
> +    // Exemple1: SD modulator is an IIO backend device
> +    ads1201_0 {
> +      compatible = "ti,ads1201";
> +      #io-backend-cells = <0>;
> +    };
> +
> +    //Example2: SD modulator is an IIO channel provider
> +    ads1201_1 {
>        compatible = "sd-modulator";
>        #io-channel-cells = <0>;

Don't you need some link between the nodes?

>      };
> -- 
> 2.25.1
> 




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux