drivers: gpio: gecko: GPIO driver ignores pull-up/pull-down settings
Fixes #4395. Coverity-ID: 178059 Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
This commit is contained in:
parent
5e2303d54e
commit
fa92bfe3c1
@ -92,16 +92,15 @@ static int gpio_gecko_configure(struct device *dev,
|
||||
}
|
||||
|
||||
if ((flags & GPIO_DIR_MASK) == GPIO_DIR_IN) {
|
||||
|
||||
if ((flags & GPIO_PUD_MASK) == GPIO_PUD_PULL_UP) {
|
||||
mode = gpioModeInputPull;
|
||||
out = 1; /* pull-up*/
|
||||
} else if ((flags & GPIO_PUD_MASK) == GPIO_PUD_PULL_DOWN) {
|
||||
mode = gpioModeInputPull;
|
||||
/* out = 0 means pull-down*/
|
||||
} else {
|
||||
mode = gpioModeInput;
|
||||
}
|
||||
|
||||
mode = gpioModeInput;
|
||||
} else { /* GPIO_DIR_OUT */
|
||||
mode = gpioModePushPull;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user