Skip to content

Commit

Permalink
gpio: mxs: Use set and clear capabilities of the gpio controller
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Maxime Ripard authored and Linus Walleij committed May 20, 2013
1 parent 2519f9a commit 90dae4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpio/gpio-mxs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 90dae4e

Please sign in to comment.