When a GPIO pin is set to be turned on by kernel hints (hint.gpio.X.pinon)
make sure the GPIO pin is configured as an output as this is not always the case.
This commit is contained in:
parent
8c4e5fc061
commit
3010d2256a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=265774
@ -437,10 +437,13 @@ ar71xx_gpio_attach(device_t dev)
|
||||
ar71xx_gpio_pin_configure(sc, &sc->gpio_pins[i], DEFAULT_CAPS);
|
||||
i++;
|
||||
}
|
||||
/* Turn on the hinted pins. */
|
||||
for (i = 0; i < sc->gpio_npins; i++) {
|
||||
j = sc->gpio_pins[i].gp_pin;
|
||||
if ((pinon & (1 << j)) != 0)
|
||||
if ((pinon & (1 << j)) != 0) {
|
||||
ar71xx_gpio_pin_setflags(dev, j, GPIO_PIN_OUTPUT);
|
||||
ar71xx_gpio_pin_set(dev, j, 1);
|
||||
}
|
||||
}
|
||||
device_add_child(dev, "gpioc", device_get_unit(dev));
|
||||
device_add_child(dev, "gpiobus", device_get_unit(dev));
|
||||
|
Loading…
Reference in New Issue
Block a user