devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* <Query> How to read arguments from a gpio handle
@ 2012-08-03  3:39 Leela Krishna Amudala
       [not found] ` <CAL1wa8fdYCmTNpO=7v5S7o-Oi3nRD_7uUgCCVpM5TEP9ZUXedw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Leela Krishna Amudala @ 2012-08-03  3:39 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-08-03 15:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-03  3:39 <Query> How to read arguments from a gpio handle Leela Krishna Amudala
     [not found] ` <CAL1wa8fdYCmTNpO=7v5S7o-Oi3nRD_7uUgCCVpM5TEP9ZUXedw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-08-03  4:40   ` Daniel Mack
2012-08-03  5:28   ` Stephen Warren
     [not found]     ` <501B6190.9060101-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-08-03  8:47       ` Leela Krishna Amudala
     [not found]         ` <CAL1wa8cJpcnNZ_p6Ueu07GQ=m2zP6MpQHKqC4dKGDFVO7zRY2w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-08-03 15:34           ` Stephen Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).