Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7477e137 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Linus Walleij
Browse files

gpio: merrifield: Don't use GPIOF_DIR_IN / GPIOF_DIR_OUT



The mentioned flags are dedicated solely for consumer API.
Replace them by explicit values.

Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
[Made a !bang clamp to (0,1) instead of infix ? operator]
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 4a56e413
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -166,7 +166,7 @@ static int mrfld_gpio_get_direction(struct gpio_chip *chip, unsigned int offset)
{
{
	void __iomem *gpdr = gpio_reg(chip, offset, GPDR);
	void __iomem *gpdr = gpio_reg(chip, offset, GPDR);


	return (readl(gpdr) & BIT(offset % 32)) ? GPIOF_DIR_OUT : GPIOF_DIR_IN;
	return !(readl(gpdr) & BIT(offset % 32));
}
}


static int mrfld_gpio_set_debounce(struct gpio_chip *chip, unsigned int offset,
static int mrfld_gpio_set_debounce(struct gpio_chip *chip, unsigned int offset,