regulator: pfuze100: add .is_enable() for pfuze100_swb_regulator_ops
authorAnson Huang <Anson.Huang@nxp.com>
Thu, 17 May 2018 07:27:22 +0000 (15:27 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Aug 2018 05:50:33 +0000 (07:50 +0200)
commit6192b115c58b725789cb333b4e043a6491c8d313
treea93ed77e9567283e55889dc75e716b55423803e9
parent9b56c4151ac250f8ee4f320c0ac63ffdce275304
regulator: pfuze100: add .is_enable() for pfuze100_swb_regulator_ops

[ Upstream commit 0b01fd3d40fe6402e5fa3b491ef23109feb1aaa5 ]

If is_enabled() is not defined, regulator core will assume
this regulator is already enabled, then it can NOT be really
enabled after disabled.

Based on Li Jun's patch from the NXP kernel tree.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/regulator/pfuze100-regulator.c