From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Daniel Jeong <gshark.jeong@gmail.com>, Liam Girdwood <lrg@ti.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] regulator: lp8755: Remove enum bucks
Date: Mon, 07 Jan 2013 10:28:31 +0800 [thread overview]
Message-ID: <1357525711.16331.1.camel@phoenix> (raw)
We already have enum lp8755_bucks in lp8755.h, so it looks pointless adding
enum bucks in lp8755.c.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/lp8755.c | 50 +++++++++++++++-----------------------------
1 file changed, 17 insertions(+), 33 deletions(-)
diff --git a/drivers/regulator/lp8755.c b/drivers/regulator/lp8755.c
index dbc4d12..29a1f81 100644
--- a/drivers/regulator/lp8755.c
+++ b/drivers/regulator/lp8755.c
@@ -37,15 +37,6 @@
#define LP8755_BUCK_LINEAR_OUT_MAX 0x76
#define LP8755_BUCK_VOUT_M 0x7F
-enum bucks {
- BUCK0 = 0,
- BUCK1,
- BUCK2,
- BUCK3,
- BUCK4,
- BUCK5,
-};
-
struct lp8755_mphase {
int nreg;
int buck_num[LP8755_BUCK_MAX];
@@ -262,33 +253,26 @@ static struct regulator_ops lp8755_buck_ops = {
}
static struct regulator_init_data lp8755_reg_default[LP8755_BUCK_MAX] = {
- [BUCK0] = lp8755_buck_init(0),
- [BUCK1] = lp8755_buck_init(1),
- [BUCK2] = lp8755_buck_init(2),
- [BUCK3] = lp8755_buck_init(3),
- [BUCK4] = lp8755_buck_init(4),
- [BUCK5] = lp8755_buck_init(5),
+ [LP8755_BUCK0] = lp8755_buck_init(0),
+ [LP8755_BUCK1] = lp8755_buck_init(1),
+ [LP8755_BUCK2] = lp8755_buck_init(2),
+ [LP8755_BUCK3] = lp8755_buck_init(3),
+ [LP8755_BUCK4] = lp8755_buck_init(4),
+ [LP8755_BUCK5] = lp8755_buck_init(5),
};
static const struct lp8755_mphase mphase_buck[MPHASE_CONF_MAX] = {
- {3, {BUCK0, BUCK3, BUCK5}
- },
- {6, {BUCK0, BUCK1, BUCK2, BUCK3, BUCK4, BUCK5}
- },
- {5, {BUCK0, BUCK2, BUCK3, BUCK4, BUCK5}
- },
- {4, {BUCK0, BUCK3, BUCK4, BUCK5}
- },
- {3, {BUCK0, BUCK4, BUCK5}
- },
- {2, {BUCK0, BUCK5}
- },
- {1, {BUCK0}
- },
- {2, {BUCK0, BUCK3}
- },
- {4, {BUCK0, BUCK2, BUCK3, BUCK5}
- },
+ { 3, { LP8755_BUCK0, LP8755_BUCK3, LP8755_BUCK5 } },
+ { 6, { LP8755_BUCK0, LP8755_BUCK1, LP8755_BUCK2, LP8755_BUCK3,
+ LP8755_BUCK4, LP8755_BUCK5 } },
+ { 5, { LP8755_BUCK0, LP8755_BUCK2, LP8755_BUCK3, LP8755_BUCK4,
+ LP8755_BUCK5} },
+ { 4, { LP8755_BUCK0, LP8755_BUCK3, LP8755_BUCK4, LP8755_BUCK5} },
+ { 3, { LP8755_BUCK0, LP8755_BUCK4, LP8755_BUCK5} },
+ { 2, { LP8755_BUCK0, LP8755_BUCK5} },
+ { 1, { LP8755_BUCK0} },
+ { 2, { LP8755_BUCK0, LP8755_BUCK3} },
+ { 4, { LP8755_BUCK0, LP8755_BUCK2, LP8755_BUCK3, LP8755_BUCK5} },
};
static int lp8755_init_data(struct lp8755_chip *pchip)
--
1.7.9.5
next reply other threads:[~2013-01-07 2:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-07 2:28 Axel Lin [this message]
2013-01-17 7:13 ` [PATCH] regulator: lp8755: Remove enum bucks 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=1357525711.16331.1.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=gshark.jeong@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
/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).