Commit 86b3fef0 authored by Kim, Milo's avatar Kim, Milo Committed by Mark Brown

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: default avatarMilo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent b158fba6
......@@ -796,13 +796,14 @@ static int lp872x_config(struct lp872x *lp)
struct lp872x_platform_data *pdata = lp->pdata;
int ret;
if (!pdata->update_config)
return 0;
if (!pdata || !pdata->update_config)
goto init_dvs;
ret = lp872x_write_byte(lp, LP872X_GENERAL_CFG, pdata->general_config);
if (ret)
return ret;
init_dvs:
return lp872x_init_dvs(lp);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment