openwrt-misc
openwrt-misc copied to clipboard
gpio-irq-test in latest openwrt trunk issue
hi GBert,
i`m trying to test gpio-irq-test module in newest openwrt trunk. when i insmod, "gpio_to_irq" always return -6
root@OpenWrt:/lib/modules/4.9.77# insmod gpio-irq-test.ko gpio=10 [ 87.489478] requested GPIO 10 [ 87.492640] can't map GPIO 10 to IRQ : error -6 [ 87.497312] freeing GPIO 10 failed to insert gpio-irq-test.ko
i saw that in older openwrt sourcecode, gpio_to_irq is defined in ath79/gpio.c, : int gpio_to_irq(unsigned gpio) { if (gpio > ath79_gpio_count) { return -EINVAL; }
return ATH79_GPIO_IRQ_BASE + gpio;
} EXPORT_SYMBOL(gpio_to_irq);
but the newest trunk dosen`t have one.
is there a new way to make the gpio irq work?
Thanks
r