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:
Leandro Pereira 2017-10-23 12:47:52 -07:00 committed by Kumar Gala
parent 5e2303d54e
commit fa92bfe3c1

View File

@ -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;
}