kernel-fxtec-pro1x/drivers/pinctrl/freescale
Uwe Kleine-König da6c2addf6 pinctrl: mxs: atomically switch mux and drive strength config
To set the mux mode of a pin two bits must be set. Up to now this is
implemented using the following idiom:

	writel(mask, reg + CLR);
	writel(value, reg + SET);

. This however results in the mux mode being 0 between the two writes.

On my machine there is an IC's reset pin connected to LCD_D20. The
bootloader configures this pin as GPIO output-high (i.e. not holding the
IC in reset). When Linux reconfigures the pin to GPIO the short time
LCD_D20 is muxed as LCD_D20 instead of GPIO_1_20 is enough to confuse
the connected IC.

The same problem is present for the pin's drive strength setting which is
reset to low drive strength before using the right value.

So instead of relying on the hardware to modify the register setting
using two writes implement the bit toggling using read-modify-write.

Fixes: 17723111e6 ("pinctrl: add pinctrl-mxs support")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-05-23 11:27:53 +02:00
..
Kconfig pinctrl: imx: use generic pinmux helpers for managing functions 2017-01-03 09:26:21 +01:00
Makefile pinctrl: imx: add i.mx6ul subdriver 2015-07-16 09:39:02 +02:00
pinctrl-imx.c pinctrl: core: Fix pinctrl_register_and_init() with pinctrl_enable() 2017-04-07 01:08:08 +02:00
pinctrl-imx.h pinctrl: imx: use generic pinmux helpers for managing functions 2017-01-03 09:26:21 +01:00
pinctrl-imx1-core.c pinctrl: freescale: remove needless module.h include 2016-06-29 09:30:10 +02:00
pinctrl-imx1.c pinctrl: imx1: make it explicitly non-modular 2016-06-29 09:31:03 +02:00
pinctrl-imx1.h pinctrl: imxl: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 00:02:21 +02:00
pinctrl-imx6dl.c pinctrl: imx6dl: make it explicitly non-modular 2016-06-29 09:38:40 +02:00
pinctrl-imx6q.c pinctrl: imx6q: make it explicitly non-modular 2016-06-29 09:49:20 +02:00
pinctrl-imx6sl.c pinctrl: imx6sl: make it explicitly non-modular 2016-06-29 09:50:10 +02:00
pinctrl-imx6sx.c pinctrl: imx6sx: make it explicitly non-modular 2016-06-29 09:51:08 +02:00
pinctrl-imx6ul.c pinctrl: imx6ul: make it explicitly non-modular 2016-06-29 09:52:01 +02:00
pinctrl-imx7d.c pinctrl: imx7d: make it explicitly non-modular 2016-06-29 09:52:59 +02:00
pinctrl-imx21.c pinctrl: imx21: Remove the MODULE_DEVICE_TABLE() macro 2016-07-06 15:41:31 +02:00
pinctrl-imx23.c pinctrl: imx23: make it explicitly non-modular 2016-06-29 09:54:37 +02:00
pinctrl-imx25.c pinctrl: imx25: make it explicitly non-modular 2016-06-29 09:32:59 +02:00
pinctrl-imx27.c pinctrl: imx27: make it explicitly non-modular 2016-06-29 09:34:01 +02:00
pinctrl-imx28.c pinctrl: imx28: make it explicitly non-modular 2016-06-29 09:55:30 +02:00
pinctrl-imx35.c pinctrl: imx35: make it explicitly non-modular 2016-06-29 09:34:52 +02:00
pinctrl-imx50.c pinctrl: imx50: make it explicitly non-modular 2016-06-29 09:35:48 +02:00
pinctrl-imx51.c pinctrl: imx51: make it explicitly non-modular 2016-06-29 09:36:53 +02:00
pinctrl-imx53.c pinctrl: imx53: make it explicitly non-modular 2016-06-29 09:37:44 +02:00
pinctrl-mxs.c pinctrl: mxs: atomically switch mux and drive strength config 2017-05-23 11:27:53 +02:00
pinctrl-mxs.h pinctrl: remove orphaned exported ".remove" function 2016-06-29 09:56:28 +02:00
pinctrl-vf610.c pinctrl: vf610: make it explicitly non-modular 2016-06-29 09:53:48 +02:00