diff options
author | thompsa <thompsa@FreeBSD.org> | 2010-11-08 03:08:01 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2010-11-08 03:08:01 +0000 |
commit | 962fba5f7cb9fbd19bcef31faf4a2f46c14d2b07 (patch) | |
tree | 6b4ee52771f44aa851cd2230bc7a91cdde1a3efd /sys/dev/gpio/gpioled.c | |
parent | fed6d69895069f935c4b2337781a2932549a021f (diff) | |
download | FreeBSD-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.c | 3 |
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)); |