OSDN Git Service

pinctrl: pinctrl-single: fix pcs_pin_dbg_show() when bits_per_mux is not zero
authorHanna Hawa <hhhawa@amazon.com>
Fri, 19 Mar 2021 15:21:33 +0000 (17:21 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 25 Mar 2021 08:06:31 +0000 (09:06 +0100)
commitbd85125ea88513f637a62a72e8949c579c5c0a87
tree100bbc0e19ed48420e2c5f714c4640675f342b1a
parent8fa2ea202b13b6da81e26c399ff1d87488398453
pinctrl: pinctrl-single: fix pcs_pin_dbg_show() when bits_per_mux is not zero

A System Error (SError, followed by kernel panic) was detected when
trying to print the supported pins in a pinctrl device which supports
multiple pins per register. This change fixes the pcs_pin_dbg_show() in
pinctrl-single driver when bits_per_mux is not zero. In addition move
offset calculation and pin offset in register to common function.

Fixes: 4e7e8017a80e ("pinctrl: pinctrl-single: enhance to configure multiple pins of different modules")
Signed-off-by: Hanna Hawa <hhhawa@amazon.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Drew Fustini <drew@beagleboard.org>
Link: https://lore.kernel.org/r/20210319152133.28705-4-hhhawa@amazon.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-single.c