Re: [PATCH 12/22] iio/ti_tscadc: Update with IIO map interface

From
Sebastian Andrzej Siewior <hidden>
Date
2013-06-10 09:15:33
Also in
linux-iio
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
Thread (1 message) 1 message, 1 author, last reply 2013-06-10
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help