summaryrefslogtreecommitdiffstats
path: root/sys/dev/fdt/bcm2835_gpio.c
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2020-06-12 13:21:55 +0000
committerkettenis <kettenis@openbsd.org>2020-06-12 13:21:55 +0000
commit624a2475e6c991b8b09b14d35d066eb10f7513f7 (patch)
treee144fd389f8650bb1a0915ca462e2197d051e3fd /sys/dev/fdt/bcm2835_gpio.c
parentSilence amdgpu_device_resize_fb_bar; supporting resizing of PCI BARs is (diff)
downloadwireguard-openbsd-624a2475e6c991b8b09b14d35d066eb10f7513f7.tar.xz
wireguard-openbsd-624a2475e6c991b8b09b14d35d066eb10f7513f7.zip
Fix pasto; configure pin as input if it isn't an output.
Diffstat (limited to 'sys/dev/fdt/bcm2835_gpio.c')
-rw-r--r--sys/dev/fdt/bcm2835_gpio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/fdt/bcm2835_gpio.c b/sys/dev/fdt/bcm2835_gpio.c
index 7060587a9b7..6bb4497295c 100644
--- a/sys/dev/fdt/bcm2835_gpio.c
+++ b/sys/dev/fdt/bcm2835_gpio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcm2835_gpio.c,v 1.3 2020/04/27 12:15:30 kettenis Exp $ */
+/* $OpenBSD: bcm2835_gpio.c,v 1.4 2020/06/12 13:21:55 kettenis Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
*
@@ -244,7 +244,7 @@ bcmgpio_config_pin(void *cookie, uint32_t *cells, int config)
if (config & GPIO_CONFIG_OUTPUT)
bcmgpio_config_func(sc, pin, GPFSEL_GPIO_OUT);
else
- bcmgpio_config_func(sc, pin, GPFSEL_GPIO_OUT);
+ bcmgpio_config_func(sc, pin, GPFSEL_GPIO_IN);
if (config & GPIO_CONFIG_PULL_UP)
sc->sc_config_pull(sc, pin, GPPUD_PUD_UP);
else if (config & GPIO_CONFIG_PULL_DOWN)