summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2004-11-22 15:37:43 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2004-11-22 15:37:43 +0000
commit5cf841df774555e30a0f5eddb5e8eadef61dfc1f (patch)
treee2aa6bc52fb524b3b8eade0b4abf11e732fbb9d1
parent7ff3a7f919bafe07c2b6b1a13e8b3a105412271b (diff)
added detach function to support hotpluggable gpios.
ok grange@
-rw-r--r--sys/dev/gpio/gpio.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/gpio/gpio.c b/sys/dev/gpio/gpio.c
index 42bad4f66ff..880beba48d2 100644
--- a/sys/dev/gpio/gpio.c
+++ b/sys/dev/gpio/gpio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gpio.c,v 1.2 2004/09/15 17:47:52 grange Exp $ */
+/* $OpenBSD: gpio.c,v 1.3 2004/11/22 15:37:42 reyk Exp $ */
/*
* Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org>
*
@@ -40,13 +40,15 @@ struct gpio_softc {
int gpio_match(struct device *, void *, void *);
void gpio_attach(struct device *, struct device *, void *);
+int gpio_detach(struct device *, int);
int gpio_search(struct device *, void *, void *);
int gpio_print(void *, const char *);
struct cfattach gpio_ca = {
sizeof (struct gpio_softc),
gpio_match,
- gpio_attach
+ gpio_attach,
+ gpio_detach
};
struct cfdriver gpio_cd = {
@@ -85,6 +87,12 @@ gpio_attach(struct device *parent, struct device *self, void *aux)
}
int
+gpio_detach(struct device *parent, int flags)
+{
+ return (0);
+}
+
+int
gpio_search(struct device *parent, void *arg, void *aux)
{
struct cfdata *cf = arg;