Commit 442b2494 authored by Vladimir Zapolskiy's avatar Vladimir Zapolskiy Committed by Linus Walleij

gpio: mxc: read output value from GPIO_DR register

All supported iMX GPIO controllers store configured GPIO output value
in GPIO_DR data register, which is represented by GPIO generic reg_set.
Provide a BGPIOF_READ_OUTPUT_REG_SET flag to bgpio_init() to allow
correct getting of previously set output value.
Signed-off-by: default avatarVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent f3066339
...@@ -450,7 +450,8 @@ static int mxc_gpio_probe(struct platform_device *pdev) ...@@ -450,7 +450,8 @@ static int mxc_gpio_probe(struct platform_device *pdev)
err = bgpio_init(&port->bgc, &pdev->dev, 4, err = bgpio_init(&port->bgc, &pdev->dev, 4,
port->base + GPIO_PSR, port->base + GPIO_PSR,
port->base + GPIO_DR, NULL, port->base + GPIO_DR, NULL,
port->base + GPIO_GDIR, NULL, 0); port->base + GPIO_GDIR, NULL,
BGPIOF_READ_OUTPUT_REG_SET);
if (err) if (err)
goto out_bgio; goto out_bgio;
......
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