From: Laxman Dewangan <ldewangan@nvidia.com>
To: <broonie@kernel.org>, <lgirdwood@gmail.com>
Cc: <linux-kernel@vger.kernel.org>, Laxman Dewangan <ldewangan@nvidia.com>
Subject: [RESEND PATCH 1/2] regulator: max8973: make default/unset dvs gpio as invalid gpio
Date: Wed, 6 May 2015 18:20:09 +0530 [thread overview]
Message-ID: <1430916610-29286-1-git-send-email-ldewangan@nvidia.com> (raw)
If platform data has dvs-gpio value 0 as default/unset then
make this as invalid gpio so that function gpio_is_valid()
can return false on this case.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
This patch is applied earlier but not able to apply on latest
so sending it again.
drivers/regulator/max8973-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/max8973-regulator.c b/drivers/regulator/max8973-regulator.c
index be9a463..3df5a84 100644
--- a/drivers/regulator/max8973-regulator.c
+++ b/drivers/regulator/max8973-regulator.c
@@ -413,7 +413,7 @@ static int max8973_probe(struct i2c_client *client,
}
if (pdata) {
- max->dvs_gpio = pdata->dvs_gpio;
+ max->dvs_gpio = (pdata->dvs_gpio) ? pdata->dvs_gpio : -EINVAL;
max->enable_external_control = pdata->enable_ext_control;
max->curr_gpio_val = pdata->dvs_def_state;
max->curr_vout_reg = MAX8973_VOUT + pdata->dvs_def_state;
--
2.1.4
next reply other threads:[~2015-05-06 12:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-06 12:50 Laxman Dewangan [this message]
2015-05-06 12:50 ` [RESEND PATCH 2/2] regulator: max8973: get rid of extra variable for gpio validity Laxman Dewangan
2015-05-21 21:10 ` Mark Brown
2015-05-21 21:10 ` [RESEND PATCH 1/2] regulator: max8973: make default/unset dvs gpio as invalid gpio Mark Brown
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=1430916610-29286-1-git-send-email-ldewangan@nvidia.com \
--to=ldewangan@nvidia.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.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®