On 06/10/2013 10:38 AM, Lars-Peter Clausen wrote:
You don't need to describe the channels in devicetree, except setting the
"#io-channel-cells" property of your ADC node to 1. You also need to initialize
the of_node property of your iio_device's struct's 'dev' field to the your adc
node.
Aha. So right now I do have in my device tree:
adc {
ti,adc-channels = <4>;
};
for the producer ADC node. But this seems wrong. Correct would be
adctsc: adc {
ti,adc-channels = <4>;
#io-channel-cells = <1>;
};
And the consumer can then specify everything. This seems to be looking
good. And with this the map piece can die.
Thanks.
After that it's just a matter of using, e.g.
io-channels = <&adc 1>;
io-channel-names = "voltage";
in your consumer.
- Lars
Sebastian