Commit 5b1d96e0 authored by Linus Walleij's avatar Linus Walleij Committed by Geert Uytterhoeven

pinctrl: rza2: Drop driver use of consumer flags

These flags are for consumers of GPIO lines, not for
drivers.

Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
parent ab6366ee
...@@ -115,7 +115,7 @@ static void rza2_pin_to_gpio(void __iomem *pfc_base, unsigned int offset, ...@@ -115,7 +115,7 @@ static void rza2_pin_to_gpio(void __iomem *pfc_base, unsigned int offset,
mask16 = RZA2_PDR_MASK << (pin * 2); mask16 = RZA2_PDR_MASK << (pin * 2);
reg16 &= ~mask16; reg16 &= ~mask16;
if (dir == GPIOF_DIR_IN) if (dir)
reg16 |= RZA2_PDR_INPUT << (pin * 2); /* pin as input */ reg16 |= RZA2_PDR_INPUT << (pin * 2); /* pin as input */
else else
reg16 |= RZA2_PDR_OUTPUT << (pin * 2); /* pin as output */ reg16 |= RZA2_PDR_OUTPUT << (pin * 2); /* pin as output */
...@@ -134,18 +134,18 @@ static int rza2_chip_get_direction(struct gpio_chip *chip, unsigned int offset) ...@@ -134,18 +134,18 @@ static int rza2_chip_get_direction(struct gpio_chip *chip, unsigned int offset)
reg16 = (reg16 >> (pin * 2)) & RZA2_PDR_MASK; reg16 = (reg16 >> (pin * 2)) & RZA2_PDR_MASK;
if (reg16 == RZA2_PDR_OUTPUT) if (reg16 == RZA2_PDR_OUTPUT)
return GPIOF_DIR_OUT; return 0;
if (reg16 == RZA2_PDR_INPUT) if (reg16 == RZA2_PDR_INPUT)
return GPIOF_DIR_IN; return 1;
/* /*
* This GPIO controller has a default Hi-Z state that is not input or * This GPIO controller has a default Hi-Z state that is not input or
* output, so force the pin to input now. * output, so force the pin to input now.
*/ */
rza2_pin_to_gpio(priv->base, offset, GPIOF_DIR_IN); rza2_pin_to_gpio(priv->base, offset, 1);
return GPIOF_DIR_IN; return 1;
} }
static int rza2_chip_direction_input(struct gpio_chip *chip, static int rza2_chip_direction_input(struct gpio_chip *chip,
...@@ -153,7 +153,7 @@ static int rza2_chip_direction_input(struct gpio_chip *chip, ...@@ -153,7 +153,7 @@ static int rza2_chip_direction_input(struct gpio_chip *chip,
{ {
struct rza2_pinctrl_priv *priv = gpiochip_get_data(chip); struct rza2_pinctrl_priv *priv = gpiochip_get_data(chip);
rza2_pin_to_gpio(priv->base, offset, GPIOF_DIR_IN); rza2_pin_to_gpio(priv->base, offset, 1);
return 0; return 0;
} }
...@@ -191,7 +191,7 @@ static int rza2_chip_direction_output(struct gpio_chip *chip, ...@@ -191,7 +191,7 @@ static int rza2_chip_direction_output(struct gpio_chip *chip,
struct rza2_pinctrl_priv *priv = gpiochip_get_data(chip); struct rza2_pinctrl_priv *priv = gpiochip_get_data(chip);
rza2_chip_set(chip, offset, val); rza2_chip_set(chip, offset, val);
rza2_pin_to_gpio(priv->base, offset, GPIOF_DIR_OUT); rza2_pin_to_gpio(priv->base, offset, 0);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment