summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/sunxi/pinctrl-sunxi.h
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2016-11-11 12:50:35 +0300
committerLinus Walleij <linus.walleij@linaro.org>2016-11-15 12:20:27 +0300
commitc5fda170e87a4bdaeb278f7e50f7a1f654e94eb5 (patch)
tree3f3ca82c5f2a42587fc0e1ea31c5bc762bec9560 /drivers/pinctrl/sunxi/pinctrl-sunxi.h
parent223dba00b4072efc590c7d648f230db1b44186b9 (diff)
downloadlinux-c5fda170e87a4bdaeb278f7e50f7a1f654e94eb5.tar.xz
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>
Diffstat (limited to 'drivers/pinctrl/sunxi/pinctrl-sunxi.h')
-rw-r--r--drivers/pinctrl/sunxi/pinctrl-sunxi.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.h b/drivers/pinctrl/sunxi/pinctrl-sunxi.h
index 0afce1ab12d0..a7efb31d6523 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sunxi.h
+++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.h
@@ -109,7 +109,6 @@ struct sunxi_pinctrl_function {
struct sunxi_pinctrl_group {
const char *name;
- unsigned long config;
unsigned pin;
};