Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 May 2014 21:48:52 +0200
From:      Sebastian Zietz <mail@sezi.eu>
To:        freebsd-embedded@freebsd.org
Subject:   GPIO interrupts on Carambola2
Message-ID:  <1A78D43F-9406-4DAB-8554-D8802DE8A3E1@sezi.eu>

next in thread | raw e-mail | index | archive | help
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=92t generate interrupts on it. In sys/mips/atheros/ar71xx_gpio.c I=92d=
 like to do something like:

331 static void
332 ar71xx_gpio_intr(void *arg)
333 {
334         struct ar71xx_gpio_softc *sc =3D 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=92t managed to come up with pin 22 as input either. I am thankful =
for any help!=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1A78D43F-9406-4DAB-8554-D8802DE8A3E1>