mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 08:46:46 +00:00
gpio: vf610: set value before the direction to avoid a glitch
commitfc363413ef
upstream. We found a glitch when configuring the pad as output high. To avoid this glitch, move the data value setting before direction config in the function vf610_gpio_direction_output(). Fixes:659d8a6231
("gpio: vf610: add imx7ulp support") Signed-off-by: Haibo Chen <haibo.chen@nxp.com> [Bartosz: tweak the commit message] Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6c3a72d4ae
commit
7e29dadf26
1 changed files with 2 additions and 2 deletions
|
@ -127,14 +127,14 @@ static int vf610_gpio_direction_output(struct gpio_chip *chip, unsigned gpio,
|
|||
unsigned long mask = BIT(gpio);
|
||||
u32 val;
|
||||
|
||||
vf610_gpio_set(chip, gpio, value);
|
||||
|
||||
if (port->sdata && port->sdata->have_paddr) {
|
||||
val = vf610_gpio_readl(port->gpio_base + GPIO_PDDR);
|
||||
val |= mask;
|
||||
vf610_gpio_writel(val, port->gpio_base + GPIO_PDDR);
|
||||
}
|
||||
|
||||
vf610_gpio_set(chip, gpio, value);
|
||||
|
||||
return pinctrl_gpio_direction_output(chip->base + gpio);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue