]> git.baikalelectronics.ru Git - kernel.git/commit
staging: hikey9xx: hi6421v600-regulator: fix get_optimum_mode
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 21 Jan 2021 07:18:14 +0000 (08:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Jan 2021 17:52:55 +0000 (18:52 +0100)
commitcad82db1e1231f4b36e8d08d1813e2731f45e0ec
treee76b8ddde6be79dd8323ed6c392a110672bbea11
parentd42395f927b0935f16e4d5c079765908926f73ad
staging: hikey9xx: hi6421v600-regulator: fix get_optimum_mode

During the driver refactor, a regression broke the logic inside
hi6421_spmi_regulator_get_optimum_mode(). Basically, if a LDO
has eco_uA == 0, it doesn't support economic mode. So, it should
return REGULATOR_MODE_NORMAL.

If economic mode is supported, it can return either
REGULATOR_MODE_IDLE or REGULATOR_MODE_NORMAL, depending on the
load current.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/f087981eb695eaab8c301c42977a4aa884affbbf.1611212783.git.mchehab+huawei@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/hikey9xx/hi6421v600-regulator.c