From: Markus Pargmann <mpa@pengutronix.de>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Wolfram Sang <wsa@the-dreams.de>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org,
Markus Pargmann <mpa@pengutronix.de>
Subject: [PATCH 1/2] regulator: max8660: Remove boot_on handling
Date: Tue, 24 Mar 2015 13:08:02 +0100 [thread overview]
Message-ID: <1427198883-6577-1-git-send-email-mpa@pengutronix.de> (raw)
boot_on is handled by the regulator core. It will call enable() on the
regulators that are specified to be boot_on. So we don't require any
additional handling in this driver
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
drivers/regulator/max8660.c | 22 ++--------------------
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/drivers/regulator/max8660.c b/drivers/regulator/max8660.c
index 7eee2ca18541..32cf277a7662 100644
--- a/drivers/regulator/max8660.c
+++ b/drivers/regulator/max8660.c
@@ -385,7 +385,7 @@ static int max8660_probe(struct i2c_client *client,
struct max8660_platform_data *pdata = dev_get_platdata(dev);
struct regulator_config config = { };
struct max8660 *max8660;
- int boot_on, i, id, ret = -EINVAL;
+ int i, id, ret = -EINVAL;
struct device_node *of_node[MAX8660_V_END];
unsigned long type;
@@ -441,39 +441,21 @@ static int max8660_probe(struct i2c_client *client,
max8660->shadow_regs[MAX8660_MDTV2] = 0x04;
for (i = 0; i < pdata->num_subdevs; i++) {
-
if (!pdata->subdevs[i].platform_data)
- return ret;
-
- boot_on = pdata->subdevs[i].platform_data->constraints.boot_on;
+ return -EINVAL;
switch (pdata->subdevs[i].id) {
case MAX8660_V3:
- if (boot_on)
- max8660->shadow_regs[MAX8660_OVER1] |= 1;
- break;
-
case MAX8660_V4:
- if (boot_on)
- max8660->shadow_regs[MAX8660_OVER1] |= 4;
- break;
-
case MAX8660_V5:
- break;
-
case MAX8660_V6:
- if (boot_on)
- max8660->shadow_regs[MAX8660_OVER2] |= 2;
break;
-
case MAX8660_V7:
if (type == MAX8661) {
dev_err(dev, "Regulator not on this chip!\n");
return -EINVAL;
}
- if (boot_on)
- max8660->shadow_regs[MAX8660_OVER2] |= 4;
break;
default:
--
2.1.4
next reply other threads:[~2015-03-24 12:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-24 12:08 Markus Pargmann [this message]
2015-03-24 12:08 ` [PATCH 2/2] regulator: max8660: Add error message for missing regulator data Markus Pargmann
2015-03-24 12:38 ` Wolfram Sang
2015-03-24 16:36 ` Markus Pargmann
2015-03-24 16:08 ` Mark Brown
2015-03-24 16:40 ` Markus Pargmann
2015-03-24 17:07 ` Mark Brown
2015-03-24 16:22 ` [PATCH 1/2] regulator: max8660: Remove boot_on handling Mark Brown
2015-03-24 16:49 ` Markus Pargmann
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=1427198883-6577-1-git-send-email-mpa@pengutronix.de \
--to=mpa@pengutronix.de \
--cc=broonie@kernel.org \
--cc=kernel@pengutronix.de \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=wsa@the-dreams.de \
/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;
as well as URLs for NNTP newsgroup(s).