lkml.org 
[lkml]   [2020]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.4 019/203] pinctrl: meson: Fix wrong shift value when get drive-strength
    Date
    From: Qianggui Song <qianggui.song@amlogic.com>

    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 | 1 +
    1 file changed, 1 insertion(+)

    --- a/drivers/pinctrl/meson/pinctrl-meson.c
    +++ b/drivers/pinctrl/meson/pinctrl-meson.c
    @@ -441,6 +441,7 @@ static int meson_pinconf_get_drive_stren
    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)

    \
     
     \ /
      Last update: 2020-01-17 00:21    [W:2.200 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site