* Device driver - parsing GPIOs from tree
@ 2016-10-25 12:50 colin.helliwell-ZqAGQOxBGgIxoycv7ERPSQ
0 siblings, 0 replies; only message in thread
From: colin.helliwell-ZqAGQOxBGgIxoycv7ERPSQ @ 2016-10-25 12:50 UTC (permalink / raw)
To: devicetree-u79uwXL29TY76Z2rM5mHXA
I'm writing my own device driver for some GPIOs on my hardware. Ive
successfully created the pins in the Device Tree, and in my driver Ive been
able to find the pins in the device tree using 'of_get_named_gpio_flags()'
when they are at a top level (e.g. test-name shown below).
But for neatness I would prefer to group them hierarchically e.g.
rfctrl: rfctrl {
compatible = "wg2xx-rfctrl";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_rfctrl>;
status = "okay";
test-name = <&gpio4 25 0>;
jn {
jnProgN = <&gpio4 26 0>;
};
alt {
altGpio0 = <&gpio4 27 0 >;
altGpio1 = <&gpio4 28 0 >;
altGpio2 = <&gpio4 29 0 >;
altGpio3 = <&gpio4 30 0 >;
};
};
Is there a way to search within the subtree ("jn" or "alt"), or to descend
into it and then use 'of_get_named_gpio_flags()?
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-10-25 12:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-25 12:50 Device driver - parsing GPIOs from tree colin.helliwell-ZqAGQOxBGgIxoycv7ERPSQ
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).