regulator: twl: Fix a typo in twl4030_send_pb_msg
authorIvaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Wed, 6 Apr 2016 06:06:03 +0000 (09:06 +0300)
committerMark Brown <broonie@kernel.org>
Wed, 6 Apr 2016 17:10:50 +0000 (10:10 -0700)
Commit <2330b05c095bdeaaf1261c54cd2d4b9127496996> ("regulator: twl: Make
sure we have access to powerbus before trying to write to it")
has implemented the needed logic to correctly access powerbus through i2c,
however it brought a typo when powerbus configuration is restored, which
results in writing to a wrong register. Fix that by providing the correct
register value.

Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/twl-regulator.c

index 11c6a5c..faeb5ee 100644 (file)
@@ -253,7 +253,7 @@ static int twl4030_send_pb_msg(unsigned msg)
 
        /* Restore powerbus configuration */
        return twl_i2c_write_u8(TWL_MODULE_PM_MASTER, val,
-                               TWL_MODULE_PM_MASTER);
+                               TWL4030_PM_MASTER_PB_CFG);
 }
 
 static int twl4030reg_enable(struct regulator_dev *rdev)