gpio: Fix designware's driver set bit function
This commit fixes the set bit function. If the value to set is different from zero, then the indicated bit will be set. Change-Id: I9c42f683d108b371ca821f446ac5a10541b89b9f Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
This commit is contained in:
parent
77a78f0827
commit
5ad14313bc
@ -76,7 +76,7 @@ static void dw_set_bit(uint32_t base_addr, uint32_t offset,
|
||||
|
||||
reg = dw_read(base_addr, offset);
|
||||
reg &= ~BIT(bit);
|
||||
reg |= ((value & 0x1) << bit);
|
||||
reg |= (((!!value) & 0x1) << bit);
|
||||
dw_write(base_addr, offset, reg);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user