diff options
author | manu <manu@FreeBSD.org> | 2016-09-05 20:46:45 +0000 |
---|---|---|
committer | manu <manu@FreeBSD.org> | 2016-09-05 20:46:45 +0000 |
commit | 7cac9489d083d1d87d0f5e27b4f5997369de9c4e (patch) | |
tree | eb469c23956e29872dde6db60aa08d2df5ad6aad /sys/arm/allwinner | |
parent | 421fb9c725e2dfab993ceddacd2d9e2b8dc14c83 (diff) | |
download | FreeBSD-src-7cac9489d083d1d87d0f5e27b4f5997369de9c4e.zip FreeBSD-src-7cac9489d083d1d87d0f5e27b4f5997369de9c4e.tar.gz |
MFC r304290,r304649
r304290:
Only set pud settings if this is a pullup or pulldown configuration.
This removes the need to set the MMC pins with pullups in our DTS.
Thanks to jmcneill@ for spotting this.
r304649:
Do not include file from dt-bindings and simply use the already present defines.
Diffstat (limited to 'sys/arm/allwinner')
-rw-r--r-- | sys/arm/allwinner/a10_gpio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arm/allwinner/a10_gpio.c b/sys/arm/allwinner/a10_gpio.c index 176cbf6..42015b0 100644 --- a/sys/arm/allwinner/a10_gpio.c +++ b/sys/arm/allwinner/a10_gpio.c @@ -585,7 +585,9 @@ aw_fdt_configure_pins(device_t dev, phandle_t cfgxref) a10_gpio_set_function(sc, pin_num, pin_func); if (a10_gpio_get_drv(sc, pin_num) != pin_drive) a10_gpio_set_drv(sc, pin_num, pin_drive); - if (a10_gpio_get_pud(sc, pin_num) != pin_pull) + if (a10_gpio_get_pud(sc, pin_num) != pin_pull && + (pin_pull == A10_GPIO_PULLUP || + pin_pull == A10_GPIO_PULLDOWN)) a10_gpio_set_pud(sc, pin_num, pin_pull); A10_GPIO_UNLOCK(sc); } |