From 2a5509bf252159354792b5c69cb6166adefd3bb4 Mon Sep 17 00:00:00 2001 From: Emmanuel Vadot Date: Sat, 28 Sep 2019 22:21:16 +0000 Subject: [PATCH] arm64: rockchip: Fix map_gpio The map_gpio function wasn't correct, the first element is the pin and not the phandle. --- sys/arm64/rockchip/rk_gpio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arm64/rockchip/rk_gpio.c b/sys/arm64/rockchip/rk_gpio.c index bb9a63cd4b1..740421c1bfc 100644 --- a/sys/arm64/rockchip/rk_gpio.c +++ b/sys/arm64/rockchip/rk_gpio.c @@ -390,9 +390,9 @@ rk_gpio_map_gpios(device_t bus, phandle_t dev, phandle_t gparent, int gcells, pcell_t *gpios, uint32_t *pin, uint32_t *flags) { - /* The gpios are mapped as */ - *pin = gpios[1]; - *flags = gpios[2]; + /* The gpios are mapped as */ + *pin = gpios[0]; + *flags = gpios[1]; return (0); }