Skip to content
Commit c0c37402 authored by Axel Lin's avatar Axel Lin Committed by Albert ARIBAUD
Browse files

gpio: spear_gpio: Fix gpio_set_value() implementation



In current gpio_set_value() implementation, it always sets the gpio control bit
no matter the value argument is 0 or 1. Thus the GPIOs never set to low.
This patch fixes this bug.

The address bus is used as a mask on read/write operations, so that independent
software drivers can set their GPIO bits without affecting any other pins in a
single write operation. Thus we don't need a read-modify-write to update the
register.

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Acked-by: default avatarStefan Roese <sr@denx.de>
Reviewed-by: default avatarVipin Kumar <vipin.kumar@st.com>
Reviewed-by: default avatarMichael Trimarchi <michael@amarulasolutions.com>
parent fcfddfd5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment