drivers/gpio_intel_apl.c: fix return value for gpio_pin_read()
gpio_intel_apl_read() should set *value to 1, not 2, when the GPIO input is a logical high. Fixes: #15499 Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This commit is contained in:
parent
6b4007e5ed
commit
8905b0fe21
1 changed files with 2 additions and 2 deletions
|
@ -345,10 +345,10 @@ static int gpio_intel_apl_read(struct device *dev, int access_op,
|
|||
|
||||
if (!(val & PAD_CFG0_TXDIS)) {
|
||||
/* If TX is not disabled, return TX_STATE */
|
||||
*value = val & PAD_CFG0_TXSTATE;
|
||||
*value = (val & PAD_CFG0_TXSTATE) >> PAD_CFG0_TXSTATE_POS;
|
||||
} else {
|
||||
/* else just return RX_STATE */
|
||||
*value = val & PAD_CFG0_RXSTATE;
|
||||
*value = (val & PAD_CFG0_RXSTATE) >> PAD_CFG0_RXSTATE_POS;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue