regulator: Default GPIO controlled WM8994 regulators to disabled
authorJoonyoung Shim <jy0922.shim@samsung.com>
Fri, 6 Aug 2010 14:48:24 +0000 (15:48 +0100)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Wed, 11 Aug 2010 10:38:02 +0000 (11:38 +0100)
This ensures that if the GPIO was not enabled prior to the driver
starting the regulator API will insert the required powerup ramp
delay when it enables the regulator.  The gpiolib API does not
provide this information.

[Rewrote changelog to describe the actual change -- broonie.]

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
drivers/regulator/wm8994-regulator.c

index 5a1dc8a..03713bc 100644 (file)
@@ -219,8 +219,6 @@ static __devinit int wm8994_ldo_probe(struct platform_device *pdev)
 
        ldo->wm8994 = wm8994;
 
 
        ldo->wm8994 = wm8994;
 
-       ldo->is_enabled = true;
-
        if (pdata->ldo[id].enable && gpio_is_valid(pdata->ldo[id].enable)) {
                ldo->enable = pdata->ldo[id].enable;
 
        if (pdata->ldo[id].enable && gpio_is_valid(pdata->ldo[id].enable)) {
                ldo->enable = pdata->ldo[id].enable;
 
@@ -237,7 +235,8 @@ static __devinit int wm8994_ldo_probe(struct platform_device *pdev)
                                ret);
                        goto err_gpio;
                }
                                ret);
                        goto err_gpio;
                }
-       }
+       } else
+               ldo->is_enabled = true;
 
        ldo->regulator = regulator_register(&wm8994_ldo_desc[id], &pdev->dev,
                                             pdata->ldo[id].init_data, ldo);
 
        ldo->regulator = regulator_register(&wm8994_ldo_desc[id], &pdev->dev,
                                             pdata->ldo[id].init_data, ldo);