From: NeilBrown <neilb@suse.de>
To: Liam Girdwood <lrg@ti.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: linux-kernel@vger.kernel.org, NeilBrown <neilb@suse.de>
Subject: [PATCH 1/2] twl-regulator: define all feature flags in one place.
Date: Wed, 02 May 2012 06:44:50 +1000 [thread overview]
Message-ID: <20120501204449.27026.29720.stgit@notabene.brown> (raw)
In-Reply-To: <20120501204259.27026.40156.stgit@notabene.brown>
twl-regulator has a collection of feature flags, some defined
in twl-core.c and one defined in i2c/twl.h.
This is confusing for anyone adding a new feature flag.
So collect them together and place them in twl.h immediately
after the structure in which they are initially set.
Signed-off-by: NeilBrown <neilb@suse.de>
---
drivers/mfd/twl-core.c | 7 -------
include/linux/i2c/twl.h | 8 ++++++--
2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 4cbf285..269b296 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -224,13 +224,6 @@
#define HIGH_PERF_SQ (1 << 3)
#define CK32K_LOWPWR_EN (1 << 7)
-
-/* chip-specific feature flags, for i2c_device_id.driver_data */
-#define TWL4030_VAUX2 BIT(0) /* pre-5030 voltage ranges */
-#define TPS_SUBSET BIT(1) /* tps659[23]0 have fewer LDOs */
-#define TWL5031 BIT(2) /* twl5031 has different registers */
-#define TWL6030_CLASS BIT(3) /* TWL6030 class */
-
/*----------------------------------------------------------------------*/
/* is driver active, bound to a chip? */
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index b526031..88e8cd8 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -171,8 +171,6 @@ static inline int twl_class_is_ ##class(void) \
TWL_CLASS_IS(4030, TWL4030_CLASS_ID)
TWL_CLASS_IS(6030, TWL6030_CLASS_ID)
-#define TWL6025_SUBCLASS BIT(4) /* TWL6025 has changed registers */
-
/*
* Read and write single 8-bit registers
*/
@@ -748,6 +746,12 @@ struct twl_regulator_driver_data {
void *data;
unsigned long features;
};
+/* chip-specific feature flags, for twl_regulator_driver_data.features */
+#define TWL4030_VAUX2 BIT(0) /* pre-5030 voltage ranges */
+#define TPS_SUBSET BIT(1) /* tps659[23]0 have fewer LDOs */
+#define TWL5031 BIT(2) /* twl5031 has different registers */
+#define TWL6030_CLASS BIT(3) /* TWL6030 class */
+#define TWL6025_SUBCLASS BIT(4) /* TWL6025 has changed registers */
/*----------------------------------------------------------------------*/
next prev parent reply other threads:[~2012-05-01 20:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-01 20:44 [PATCH 0/2] Make TWL4030_ALLOW_UNSUPPORTED more configurable NeilBrown
2012-05-01 20:44 ` [PATCH 2/2] twl-regulator: make " NeilBrown
2012-05-02 9:11 ` Mark Brown
2012-05-08 18:40 ` Mark Brown
2012-05-08 19:47 ` NeilBrown
2012-05-09 9:03 ` Mark Brown
2012-05-01 20:44 ` NeilBrown [this message]
2012-05-02 9:08 ` [PATCH 1/2] twl-regulator: define all feature flags in one place Mark Brown
2012-05-09 19:50 ` Samuel Ortiz
2012-05-09 20:29 ` 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=20120501204449.27026.29720.stgit@notabene.brown \
--to=neilb@suse.de \
--cc=broonie@opensource.wolfsonmicro.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