Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312637
b: refs/heads/master
c: 5febb3c
h: refs/heads/master
i:
  312635: 79b3a30
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Jul 15, 2012
1 parent 0888fda commit 936f131
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 26 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: 8fa25eda86b1a149fd19b5ce80d8cf7b6c8fb566
refs/heads/master: 5febb3c9d52c65686a8e473a31f15137852f4b5e
49 changes: 24 additions & 25 deletions trunk/drivers/regulator/s5m8767.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,20 +620,21 @@ static __devinit int s5m8767_pmic_probe(struct platform_device *pdev)
if (gpio_is_valid(pdata->buck_gpios[0]) &&
gpio_is_valid(pdata->buck_gpios[1]) &&
gpio_is_valid(pdata->buck_gpios[2])) {
ret = gpio_request(pdata->buck_gpios[0], "S5M8767 SET1");
if (ret == -EBUSY)
dev_warn(&pdev->dev, "Duplicated gpio request"
" for SET1\n");

ret = gpio_request(pdata->buck_gpios[1], "S5M8767 SET2");
if (ret == -EBUSY)
dev_warn(&pdev->dev, "Duplicated gpio request"
" for SET2\n");

ret = gpio_request(pdata->buck_gpios[2], "S5M8767 SET3");
if (ret == -EBUSY)
dev_warn(&pdev->dev, "Duplicated gpio request"
" for SET3\n");
ret = devm_gpio_request(&pdev->dev, pdata->buck_gpios[0],
"S5M8767 SET1");
if (ret)
return ret;

ret = devm_gpio_request(&pdev->dev, pdata->buck_gpios[1],
"S5M8767 SET2");
if (ret)
return ret;

ret = devm_gpio_request(&pdev->dev, pdata->buck_gpios[2],
"S5M8767 SET3");
if (ret)
return ret;

/* SET1 GPIO */
gpio_direction_output(pdata->buck_gpios[0],
(s5m8767->buck_gpioindex >> 2) & 0x1);
Expand All @@ -643,25 +644,23 @@ static __devinit int s5m8767_pmic_probe(struct platform_device *pdev)
/* SET3 GPIO */
gpio_direction_output(pdata->buck_gpios[2],
(s5m8767->buck_gpioindex >> 0) & 0x1);
ret = 0;

} else {
dev_err(&pdev->dev, "GPIO NOT VALID\n");
ret = -EINVAL;
return ret;
}

ret = gpio_request(pdata->buck_ds[0], "S5M8767 DS2");
if (ret == -EBUSY)
dev_warn(&pdev->dev, "Duplicated gpio request for DS2\n");
ret = devm_gpio_request(&pdev->dev, pdata->buck_ds[0], "S5M8767 DS2");
if (ret)
return ret;

ret = gpio_request(pdata->buck_ds[1], "S5M8767 DS3");
if (ret == -EBUSY)
dev_warn(&pdev->dev, "Duplicated gpio request for DS3\n");
ret = devm_gpio_request(&pdev->dev, pdata->buck_ds[1], "S5M8767 DS3");
if (ret)
return ret;

ret = gpio_request(pdata->buck_ds[2], "S5M8767 DS4");
if (ret == -EBUSY)
dev_warn(&pdev->dev, "Duplicated gpio request for DS4\n");
ret = devm_gpio_request(&pdev->dev, pdata->buck_ds[2], "S5M8767 DS4");
if (ret)
return ret;

/* DS2 GPIO */
gpio_direction_output(pdata->buck_ds[0], 0x0);
Expand Down

0 comments on commit 936f131

Please sign in to comment.