diff options
author | Marc Balmer <mbalmer@cvs.openbsd.org> | 2007-11-17 09:05:24 +0000 |
---|---|---|
committer | Marc Balmer <mbalmer@cvs.openbsd.org> | 2007-11-17 09:05:24 +0000 |
commit | a677c25a33af2be72b1b615c8ced4d1a31c38566 (patch) | |
tree | cb823892ae94064fb8f013d5722355df9894c1cb | |
parent | 8f8b8695b62b385c0d63ae35afbe03f44fd8cbfc (diff) |
pull-down (GPIO_PIN_PULLDOWN) is a valid flags for some GPIO devices,
e.g. the AMD Geode C5536 GPIO.
ok grange
-rw-r--r-- | sys/sys/gpio.h | 3 | ||||
-rw-r--r-- | usr.sbin/gpioctl/gpioctl.8 | 6 | ||||
-rw-r--r-- | usr.sbin/gpioctl/gpioctl.c | 3 |
3 files changed, 8 insertions, 4 deletions
diff --git a/sys/sys/gpio.h b/sys/sys/gpio.h index dcc38958ecb..1024a4940dc 100644 --- a/sys/sys/gpio.h +++ b/sys/sys/gpio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: gpio.h,v 1.1 2004/06/03 18:08:00 grange Exp $ */ +/* $OpenBSD: gpio.h,v 1.2 2007/11/17 09:05:23 mbalmer Exp $ */ /* * Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org> * @@ -30,6 +30,7 @@ #define GPIO_PIN_PUSHPULL 0x0010 /* push-pull output */ #define GPIO_PIN_TRISTATE 0x0020 /* output disabled */ #define GPIO_PIN_PULLUP 0x0040 /* internal pull-up enabled */ +#define GPIO_PIN_PULLDOWN 0x0080 /* internal pull-down enabled */ /* GPIO controller description */ struct gpio_info { diff --git a/usr.sbin/gpioctl/gpioctl.8 b/usr.sbin/gpioctl/gpioctl.8 index 97768d62dfb..39f3b235e88 100644 --- a/usr.sbin/gpioctl/gpioctl.8 +++ b/usr.sbin/gpioctl/gpioctl.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: gpioctl.8,v 1.9 2007/05/31 19:20:23 jmc Exp $ +.\" $OpenBSD: gpioctl.8,v 1.10 2007/11/17 09:05:23 mbalmer Exp $ .\" .\" Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: November 17 2007 $ .Dt GPIOCTL 8 .Os .Sh NAME @@ -100,6 +100,8 @@ push-pull output tri-state (output disabled) .It pu internal pull-up enabled +.It pd +internal pull-down enabled .El .Pp Note that not all the flags can be supported by the particular diff --git a/usr.sbin/gpioctl/gpioctl.c b/usr.sbin/gpioctl/gpioctl.c index 0825af6d66e..2ac2d330e17 100644 --- a/usr.sbin/gpioctl/gpioctl.c +++ b/usr.sbin/gpioctl/gpioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gpioctl.c,v 1.5 2007/03/18 16:16:56 deraadt Exp $ */ +/* $OpenBSD: gpioctl.c,v 1.6 2007/11/17 09:05:23 mbalmer Exp $ */ /* * Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org> * @@ -55,6 +55,7 @@ const struct bitstr { { GPIO_PIN_PUSHPULL, "pp" }, { GPIO_PIN_TRISTATE, "tri" }, { GPIO_PIN_PULLUP, "pu" }, + { GPIO_PIN_PULLDOWN, "pd" }, { 0, NULL }, }; |