regulator: Use _cansleep() for WM8994 regulator GPIOs
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 24 May 2011 15:14:40 +0000 (23:14 +0800)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Mon, 30 May 2011 10:56:58 +0000 (11:56 +0100)
The WM8994 regulator driver is perfectly happy if the GPIO used to enable
the regulator sleeps so call the appropriate GPIO API.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
drivers/regulator/wm8994-regulator.c

index 35b2958d51064a84950deef280a14603b1e4e0da..1a6a690f24dbecc415c7c7f9c5006573a767ef0b 100644 (file)
@@ -43,7 +43,7 @@ static int wm8994_ldo_enable(struct regulator_dev *rdev)
        if (!ldo->enable)
                return 0;
 
-       gpio_set_value(ldo->enable, 1);
+       gpio_set_value_cansleep(ldo->enable, 1);
        ldo->is_enabled = true;
 
        return 0;
@@ -57,7 +57,7 @@ static int wm8994_ldo_disable(struct regulator_dev *rdev)
        if (!ldo->enable)
                return -EINVAL;
 
-       gpio_set_value(ldo->enable, 0);
+       gpio_set_value_cansleep(ldo->enable, 0);
        ldo->is_enabled = false;
 
        return 0;