summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-mxc.c
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>2015-04-29 18:35:01 +0300
committerLinus Walleij <linus.walleij@linaro.org>2015-05-11 12:53:05 +0300
commit442b2494b17d1a4f0a14721580271eb23ebffd42 (patch)
treedb63de03fa9672e820c5ce792605f7e1be23f90b /drivers/gpio/gpio-mxc.c
parentf30663398ee28ecd1b66ceeb6a73ef704d4abf78 (diff)
downloadlinux-442b2494b17d1a4f0a14721580271eb23ebffd42.tar.xz
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: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-mxc.c')
-rw-r--r--drivers/gpio/gpio-mxc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
index 9f7446a7ac64..38daa640e1b5 100644
--- a/drivers/gpio/gpio-mxc.c
+++ b/drivers/gpio/gpio-mxc.c
@@ -450,7 +450,8 @@ static int mxc_gpio_probe(struct platform_device *pdev)
err = bgpio_init(&port->bgc, &pdev->dev, 4,
port->base + GPIO_PSR,
port->base + GPIO_DR, NULL,
- port->base + GPIO_GDIR, NULL, 0);
+ port->base + GPIO_GDIR, NULL,
+ BGPIOF_READ_OUTPUT_REG_SET);
if (err)
goto out_bgio;