* [PATCH 1/2] regulator: wm8994: Convert to gpio_request_one()
@ 2012-05-07 17:19 Mark Brown
2012-05-07 17:19 ` [PATCH 2/2] regulator: wm831x-dcdc: " Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2012-05-07 17:19 UTC (permalink / raw)
To: Liam Girdwood; +Cc: linux-kernel, patches, Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/regulator/wm8994-regulator.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/regulator/wm8994-regulator.c b/drivers/regulator/wm8994-regulator.c
index e07972f..739207b 100644
--- a/drivers/regulator/wm8994-regulator.c
+++ b/drivers/regulator/wm8994-regulator.c
@@ -182,19 +182,12 @@ static __devinit int wm8994_ldo_probe(struct platform_device *pdev)
if (pdata->ldo[id].enable && gpio_is_valid(pdata->ldo[id].enable)) {
ldo->enable = pdata->ldo[id].enable;
- ret = gpio_request(ldo->enable, "WM8994 LDO enable");
+ ret = gpio_request_one(ldo->enable, 0, "WM8994 LDO enable");
if (ret < 0) {
dev_err(&pdev->dev, "Failed to get enable GPIO: %d\n",
ret);
goto err;
}
-
- ret = gpio_direction_output(ldo->enable, ldo->is_enabled);
- if (ret < 0) {
- dev_err(&pdev->dev, "Failed to set GPIO up: %d\n",
- ret);
- goto err_gpio;
- }
} else
ldo->is_enabled = true;
--
1.7.10
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH 2/2] regulator: wm831x-dcdc: Convert to gpio_request_one()
2012-05-07 17:19 [PATCH 1/2] regulator: wm8994: Convert to gpio_request_one() Mark Brown
@ 2012-05-07 17:19 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-05-07 17:19 UTC (permalink / raw)
To: Liam Girdwood; +Cc: linux-kernel, patches, Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/regulator/wm831x-dcdc.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c
index f2ab926..13c71c6 100644
--- a/drivers/regulator/wm831x-dcdc.c
+++ b/drivers/regulator/wm831x-dcdc.c
@@ -403,23 +403,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;
}
--
1.7.10
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-07 17:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-07 17:19 [PATCH 1/2] regulator: wm8994: Convert to gpio_request_one() Mark Brown
2012-05-07 17:19 ` [PATCH 2/2] regulator: wm831x-dcdc: " Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®