pinctrl: meson: Fix wrong shift value when get drive-strength
authorQianggui Song <qianggui.song@amlogic.com>
Thu, 26 Dec 2019 02:37:34 +0000 (10:37 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Jan 2020 18:48:20 +0000 (19:48 +0100)
commit24fde17ee89feb5202ac13aecbeba5b32da6e7fe
tree307f8cc01da4ec9e656f32c4dad5bc66fe214e21
parent8457f26af06153affcd358078f78599fbbaaa6f5
pinctrl: meson: Fix wrong shift value when get drive-strength

commit 35c60be220572de7d6605c4318f640d133982040 upstream.

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: 6ea3e3bbef37 ("pinctrl: meson: add support of drive-strength-microamp")

Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
Link: https://lore.kernel.org/r/20191226023734.9631-1-qianggui.song@amlogic.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pinctrl/meson/pinctrl-meson.c