Device driver - parsing GPIOs from tree

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

 




I'm writing my own device driver for some GPIOs on my hardware. I?ve
successfully created the pins in the Device Tree, and in my driver I?ve 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux