<Query> How to read arguments from a gpio handle

Leela Krishna Amudala leelakrishna.a at gmail.com
Fri Aug 3 13:39:12 EST 2012


Hello,

Can some one please tell me how to read the args from the gpio handle

For example:
Consider    lcd-reset-gpio = <&gpx0 1 2 3 4>; as my phandle.

The 4 args in the above handle denotes

<[phandle of the gpio controller node]
      [pin number within the gpio controller]
      [mux function]
      [pull up/down]
      [drive strength]>

My intention is to read the "mux function" and "pull up/down" values
from the above handle and do the corresponding operations on that
particular gpio.

I tried using   of_get_named_gpio_flags(struct device_node *np, const
char *propname,
                           int index, enum of_gpio_flags *flags);
function and I always gets the flags value as '0' irrespective of the
values present in phandle of GPIO.

If somebody knows how to parse those values please throw some pointers on this.

Thanks in advance,
Leela krishna Amudala.


More information about the devicetree-discuss mailing list