mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 15:37:23 +00:00
pinctrl: meson: Fix GPIO direction registers access
The macros used to set the direction of the GPIO pins are misused, resulting in a wrong behavior when trying to read the GPIO input level from U-Boot. A better macro is also used when setting the output direction. Signed-off-by: Carlo Caione <ccaione@baylibre.com> Reviewed-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
parent
d452f27b3e
commit
fb19c7bade
1 changed files with 2 additions and 2 deletions
|
@ -136,7 +136,7 @@ int meson_gpio_direction_input(struct udevice *dev, unsigned int offset)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
clrsetbits_le32(priv->reg_gpio + reg, BIT(bit), 1);
|
||||
setbits_le32(priv->reg_gpio + reg, BIT(bit));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ int meson_gpio_direction_output(struct udevice *dev,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
clrsetbits_le32(priv->reg_gpio + reg, BIT(bit), 0);
|
||||
clrbits_le32(priv->reg_gpio + reg, BIT(bit));
|
||||
|
||||
ret = meson_gpio_calc_reg_and_bit(dev, offset, REG_OUT, ®, &bit);
|
||||
if (ret)
|
||||
|
|
Loading…
Reference in a new issue