diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2013-04-29 16:07:18 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-05-20 20:14:43 +0200 |
commit | 90dae4ebf03063a70d992aad00d5f5a607c31db8 (patch) | |
tree | 4e392e7ca7898bebbc75f2fe34cc3630cd6b2ffd /drivers/gpio/gpio-mxs.c | |
parent | 2519f9abced15b4327f03d7b8666827517582c29 (diff) |
gpio: mxs: Use set and clear capabilities of the gpio controller
The current driver doesn't use the set and clear registers found on the
mxs gpio controller.
This leads the generic gpio controller to be using some internal value
to avoid looking up the value stored in the registers, making it behave
pretty much like a cache.
This raises some coherency problem when a gpio is not modified by the
gpio controller, while it can easily be fixed by using the set and clear
registers.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-mxs.c')
-rw-r--r-- | drivers/gpio/gpio-mxs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c index 25000b0f845..f8e6af20dfb 100644 --- a/drivers/gpio/gpio-mxs.c +++ b/drivers/gpio/gpio-mxs.c @@ -326,7 +326,8 @@ static int mxs_gpio_probe(struct platform_device *pdev) err = bgpio_init(&port->bgc, &pdev->dev, 4, port->base + PINCTRL_DIN(port), - port->base + PINCTRL_DOUT(port), NULL, + port->base + PINCTRL_DOUT(port) + MXS_SET, + port->base + PINCTRL_DOUT(port) + MXS_CLR, port->base + PINCTRL_DOE(port), NULL, 0); if (err) goto out_irqdesc_free; |