Thread (1 message) 1 message, 1 author, 2013-06-10

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

Possibly related (same subject, not in this thread)

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help