regualtor: pfuze100: correct sw1a/sw2 on pfuze3000
authorRobin Gong <yibin.gong@nxp.com>
Sun, 14 Jun 2020 21:54:08 +0000 (05:54 +0800)
committerSasha Levin <sashal@kernel.org>
Tue, 30 Jun 2020 19:36:02 +0000 (15:36 -0400)
commit75b62ce4acfa503b76b946908196b3c85435f196
treea698c8b3a73a7e4f66fb59f2b102621e7a97248d
parentee37bc04a269987b3b2cc4f47c4faf4745e59c2d
regualtor: pfuze100: correct sw1a/sw2 on pfuze3000

[ Upstream commit 6f1cf5257acc6e6242ddf2f52bc7912aed77b79f ]

PFUZE100_SWB_REG is not proper for sw1a/sw2, because enable_mask/enable_reg
is not correct. On PFUZE3000, sw1a/sw2 should be the same as sw1a/sw2 on
pfuze100 except that voltages are not linear, so add new PFUZE3000_SW_REG
and pfuze3000_sw_regulator_ops which like the non-linear PFUZE100_SW_REG
and pfuze100_sw_regulator_ops.

Fixes: 1dced996ee70 ("regulator: pfuze100: update voltage setting for pfuze3000 sw1a")
Reported-by: Christophe Meynard <Christophe.Meynard@ign.fr>
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Link: https://lore.kernel.org/r/1592171648-8752-1-git-send-email-yibin.gong@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/regulator/pfuze100-regulator.c