Re: Query on IIO consumer driver and device tree

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

 



Hello,

Any pointers?.

Regards,
Sanchayan.

On Sat, Sep 27, 2014 at 12:24 PM, sanchayan maity
<victorascroft@xxxxxxxxx> wrote:
> Hello,
>
> There is an ADC driver following the IIO framework. I am using Kernel
> 3.17 rc5 in an embedded device. I am in the process of writing a
> "consumer" IIO touchscreen driver which uses the ADC channels.
>
> http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/iio/iio-bindings.txt
>
> I am following this document and my device tree node is as follows for
> the touchscreen driver.
>
> vf_touchctrl {
>         compatible = "vf-touch";
>         io-channels = "&adc0 0", &adc0 1",
>                              "&adc1 0", "&adc1 2";
>         pinctrl-names = "idle", "default";
>         pinctrl-0 = "&pinctrl_default";
>         pinctrl-1 = "&pinctrl_idle";
>         gpio-xp = "&gpio0 8 0"
>         .... /* Few more gpio entries like this */
> };
>
> In the touchscreen driver, i will be using the IIO consumer functions
> from http://lxr.free-electrons.com/source/include/linux/iio/consumer.h.
> When i call iio_channel_get_all(), i am expecting to get pointers to
> the four channels in order specified in the DT above. Is my
> understanding correct? Then specify these four channel pointers with
> iio_read_channel_raw() to get the ADC readings.
>
> My other question is related to the GPIO entry in the DT above. When
> using of_get_named_gpio(), i do it like below.
>
> int ret = of_get_named_gpio(node, "gpio-xp", 0);
>
> I do not get the correct values, but negative error values. Also, i
> can see a "argument longer than property" error for the device tree
> parsing in dmesg log. Can someone point out what i am doing wrong
> here?
>
> Thanks & Regards,
> Victor aka Sanchayan.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux