diff options
| author | thorpej <thorpej@NetBSD.org> | 2018-05-19 14:15:39 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 2018-05-19 14:15:39 +0000 |
| commit | a69bf63cf2f9e307afba3ea73601c901aa06a7d0 (patch) | |
| tree | 3d39072708c2d8109b868a3b1a8e0f801d5a8d6e /sys/modules | |
| parent | 396f0ede92f5fac9bea639bb2c7da80d5744388a (diff) | |
Add an example "gpioirq" driver that demonstrates interrupts on GPIO
pins. Will be enhanced in the future to support sending events to
user space on edge-triggered interrupt events.
Based on initial work by Brad Spencer.
PR kern/51676
Diffstat (limited to 'sys/modules')
| -rw-r--r-- | sys/modules/Makefile | 3 | ||||
| -rw-r--r-- | sys/modules/gpioirq/Makefile | 13 | ||||
| -rw-r--r-- | sys/modules/gpioirq/gpioirq.ioconf | 8 |
3 files changed, 23 insertions, 1 deletions
diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 372f3a140a4..b49f0f65d8a 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.202 2018/02/26 07:29:24 pgoyette Exp $ +# $NetBSD: Makefile,v 1.203 2018/05/19 14:15:40 thorpej Exp $ .include <bsd.own.mk> @@ -47,6 +47,7 @@ SUBDIR+= gpio SUBDIR+= gpioiic SUBDIR+= gpioow SUBDIR+= gpiosim +SUBDIR+= gpioirq SUBDIR+= hfs SUBDIR+= hythygtemp SUBDIR+= si70xxtemp diff --git a/sys/modules/gpioirq/Makefile b/sys/modules/gpioirq/Makefile new file mode 100644 index 00000000000..f5b7762f669 --- /dev/null +++ b/sys/modules/gpioirq/Makefile @@ -0,0 +1,13 @@ +# $NetBSD: Makefile,v 1.1 2018/05/19 14:15:40 thorpej Exp $ + +.include "../Makefile.inc" + +.PATH: ${S}/dev/gpio + +KMOD= gpioirq +IOCONF= gpioirq.ioconf +SRCS= gpioirq.c + +CPPFLAGS+= -I${S}/gpio + +.include <bsd.kmodule.mk> diff --git a/sys/modules/gpioirq/gpioirq.ioconf b/sys/modules/gpioirq/gpioirq.ioconf new file mode 100644 index 00000000000..d74b98881e7 --- /dev/null +++ b/sys/modules/gpioirq/gpioirq.ioconf @@ -0,0 +1,8 @@ +# $NetBSD: gpioirq.ioconf,v 1.1 2018/05/19 14:15:40 thorpej Exp $ + +ioconf gpioirq + +include "conf/files" + +pseudo-root gpio* +gpioirq* at gpio? offset ? mask ? flag ? |
