Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 302260
b: refs/heads/master
c: 053fa1b
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed May 7, 2012
1 parent ba3a0b3 commit 8de1692
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 09e3fd202df67ec5d6d9a04c05b58c7367580226
refs/heads/master: 053fa1b75244c4be0d4b4065f80f31deaf2f24a7
14 changes: 4 additions & 10 deletions trunk/drivers/regulator/wm831x-dcdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 8de1692

Please sign in to comment.