missinglinkelectronics / libuio

UserspaceIO helper library
GNU Lesser General Public License v2.1
30 stars 28 forks source link

Pinuxing for uios #8

Closed T721 closed 6 years ago

T721 commented 6 years ago

Hi @Linutronix

i have a question to a provided example of using the uio's. I have the following node in my devicetree to enable interrupts on my uio.

        uios {
                compatible = "simple-bus";
                #address-cells = <1>;
                #size-cells = <0>;

                lf112@0 {
                        compatible = "vendor,uio";
                        reg = <0>;
                        status = "okay";
                        interrupt-parent = <&gpio1>;
                        interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
                };

                lf111@1 {
                        compatible = "vendor,uio";
                        reg = <1>;
                        status = "okay";
                        interrupt-parent = <&gpio1>;
                        interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
                };
        };

....

&gpio1 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_gpio1>;
        status = "okay";
};

....

                pinctrl_gpio1: gpio1grp {
                        fsl,pins = <
                                MX6QDL_PAD_GPIO_0__GPIO1_IO00           0x1b0b0
                                MX6QDL_PAD_GPIO_1__GPIO1_IO01           0x1b0b0
                                MX6QDL_PAD_GPIO_3__GPIO1_IO03           0x1b0b0
                                MX6QDL_PAD_GPIO_7__GPIO1_IO07           0x1b0b0
                                MX6QDL_PAD_GPIO_8__GPIO1_IO08           0x1b0b0
                                MX6QDL_PAD_GPIO_9__GPIO1_IO09           0x1b0b0
                        >;
                };

in particular i question the lines with the command interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;

Does this mean, pin 3 on gpiobank 1 is installed as the interrupt which fires my uio_irqwait_timeout routine? Which pin on the pingrp is actual triggering the fd for the select?

manut commented 6 years ago

this is a generic device tree question and not related to libuio at all.