Skip to content

Commit

Permalink
pinctrl: meson: Fix wrong shift value when get drive-strength
Browse files Browse the repository at this point in the history
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: 6ea3e3b ("pinctrl: meson: add support of drive-strength-microamp")

Signed-off-by: Qianggui Song <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Linus Walleij <[email protected]>
  • Loading branch information
Qianggui Song authored and linusw committed Jan 7, 2020
1 parent f7e36e1 commit 35c60be
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/pinctrl/meson/pinctrl-meson.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 35c60be

Please sign in to comment.