Commit 35c60be2 authored by Qianggui Song's avatar Qianggui Song Committed by Linus Walleij

pinctrl: meson: Fix wrong shift value when get drive-strength

In meson_pinconf_get_drive_strength, variable bit is calculated by
meson_calc_reg_and_bit, this value is the offset from the first pin of a
certain bank to current pin, while Meson SoCs use two bits for each pin
to depict drive-strength. So a left shift by 1 should be done or node
pinconf-pins shows wrong message.

Fixes: 6ea3e3bb ("pinctrl: meson: add support of drive-strength-microamp")
Signed-off-by: default avatarQianggui Song <qianggui.song@amlogic.com>
Link: https://lore.kernel.org/r/20191226023734.9631-1-qianggui.song@amlogic.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent f7e36e18
......@@ -441,6 +441,7 @@ static int meson_pinconf_get_drive_strength(struct meson_pinctrl *pc,
return ret;
meson_calc_reg_and_bit(bank, pin, REG_DS, &reg, &bit);
bit = bit << 1;
ret = regmap_read(pc->reg_ds, reg, &val);
if (ret)
......
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