[RFC v2 2/7] IIO: Add bindings for simple sigma delta adc

Jonathan Cameron jic23 at kernel.org
Sun Mar 5 03:04:06 PST 2017


On 27/02/17 11:15, Arnaud Pouliquen wrote:
> Hello Rob,
> 
> Please find my answers in-line
> 
> Regards,
> 
> Arnaud
> 
> On 02/22/2017 04:17 PM, Rob Herring wrote:
>> On Mon, Feb 13, 2017 at 05:38:24PM +0100, Arnaud Pouliquen wrote:
>>> Add documentation of device tree bindings to support
>>> sigma delta modulator in IIO framework.
>>>
>>> Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen at st.com>
>>> ---
>>>  Documentation/devicetree/bindings/iio/adc/simple_sd_adc.txt | 13 +++++++++++++
>>>  1 file changed, 13 insertions(+)
>>>  create mode 100644 Documentation/devicetree/bindings/iio/adc/simple_sd_adc.txt
>>>
>>> diff --git a/Documentation/devicetree/bindings/iio/adc/simple_sd_adc.txt b/Documentation/devicetree/bindings/iio/adc/simple_sd_adc.txt
>>> new file mode 100644
>>> index 0000000..2b3968a
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/iio/adc/simple_sd_adc.txt
>>> @@ -0,0 +1,13 @@
>>> +Device-Tree bindings for simple sigma delta adc
>>
>> What makes it "simple"?
> "simple" sigma delta modulator are external chip that just converts
> analog signal in sigma delta modulation. No configuration needs.
> "Simple" is use to differentiate SD ADC that offers interfaces to
> activate some internal processing ( gain, offset compensation...)
My gut feeling would be to drop the term simple.  If device is more complex
it needs to be explicitly supported, hence will be named whatever!
> 
>>
>>> +
>>> +Required properties:
>>> +- compatible: should be "sd-modulator".
>>> +- #io-channel-cells = <1>: See the IIO bindings section "IIO consumers".
>>> +
>>> +Example node:
>>> +
>>> +	ads1202: simple_sd_adc at 0 {
>>
>> Is ads1202 the actual chip? Then it should be in the compatible list.
> I tried to define a generic device to support several SD modulator
> chips, inspired by ALSA "dmic-codec" device.
> I have none exhaustive list of chip that can be handled by the driver,
> but i found several devices that could match...
> That why i did not use chip name in compatible list.
> What should be the best way to do it?
Rob, would the fallback approach (I brought this up in  another branch of
this discussion) work here,

compatible = "ads1201", "sd-modulator'?

Main advantage is that people won't then lie in their board files just to
avoid changing the driver to introduce their new part.  They'll just
be less specific than would be ideal.
> 
>>
>> unit address without a reg prop is an error. The node name should be 
>> "adc".
>>
>>> +		compatible = "sd-modulator";
>>> +		#io-channel-cells = <1>;
>>> +		status = "okay";
>>
>> Drop status from examples.
>>
>>> +	};
>>> -- 
>>> 1.9.1
>>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 




More information about the linux-arm-kernel mailing list