diff options
author | NeilBrown <neilb@suse.de> | 2012-05-08 15:43:59 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-09 05:04:23 -0400 |
commit | c30540d78e60068d5638b79f1bcc92b259c3c7e2 (patch) | |
tree | bdd455d6f5d3412f2f67b97d281023922253be5b /include/linux/i2c | |
parent | 1f904fd1cdbda0930f667ad6a1b304d3e8f8334f (diff) |
mfd: twl: define all feature flags in one place.
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>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/linux/i2c')
-rw-r--r-- | include/linux/i2c/twl.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index 2463b6100333..18fc937c867d 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) \ | |||
171 | TWL_CLASS_IS(4030, TWL4030_CLASS_ID) | 171 | TWL_CLASS_IS(4030, TWL4030_CLASS_ID) |
172 | TWL_CLASS_IS(6030, TWL6030_CLASS_ID) | 172 | TWL_CLASS_IS(6030, TWL6030_CLASS_ID) |
173 | 173 | ||
174 | #define TWL6025_SUBCLASS BIT(4) /* TWL6025 has changed registers */ | ||
175 | |||
176 | /* | 174 | /* |
177 | * Read and write single 8-bit registers | 175 | * Read and write single 8-bit registers |
178 | */ | 176 | */ |
@@ -758,6 +756,12 @@ struct twl_regulator_driver_data { | |||
758 | void *data; | 756 | void *data; |
759 | unsigned long features; | 757 | unsigned long features; |
760 | }; | 758 | }; |
759 | /* chip-specific feature flags, for twl_regulator_driver_data.features */ | ||
760 | #define TWL4030_VAUX2 BIT(0) /* pre-5030 voltage ranges */ | ||
761 | #define TPS_SUBSET BIT(1) /* tps659[23]0 have fewer LDOs */ | ||
762 | #define TWL5031 BIT(2) /* twl5031 has different registers */ | ||
763 | #define TWL6030_CLASS BIT(3) /* TWL6030 class */ | ||
764 | #define TWL6025_SUBCLASS BIT(4) /* TWL6025 has changed registers */ | ||
761 | 765 | ||
762 | /*----------------------------------------------------------------------*/ | 766 | /*----------------------------------------------------------------------*/ |
763 | 767 | ||