diff options
author | Kim, Milo <Milo.Kim@ti.com> | 2012-09-05 00:39:23 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-09-05 19:53:02 -0400 |
commit | 86b3fef0c7b5aba1c64ac1e02e68267aeaff44a6 (patch) | |
tree | ccefb3390e30201566b4680c500536b23280d308 /drivers/regulator/lp872x.c | |
parent | b158fba605bf4f1c97af338dfab64c85c4937513 (diff) |
regulator: lp872x: initialize the DVS mode
The platform specific configuration(general_config) is optional.
However, the DVS settings should be configured explicitly while
loading the driver.
This patch enables configuring the default DVS mode even though
the platform data is not defined.
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/lp872x.c')
-rw-r--r-- | drivers/regulator/lp872x.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/regulator/lp872x.c b/drivers/regulator/lp872x.c index d86b6a3e750d..b16a941c1a62 100644 --- a/drivers/regulator/lp872x.c +++ b/drivers/regulator/lp872x.c | |||
@@ -796,13 +796,14 @@ static int lp872x_config(struct lp872x *lp) | |||
796 | struct lp872x_platform_data *pdata = lp->pdata; | 796 | struct lp872x_platform_data *pdata = lp->pdata; |
797 | int ret; | 797 | int ret; |
798 | 798 | ||
799 | if (!pdata->update_config) | 799 | if (!pdata || !pdata->update_config) |
800 | return 0; | 800 | goto init_dvs; |
801 | 801 | ||
802 | ret = lp872x_write_byte(lp, LP872X_GENERAL_CFG, pdata->general_config); | 802 | ret = lp872x_write_byte(lp, LP872X_GENERAL_CFG, pdata->general_config); |
803 | if (ret) | 803 | if (ret) |
804 | return ret; | 804 | return ret; |
805 | 805 | ||
806 | init_dvs: | ||
806 | return lp872x_init_dvs(lp); | 807 | return lp872x_init_dvs(lp); |
807 | } | 808 | } |
808 | 809 | ||