alistair23-linux/drivers/pinctrl/sunxi
Chen-Yu Tsai c5fda170e8 pinctrl: sunxi: Add support for fetching pinconf settings from hardware
The sunxi pinctrl driver only caches whatever pinconf setting was last
set on a given pingroup. This is not particularly helpful, nor is it
correct.

Fix this by actually reading the hardware registers and returning
the correct results or error codes. Also filter out unsupported
pinconf settings. Since this driver has a peculiar setup of 1 pin
per group, we can support both pin and pingroup pinconf setting
read back with the same code. The sunxi_pconf_reg helper and code
structure is inspired by pinctrl-msm.

With this done we can also claim to support generic pinconf, by
setting .is_generic = true in pinconf_ops.

Also remove the cached config value. The behavior of this was never
correct, as it only cached 1 setting instead of all of them. Since
we can now read back settings directly from the hardware, it is no
longer required.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-11-15 10:20:27 +01:00
..
Kconfig pinctrl: sunxi: Add GR8 controller support 2016-09-07 21:15:49 +02:00
Makefile pinctrl: sunxi: Add GR8 controller support 2016-09-07 21:15:49 +02:00
pinctrl-gr8.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun4i-a10.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun5i-a10s.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun5i-a13.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun6i-a31-r.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun6i-a31.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun6i-a31s.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun7i-a20.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun8i-a23-r.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun8i-a23.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun8i-a33.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun8i-a83t.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun8i-h3-r.c pinctrl: sunxi: Add H3 R_PIO controller support 2016-02-11 14:29:24 +01:00
pinctrl-sun8i-h3.c pinctrl: sunxi: Remove unsupported PWM channel pinmux in H3 2016-09-08 01:08:23 +02:00
pinctrl-sun9i-a80-r.c pinctrl: sunxi: make A80 explicitly non-modular 2016-03-09 10:27:25 +07:00
pinctrl-sun9i-a80.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun50i-a64.c drivers: pinctrl: add driver for Allwinner A64 SoC 2016-03-11 22:46:27 +07:00
pinctrl-sunxi.c pinctrl: sunxi: Add support for fetching pinconf settings from hardware 2016-11-15 10:20:27 +01:00
pinctrl-sunxi.h pinctrl: sunxi: Add support for fetching pinconf settings from hardware 2016-11-15 10:20:27 +01:00