Commit a1339541 authored by Drew Fustini's avatar Drew Fustini Committed by Linus Walleij

pinctrl: single: parse #pinctrl-cells = 2

If "pinctrl-single,pins" has 3 arguments (offset, conf, mux), then
pcs_parse_one_pinctrl_entry() does an OR operation on conf and mux to
get the value to store in the register.
Signed-off-by: default avatarDrew Fustini <drew@beagleboard.org>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Acked-by: default avatarHaojian Zhuang <haojian.zhuang@linaro.org>
Link: https://lore.kernel.org/r/20200701013320.130441-2-drew@beagleboard.orgSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 614038d6
......@@ -1017,10 +1017,17 @@ static int pcs_parse_one_pinctrl_entry(struct pcs_device *pcs,
break;
}
/* Index plus one value cell */
offset = pinctrl_spec.args[0];
vals[found].reg = pcs->base + offset;
switch (pinctrl_spec.args_count) {
case 2:
vals[found].val = pinctrl_spec.args[1];
break;
case 3:
vals[found].val = (pinctrl_spec.args[1] | pinctrl_spec.args[2]);
break;
}
dev_dbg(pcs->dev, "%pOFn index: 0x%x value: 0x%x\n",
pinctrl_spec.np, offset, pinctrl_spec.args[1]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment