diff options
author | Chen-Yu Tsai <wens@csie.org> | 2019-01-13 10:57:22 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-01-14 16:09:27 +0100 |
commit | dc14455841773df52b15a17b36d01a26745f212b (patch) | |
tree | 81a10c9d247a61d571a080b0504dd46d532d24fe /fs | |
parent | pinctrl: mediatek: fix Kconfig build errors for moore core (diff) | |
download | linux-dc14455841773df52b15a17b36d01a26745f212b.tar.xz linux-dc14455841773df52b15a17b36d01a26745f212b.zip |
pinctrl: sunxi: Fix and simplify pin bank regulator handling
The new per-pin-bank regulator handling code in the sunxi pinctrl driver
has mismatched conditions for enabling and disabling the regulator: it
is enabled each time a pin is requested, but only disabled when the
pin-bank's reference count reaches zero.
Since we are doing reference counting already, there's no need to enable
the regulator each time a pin is requested. Instead we can just do it
for the first requested pin of each pin-bank. Thus we can reverse the
test and bail out early if it's not the first occurrence.
Fixes: 9a2a566adb00 ("pinctrl: sunxi: Deal with per-bank regulators")
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions