Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/khorben-n900]: src/sys/dev/gpio Added a locator for interrupts on the GP...
details: https://anonhg.NetBSD.org/src/rev/7670a593273d
branches: khorben-n900
changeset: 786697:7670a593273d
user: khorben <khorben%NetBSD.org@localhost>
date: Fri May 10 01:20:04 2013 +0000
description:
Added a locator for interrupts on the GPIO bus. This allows ARM devices
(like the Nokia N900) to register interrupt handlers as specified within
their respective kernel configuration file.
XXX This change is not adequate because intr_establish() is a MD interface,
so it will have to be re-designed before merging to the main tree.
diffstat:
sys/dev/gpio/files.gpio | 4 ++--
sys/dev/gpio/gpio.c | 5 +++--
sys/dev/gpio/gpiovar.h | 3 ++-
3 files changed, 7 insertions(+), 5 deletions(-)
diffs (55 lines):
diff -r 948f1e44a2d0 -r 7670a593273d sys/dev/gpio/files.gpio
--- a/sys/dev/gpio/files.gpio Fri May 10 01:16:21 2013 +0000
+++ b/sys/dev/gpio/files.gpio Fri May 10 01:20:04 2013 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: files.gpio,v 1.10 2011/11/13 12:33:00 mbalmer Exp $
+# $NetBSD: files.gpio,v 1.10.18.1 2013/05/10 01:20:05 khorben Exp $
-define gpio {[offset = -1], [mask = 0], [flag = 0]}
+define gpio {[offset = -1], [mask = 0], [flag = 0], [intr = -1]}
device gpio: gpio
attach gpio at gpiobus
diff -r 948f1e44a2d0 -r 7670a593273d sys/dev/gpio/gpio.c
--- a/sys/dev/gpio/gpio.c Fri May 10 01:16:21 2013 +0000
+++ b/sys/dev/gpio/gpio.c Fri May 10 01:20:04 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gpio.c,v 1.51 2012/10/17 21:35:39 dyoung Exp $ */
+/* $NetBSD: gpio.c,v 1.51.6.1 2013/05/10 01:20:04 khorben Exp $ */
/* $OpenBSD: gpio.c,v 1.6 2006/01/14 12:33:49 grange Exp $ */
/*
@@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.51 2012/10/17 21:35:39 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.51.6.1 2013/05/10 01:20:04 khorben Exp $");
/*
* General Purpose Input/Output framework.
@@ -249,6 +249,7 @@
ga.ga_offset = cf->cf_loc[GPIOCF_OFFSET];
ga.ga_mask = cf->cf_loc[GPIOCF_MASK];
ga.ga_flags = cf->cf_loc[GPIOCF_FLAG];
+ ga.ga_intr = cf->cf_loc[GPIOCF_INTR];
namlen = strlen(cf->cf_name) + 1;
ga.ga_dvname = kmem_alloc(namlen, KM_NOSLEEP);
if (ga.ga_dvname == NULL)
diff -r 948f1e44a2d0 -r 7670a593273d sys/dev/gpio/gpiovar.h
--- a/sys/dev/gpio/gpiovar.h Fri May 10 01:16:21 2013 +0000
+++ b/sys/dev/gpio/gpiovar.h Fri May 10 01:20:04 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gpiovar.h,v 1.15 2011/11/13 13:20:02 mbalmer Exp $ */
+/* $NetBSD: gpiovar.h,v 1.15.18.1 2013/05/10 01:20:05 khorben Exp $ */
/* $OpenBSD: gpiovar.h,v 1.3 2006/01/14 12:33:49 grange Exp $ */
/*
@@ -71,6 +71,7 @@
uint32_t ga_mask;
char *ga_dvname;
uint32_t ga_flags;
+ int ga_intr;
};
/* GPIO pin map */
Home |
Main Index |
Thread Index |
Old Index