Skip to content
Commit 8eb075fa authored by Amneesh Singh's avatar Amneesh Singh Committed by Benjamin Cabé
Browse files

drivers: gpio: davinci: fix gpio output



Currently to set/clear the pins, we do a logical OR of the value with the
existing values in set/clear registers. However, reading these registers
always returns the value in out_data register. This is undesirable as it
can cause unnecessary complications. Consider the following scenario:

We need to set PIN 0:
set_data |= BIT(0)

We need to clear PIN 1:
clr_data |= BIT(1)

The latter would also clear the 0th bit due to the aforementioned
behaviour.

This patch fixes this by writing the mask directly without ORing.

Signed-off-by: default avatarAmneesh Singh <a-singh7@ti.com>
parent a8b32384
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment