summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/gpio/gpio.c10
-rw-r--r--sys/dev/gpio/gpiovar.h3
2 files changed, 11 insertions, 2 deletions
diff --git a/sys/dev/gpio/gpio.c b/sys/dev/gpio/gpio.c
index d28c5c9dcee..640b741a797 100644
--- a/sys/dev/gpio/gpio.c
+++ b/sys/dev/gpio/gpio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gpio.c,v 1.5 2006/01/05 11:52:24 grange Exp $ */
+/* $OpenBSD: gpio.c,v 1.6 2006/01/14 12:33:49 grange Exp $ */
/*
* Copyright (c) 2004, 2006 Alexander Yurchenko <grange@openbsd.org>
@@ -208,6 +208,14 @@ gpio_pin_ctl(void *gpio, struct gpio_pinmap *map, int pin, int flags)
}
int
+gpio_pin_caps(void *gpio, struct gpio_pinmap *map, int pin)
+{
+ struct gpio_softc *sc = gpio;
+
+ return (sc->sc_pins[map->pm_map[pin]].pin_caps);
+}
+
+int
gpio_npins(u_int32_t mask)
{
int npins, i;
diff --git a/sys/dev/gpio/gpiovar.h b/sys/dev/gpio/gpiovar.h
index 7c700088ac5..e8568fe4464 100644
--- a/sys/dev/gpio/gpiovar.h
+++ b/sys/dev/gpio/gpiovar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: gpiovar.h,v 1.2 2006/01/05 11:52:24 grange Exp $ */
+/* $OpenBSD: gpiovar.h,v 1.3 2006/01/14 12:33:49 grange Exp $ */
/*
* Copyright (c) 2004, 2006 Alexander Yurchenko <grange@openbsd.org>
@@ -73,6 +73,7 @@ void gpio_pin_unmap(void *, struct gpio_pinmap *);
int gpio_pin_read(void *, struct gpio_pinmap *, int);
void gpio_pin_write(void *, struct gpio_pinmap *, int, int);
void gpio_pin_ctl(void *, struct gpio_pinmap *, int, int);
+int gpio_pin_caps(void *, struct gpio_pinmap *, int);
int gpio_npins(u_int32_t);