aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2016-02-05 13:42:18 -0500
committerMark Brown <broonie@kernel.org>2016-02-05 13:57:08 -0500
commit690f44badf2f44b8ec09098118b74f789f95e2c8 (patch)
tree624763eb5b055bb2fdc90cda6d144b3ccc5614d1
parent92e963f50fc74041b5e9e744c330dca48e04f08d (diff)
regulator: lp872x: Remove warning about invalid DVS GPIO
Some devices don't hook the DVS pin to a GPIO but to ground or VCC. In those cases, it is not a problem to have no DVS GPIO provided, as the current code will already switch to software-only DVS selection: When the DVS GPIO is invalid, lp872x_init_dvs jumps to the set_default_dvs_mode label, which instructs the chip not to use the DVS pin at all and do it all in software instead (by clearing the LP8720_EXT_DVS_M bit in the LP872X_GENERAL_CFG register). That is reflected later in the code, when setting the bucks (the DVS pin only applies to the bucks) by checking for the LP8720_EXT_DVS_M bit on the LP872X_GENERAL_CFG register (in lp872x_select_buck_vout_addr) to decide whether to use software or hardware DVS selection. Thus, there is no need to print a warning when the DVS GPIO is invalid. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/regulator/lp872x.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/regulator/lp872x.c b/drivers/regulator/lp872x.c
index 19d758486553..21c49d871aba 100644
--- a/drivers/regulator/lp872x.c
+++ b/drivers/regulator/lp872x.c
@@ -738,10 +738,8 @@ static int lp872x_init_dvs(struct lp872x *lp)
738 goto set_default_dvs_mode; 738 goto set_default_dvs_mode;
739 739
740 gpio = dvs->gpio; 740 gpio = dvs->gpio;
741 if (!gpio_is_valid(gpio)) { 741 if (!gpio_is_valid(gpio))
742 dev_warn(lp->dev, "invalid gpio: %d\n", gpio);
743 goto set_default_dvs_mode; 742 goto set_default_dvs_mode;
744 }
745 743
746 pinstate = dvs->init_state; 744 pinstate = dvs->init_state;
747 ret = devm_gpio_request_one(lp->dev, gpio, pinstate, "LP872X DVS"); 745 ret = devm_gpio_request_one(lp->dev, gpio, pinstate, "LP872X DVS");