Skip to content
Commit 1d7ad9fa authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Tom Rini
Browse files

gpio: mpc8xxx: don't modify gpdat when setting gpio as input



Since some chips don't support reading back the value of output gpios
from the gpdat register, we should not do a RMW cycle (i.e., the
clrbits_be32) on the gpdat register when setting a gpio as input, as
that might accidentally change the value of some other (still
configured as output) gpio.

The extra indirection through mpc8xxx_gpio_set_in() does not help
readability, so just fold the gpdir update into
mpc8xxx_gpio_direction_input().

Signed-off-by: default avatarRasmus Villemoes <rasmus.villemoes@prevas.dk>
parent 71a3e5c5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment