summaryrefslogtreecommitdiffstats
path: root/sys/dev/gpio/gpioled.c
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2010-11-08 03:08:01 +0000
committerthompsa <thompsa@FreeBSD.org>2010-11-08 03:08:01 +0000
commit962fba5f7cb9fbd19bcef31faf4a2f46c14d2b07 (patch)
tree6b4ee52771f44aa851cd2230bc7a91cdde1a3efd /sys/dev/gpio/gpioled.c
parentfed6d69895069f935c4b2337781a2932549a021f (diff)
downloadFreeBSD-src-962fba5f7cb9fbd19bcef31faf4a2f46c14d2b07.zip
FreeBSD-src-962fba5f7cb9fbd19bcef31faf4a2f46c14d2b07.tar.gz
Set the pin to output on attach, we can't assume it already is.
Reviewed by: gonzo
Diffstat (limited to 'sys/dev/gpio/gpioled.c')
-rw-r--r--sys/dev/gpio/gpioled.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/gpio/gpioled.c b/sys/dev/gpio/gpioled.c
index d96b8b7..a03c172 100644
--- a/sys/dev/gpio/gpioled.c
+++ b/sys/dev/gpio/gpioled.c
@@ -103,6 +103,9 @@ gpioled_attach(device_t dev)
device_get_unit(dev), "name", &name))
name = NULL;
+ GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, GPIOLED_PIN,
+ GPIO_PIN_OUTPUT);
+
sc->sc_leddev = led_create(gpioled_control, sc, name ? name :
device_get_nameunit(dev));
OpenPOWER on IntegriCloud