summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPeter Mamonov <pmamonov@gmail.com>2020-03-12 23:39:57 +0300
committerSascha Hauer <s.hauer@pengutronix.de>2020-03-16 12:27:15 +0100
commit18a3a7a70976e403b801328891c76437ca6accae (patch)
tree6fb899b18070b6c15b773310aa681ee4c435407b /drivers
parent7b7dc85df9cd251d27e4d2d0a7954c34486d21df (diff)
downloadbarebox-18a3a7a70976e403b801328891c76437ca6accae.tar.gz
pinctrl-single: fix parsing of `pinctrl-single,bits` property
According to dts/Bindings/pinctrl/pinctrl-single.txt:113 the correct order of parameters is <offset, value, mask>. Fixes: f7e0cae43 ('pinctrl-single: Handle "pinctrl-single,function-mask" dt property') Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pinctrl/pinctrl-single.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index d4f411b..2cd58df 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -87,8 +87,8 @@ static int pcs_set_state(struct pinctrl_device *pdev, struct device_node *np)
for (i = 0; i < rows; i++) {
offset = be32_to_cpup(mux + index++);
- mask = be32_to_cpup(mux + index++);
val = be32_to_cpup(mux + index++);
+ mask = be32_to_cpup(mux + index++);
reg = pcs->read(pcs->base + offset);
reg &= ~mask;
reg |= val;