[PATCH resend 1/2] gpio: mpc8xxx: don't modify gpdat when setting gpio as input

Tom Rini trini at konsulko.com
Tue Mar 31 21:09:37 CEST 2020


On Tue, Jan 28, 2020 at 12:04:33PM +0000, Rasmus Villemoes wrote:

> 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: Rasmus Villemoes <rasmus.villemoes at prevas.dk>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200331/980ef6a0/attachment.sig>


More information about the U-Boot mailing list