diff options
author | Marc Balmer <mbalmer@cvs.openbsd.org> | 2007-11-17 09:16:52 +0000 |
---|---|---|
committer | Marc Balmer <mbalmer@cvs.openbsd.org> | 2007-11-17 09:16:52 +0000 |
commit | a68336119c4e1639ebbdbb90e8030ad0522947a0 (patch) | |
tree | 08a9e89402025467d31c7c2dfe7d9242ab5ff03e /sys | |
parent | a677c25a33af2be72b1b615c8ced4d1a31c38566 (diff) |
Support GPIO_PIN_PULLDOWN (pulldown-enable) as GPIO pin flag.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/pci/glxpcib.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/sys/arch/i386/pci/glxpcib.c b/sys/arch/i386/pci/glxpcib.c index f3ee85e9eec..62e520106d8 100644 --- a/sys/arch/i386/pci/glxpcib.c +++ b/sys/arch/i386/pci/glxpcib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: glxpcib.c,v 1.3 2007/11/16 21:07:01 mbalmer Exp $ */ +/* $OpenBSD: glxpcib.c,v 1.4 2007/11/17 09:16:51 mbalmer Exp $ */ /* * Copyright (c) 2007 Marc Balmer <mbalmer@openbsd.org> @@ -108,17 +108,15 @@ /* GPIO */ #define MSR_LBAR_GPIO 0x5140000c - -#define AMD5536_GPIO_NPINS 32 - -#define AMD5536_GPIOH_OFFSET 0x80 /* high bank register offset */ - -#define AMD5536_GPIO_OUT_VAL 0x00 /* output value */ -#define AMD5536_GPIO_OUT_EN 0x04 /* output enable */ -#define AMD5536_GPIO_OD_EN 0x08 /* open-drain enable */ -#define AMD5536_GPIO_PU_EN 0x18 /* pull-up enable */ -#define AMD5536_GPIO_IN_EN 0x20 /* input enable */ -#define AMD5536_GPIO_READ_BACK 0x30 /* read back value */ +#define AMD5536_GPIO_NPINS 32 +#define AMD5536_GPIOH_OFFSET 0x80 /* high bank register offset */ +#define AMD5536_GPIO_OUT_VAL 0x00 /* output value */ +#define AMD5536_GPIO_OUT_EN 0x04 /* output enable */ +#define AMD5536_GPIO_OD_EN 0x08 /* open-drain enable */ +#define AMD5536_GPIO_PU_EN 0x18 /* pull-up enable */ +#define AMD5536_GPIO_PD_EN 0x1c /* pull-down enable */ +#define AMD5536_GPIO_IN_EN 0x20 /* input enable */ +#define AMD5536_GPIO_READ_BACK 0x30 /* read back value */ struct glxpcib_softc { struct device sc_dev; @@ -339,6 +337,9 @@ glxpcib_gpio_pin_ctl(void *arg, int pin, int flags) case GPIO_PIN_PULLUP: reg = AMD5536_GPIO_PU_EN; break; + case GPIO_PIN_PULLDOWN: + reg = AMD5536_GPIO_PD_EN; + break; default: /* flag not support by the AMD5536 GPIO */ return; |