aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/wm831x-dcdc.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-05-07 13:19:08 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-05-07 13:23:50 -0400
commit053fa1b75244c4be0d4b4065f80f31deaf2f24a7 (patch)
tree0df9191235afccfbdc0090e0b7fcb3aa7223ab8d /drivers/regulator/wm831x-dcdc.c
parent09e3fd202df67ec5d6d9a04c05b58c7367580226 (diff)
regulator: wm831x-dcdc: Convert to gpio_request_one()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/wm831x-dcdc.c')
-rw-r--r--drivers/regulator/wm831x-dcdc.c14
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,
438 if (!pdata || !pdata->dvs_gpio) 438 if (!pdata || !pdata->dvs_gpio)
439 return; 439 return;
440 440
441 ret = gpio_request(pdata->dvs_gpio, "DCDC DVS");
442 if (ret < 0) {
443 dev_err(wm831x->dev, "Failed to get %s DVS GPIO: %d\n",
444 dcdc->name, ret);
445 return;
446 }
447
448 /* gpiolib won't let us read the GPIO status so pick the higher 441 /* gpiolib won't let us read the GPIO status so pick the higher
449 * of the two existing voltages so we take it as platform data. 442 * of the two existing voltages so we take it as platform data.
450 */ 443 */
451 dcdc->dvs_gpio_state = pdata->dvs_init_state; 444 dcdc->dvs_gpio_state = pdata->dvs_init_state;
452 445
453 ret = gpio_direction_output(pdata->dvs_gpio, dcdc->dvs_gpio_state); 446 ret = gpio_request_one(pdata->dvs_gpio,
447 dcdc->dvs_gpio_state ? GPIOF_INIT_HIGH : 0,
448 "DCDC DVS");
454 if (ret < 0) { 449 if (ret < 0) {
455 dev_err(wm831x->dev, "Failed to enable %s DVS GPIO: %d\n", 450 dev_err(wm831x->dev, "Failed to get %s DVS GPIO: %d\n",
456 dcdc->name, ret); 451 dcdc->name, ret);
457 gpio_free(pdata->dvs_gpio);
458 return; 452 return;
459 } 453 }
460 454