[PATCH] pinctrl-single: fix parsing of `pinctrl-single, bits` property

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 drivers/pinctrl/pinctrl-single.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index d4f411b4a..2cd58df93 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;
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux