Commit 5bab305d authored by Kim, Milo's avatar Kim, Milo Committed by Mark Brown

regulator: lp872x: remove unnecessary function

 The lp872x_check_dvs_validity() is used for checking DVS platform data.
 If the DVS platform data is not defined, return as error code.
 Now, this is unnecessary because the default DVS mode is set in this case.
Signed-off-by: default avatarMilo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 9d6da6fc
...@@ -729,28 +729,6 @@ static struct regulator_desc lp8725_regulator_desc[] = { ...@@ -729,28 +729,6 @@ static struct regulator_desc lp8725_regulator_desc[] = {
}, },
}; };
static int lp872x_check_dvs_validity(struct lp872x *lp)
{
struct lp872x_dvs *dvs = lp->pdata->dvs;
u8 val = 0;
int ret;
ret = lp872x_read_byte(lp, LP872X_GENERAL_CFG, &val);
if (ret)
return ret;
ret = 0;
if (lp->chipid == LP8720) {
if (val & LP8720_EXT_DVS_M)
ret = dvs ? 0 : -EINVAL;
} else {
if ((val & LP8725_DVS1_M) == EXTERN_DVS_USED)
ret = dvs ? 0 : -EINVAL;
}
return ret;
}
static int lp872x_init_dvs(struct lp872x *lp) static int lp872x_init_dvs(struct lp872x *lp)
{ {
int ret, gpio; int ret, gpio;
...@@ -762,12 +740,6 @@ static int lp872x_init_dvs(struct lp872x *lp) ...@@ -762,12 +740,6 @@ static int lp872x_init_dvs(struct lp872x *lp)
if (!dvs) if (!dvs)
goto set_default_dvs_mode; goto set_default_dvs_mode;
ret = lp872x_check_dvs_validity(lp);
if (ret) {
dev_warn(lp->dev, "invalid dvs data: %d\n", ret);
return ret;
}
gpio = dvs->gpio; gpio = dvs->gpio;
if (!gpio_is_valid(gpio)) { if (!gpio_is_valid(gpio)) {
dev_err(lp->dev, "invalid gpio: %d\n", gpio); dev_err(lp->dev, "invalid gpio: %d\n", gpio);
......
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