Xilinx: ARM: GPIO: Fix for small bit-bang GPIO set value problem
Using GPIO to bit-bang an SPI interface, a problem was found. When the kernel
code needed to set the MOSI signal to TRUE, it called gpio_set_value. But
gpio_set_value was called with a value greater than 1 instead of 1 (
10000000).
Since the xgpiops_set_value function was expecting to see the variable state
set to be a value of 0 or 1, the value, while not zero, was seen as zero due
to the AND'ing of the variable state with 1.
This change corrects this behavior by testing the variable state and setting it
to be 1 if it is initially a non-zero value.
Signed-off-by: David Luman dluman@cmlab.biz