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 <[email protected]>
Reviewed-by: Jerome Brunet <[email protected]>
Signed-off-by: Neil Armstrong <[email protected]>
if (ret)
return ret;
- clrsetbits_le32(priv->reg_gpio + reg, BIT(bit), 1);
+ setbits_le32(priv->reg_gpio + reg, BIT(bit));
return 0;
}
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)