GPIO interrupts on Carambola2
Sebastian Zietz
mail at sezi.eu
Wed May 7 20:20:18 UTC 2014
Hi all,
since I am not much into device driver programming jet I hope you can help me with my problem. I have a hardware button on GPIO pin 22 and can’t generate interrupts on it. In sys/mips/atheros/ar71xx_gpio.c I’d like to do something like:
331 static void
332 ar71xx_gpio_intr(void *arg)
333 {
334 struct ar71xx_gpio_softc *sc = arg;
335 GPIO_LOCK(sc);
336 /* TODO: something useful */
337 devctl_notify("GPIO", "pin22", "notify", NULL);
338 GPIO_UNLOCK(sc);
339 }
To get it working I tried this without success:
410 /* Configure all pins as input */
411 /* disable interrupts for all pins */
412 GPIO_WRITE(sc, AR71XX_GPIO_INT_MASK, 0);
413 GPIO_WRITE(sc, AR71XX_GPIO_INT_MASK, (1 << 22));
I didn’t managed to come up with pin 22 as input either. I am thankful for any help!
More information about the freebsd-embedded
mailing list