aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/lp872x.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/drivers/regulator/lp872x.c b/drivers/regulator/lp872x.c
index 86485e823f05..708f4b6a17dc 100644
--- a/drivers/regulator/lp872x.c
+++ b/drivers/regulator/lp872x.c
@@ -729,28 +729,6 @@ static struct regulator_desc lp8725_regulator_desc[] = {
729 }, 729 },
730}; 730};
731 731
732static int lp872x_check_dvs_validity(struct lp872x *lp)
733{
734 struct lp872x_dvs *dvs = lp->pdata->dvs;
735 u8 val = 0;
736 int ret;
737
738 ret = lp872x_read_byte(lp, LP872X_GENERAL_CFG, &val);
739 if (ret)
740 return ret;
741
742 ret = 0;
743 if (lp->chipid == LP8720) {
744 if (val & LP8720_EXT_DVS_M)
745 ret = dvs ? 0 : -EINVAL;
746 } else {
747 if ((val & LP8725_DVS1_M) == EXTERN_DVS_USED)
748 ret = dvs ? 0 : -EINVAL;
749 }
750
751 return ret;
752}
753
754static int lp872x_init_dvs(struct lp872x *lp) 732static int lp872x_init_dvs(struct lp872x *lp)
755{ 733{
756 int ret, gpio; 734 int ret, gpio;
@@ -762,12 +740,6 @@ static int lp872x_init_dvs(struct lp872x *lp)
762 if (!dvs) 740 if (!dvs)
763 goto set_default_dvs_mode; 741 goto set_default_dvs_mode;
764 742
765 ret = lp872x_check_dvs_validity(lp);
766 if (ret) {
767 dev_warn(lp->dev, "invalid dvs data: %d\n", ret);
768 return ret;
769 }
770
771 gpio = dvs->gpio; 743 gpio = dvs->gpio;
772 if (!gpio_is_valid(gpio)) { 744 if (!gpio_is_valid(gpio)) {
773 dev_err(lp->dev, "invalid gpio: %d\n", gpio); 745 dev_err(lp->dev, "invalid gpio: %d\n", gpio);