From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@kernel.org>
Cc: Markus Pargmann <mpa@pengutronix.de>,
Laxman Dewangan <ldewangan@nvidia.com>,
Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] regulator: tps65910: Simplify setting enable_mask for regulators
Date: Sat, 28 Dec 2013 11:02:35 +0800 [thread overview]
Message-ID: <1388199755.8941.0.camel@phoenix> (raw)
BBCH_BBCHEN_MASK is equivalent to TPS65910_SUPPLY_STATE_ENABLED.
So all regulators have the same enable_mask setting.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/tps65910-regulator.c | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c
index 979ea0a..f50dd84 100644
--- a/drivers/regulator/tps65910-regulator.c
+++ b/drivers/regulator/tps65910-regulator.c
@@ -1207,21 +1207,7 @@ static int tps65910_probe(struct platform_device *pdev)
pmic->desc[i].type = REGULATOR_VOLTAGE;
pmic->desc[i].owner = THIS_MODULE;
pmic->desc[i].enable_reg = pmic->get_ctrl_reg(i);
-
- switch (i) {
- case TPS65910_REG_VBB:
- if (tps65910_chip_id(tps65910) == TPS65910)
- pmic->desc[i].enable_mask = BBCH_BBCHEN_MASK;
- else
- pmic->desc[i].enable_mask =
- TPS65910_SUPPLY_STATE_ENABLED;
- break;
-
- default:
- pmic->desc[i].enable_mask =
- TPS65910_SUPPLY_STATE_ENABLED;
- break;
- }
+ pmic->desc[i].enable_mask = TPS65910_SUPPLY_STATE_ENABLED;
config.dev = tps65910->dev;
config.init_data = reg_data;
--
1.8.1.2
next reply other threads:[~2013-12-28 3:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-28 3:02 Axel Lin [this message]
2013-12-28 17:03 ` [PATCH] regulator: tps65910: Simplify setting enable_mask for regulators 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=1388199755.8941.0.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=broonie@kernel.org \
--cc=ldewangan@nvidia.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpa@pengutronix.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