Skip to content

Commit d5392fe

Browse files
sknseanksacilotto
authored andcommitted
regulator: pfuze100: limit pfuze-support-disable-sw to pfuze{100,200}
BugLink: https://bugs.launchpad.net/bugs/1908561 commit 365ec8b upstream. Limit the fsl,pfuze-support-disable-sw to the pfuze100 and pfuze200 variants. When enabling fsl,pfuze-support-disable-sw and using a pfuze3000 or pfuze3001, the driver would choose pfuze100_sw_disable_regulator_ops instead of the newly introduced and correct pfuze3000_sw_regulator_ops. Signed-off-by: Sean Nyekjaer <sean@geanix.com> Fixes: 6f1cf52 ("regualtor: pfuze100: correct sw1a/sw2 on pfuze3000") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201110174113.2066534-1-sean@geanix.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Kamal Mostafa <kamal@canonical.com> Signed-off-by: Ian May <ian.may@canonical.com>
1 parent 489f016 commit d5392fe

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

drivers/regulator/pfuze100-regulator.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -833,11 +833,14 @@ static int pfuze100_regulator_probe(struct i2c_client *client,
833833
* the switched regulator till yet.
834834
*/
835835
if (pfuze_chip->flags & PFUZE_FLAG_DISABLE_SW) {
836-
if (pfuze_chip->regulator_descs[i].sw_reg) {
837-
desc->ops = &pfuze100_sw_disable_regulator_ops;
838-
desc->enable_val = 0x8;
839-
desc->disable_val = 0x0;
840-
desc->enable_time = 500;
836+
if (pfuze_chip->chip_id == PFUZE100 ||
837+
pfuze_chip->chip_id == PFUZE200) {
838+
if (pfuze_chip->regulator_descs[i].sw_reg) {
839+
desc->ops = &pfuze100_sw_disable_regulator_ops;
840+
desc->enable_val = 0x8;
841+
desc->disable_val = 0x0;
842+
desc->enable_time = 500;
843+
}
841844
}
842845
}
843846

0 commit comments

Comments
 (0)