]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
regulator: lp872x: Remove warning about invalid DVS GPIO
authorPaul Kocialkowski <contact@paulk.fr>
Fri, 5 Feb 2016 18:42:18 +0000 (19:42 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 5 Feb 2016 18:57:08 +0000 (18:57 +0000)
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>
drivers/regulator/lp872x.c

index 19d75848655311c4afb7d343a5ce5b1242610627..21c49d871aba6316c7b0549ea3bd2ce0c14741e5 100644 (file)
@@ -738,10 +738,8 @@ static int lp872x_init_dvs(struct lp872x *lp)
                goto set_default_dvs_mode;
 
        gpio = dvs->gpio;
-       if (!gpio_is_valid(gpio)) {
-               dev_warn(lp->dev, "invalid gpio: %d\n", gpio);
+       if (!gpio_is_valid(gpio))
                goto set_default_dvs_mode;
-       }
 
        pinstate = dvs->init_state;
        ret = devm_gpio_request_one(lp->dev, gpio, pinstate, "LP872X DVS");