diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-07 19:19:08 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-07 19:23:50 +0200 |
commit | 053fa1b75244c4be0d4b4065f80f31deaf2f24a7 (patch) | |
tree | 0df9191235afccfbdc0090e0b7fcb3aa7223ab8d /drivers | |
parent | regulator: wm8994: Convert to gpio_request_one() (diff) | |
download | linux-053fa1b75244c4be0d4b4065f80f31deaf2f24a7.tar.xz linux-053fa1b75244c4be0d4b4065f80f31deaf2f24a7.zip |
regulator: wm831x-dcdc: Convert to gpio_request_one()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/regulator/wm831x-dcdc.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c index c9648635febf..a2acafde2478 100644 --- a/drivers/regulator/wm831x-dcdc.c +++ b/drivers/regulator/wm831x-dcdc.c @@ -438,23 +438,17 @@ static __devinit void wm831x_buckv_dvs_init(struct wm831x_dcdc *dcdc, if (!pdata || !pdata->dvs_gpio) return; - ret = gpio_request(pdata->dvs_gpio, "DCDC DVS"); - if (ret < 0) { - dev_err(wm831x->dev, "Failed to get %s DVS GPIO: %d\n", - dcdc->name, ret); - return; - } - /* gpiolib won't let us read the GPIO status so pick the higher * of the two existing voltages so we take it as platform data. */ dcdc->dvs_gpio_state = pdata->dvs_init_state; - ret = gpio_direction_output(pdata->dvs_gpio, dcdc->dvs_gpio_state); + ret = gpio_request_one(pdata->dvs_gpio, + dcdc->dvs_gpio_state ? GPIOF_INIT_HIGH : 0, + "DCDC DVS"); if (ret < 0) { - dev_err(wm831x->dev, "Failed to enable %s DVS GPIO: %d\n", + dev_err(wm831x->dev, "Failed to get %s DVS GPIO: %d\n", dcdc->name, ret); - gpio_free(pdata->dvs_gpio); return; } |