From: Amit Daniel Kachhap <amit.daniel@samsung.com>
To: linux-kernel@vger.kernel.org
Cc: Sangbeom Kim <sbkim73@samsung.com>, Liam Girdwood <lrg@ti.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
amit.kachhap@gmail.com,
Thomas Abraham <thomas.abraham@linaro.org>,
kgene.kim@samsung.com, linux-samsung-soc@vger.kernel.org
Subject: [PATCH 3/4] regulator: s5m8767: Fix to work even if no DVS gpio present
Date: Mon, 10 Dec 2012 18:19:41 +0530 [thread overview]
Message-ID: <1355143782-15133-4-git-send-email-amit.daniel@samsung.com> (raw)
In-Reply-To: <1355143782-15133-1-git-send-email-amit.daniel@samsung.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
---
drivers/regulator/s5m8767.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c
index 7ed7591..9f991f2 100644
--- a/drivers/regulator/s5m8767.c
+++ b/drivers/regulator/s5m8767.c
@@ -626,9 +626,16 @@ static 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])) {
+ if (pdata->buck2_gpiodvs || pdata->buck3_gpiodvs ||
+ pdata->buck4_gpiodvs) {
+
+ if (!gpio_is_valid(pdata->buck_gpios[0]) ||
+ !gpio_is_valid(pdata->buck_gpios[1]) ||
+ !gpio_is_valid(pdata->buck_gpios[2])) {
+ dev_err(&pdev->dev, "GPIO NOT VALID\n");
+ return -EINVAL;
+ }
+
ret = devm_gpio_request(&pdev->dev, pdata->buck_gpios[0],
"S5M8767 SET1");
if (ret)
@@ -653,10 +660,6 @@ static int s5m8767_pmic_probe(struct platform_device *pdev)
/* SET3 GPIO */
gpio_direction_output(pdata->buck_gpios[2],
(s5m8767->buck_gpioindex >> 0) & 0x1);
- } else {
- dev_err(&pdev->dev, "GPIO NOT VALID\n");
- ret = -EINVAL;
- return ret;
}
ret = devm_gpio_request(&pdev->dev, pdata->buck_ds[0], "S5M8767 DS2");
--
1.7.1
next prev parent reply other threads:[~2012-12-10 12:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-10 12:49 [PATCH 0/4] regulator: s5m8767: Small fixes and device support Amit Daniel Kachhap
2012-12-10 12:49 ` [PATCH 1/4] regulator: s5m8767: Fix to work when platform registers less regulators Amit Daniel Kachhap
2012-12-11 3:44 ` Mark Brown
2012-12-10 12:49 ` [PATCH 2/4] regulator: s5m8767: Fix to read the first DVS register Amit Daniel Kachhap
2012-12-11 3:47 ` Mark Brown
2012-12-10 12:49 ` Amit Daniel Kachhap [this message]
2012-12-11 3:48 ` [PATCH 3/4] regulator: s5m8767: Fix to work even if no DVS gpio present Mark Brown
2012-12-10 12:49 ` [PATCH 4/4] regulator: add device tree support for s5m8767 Amit Daniel Kachhap
2013-01-08 22:07 ` Thomas Abraham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1355143782-15133-4-git-send-email-amit.daniel@samsung.com \
--to=amit.daniel@samsung.com \
--cc=amit.kachhap@gmail.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=kgene.kim@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=lrg@ti.com \
--cc=sbkim73@samsung.com \
--cc=thomas.abraham@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®