summaryrefslogtreecommitdiffstats
path: root/include/linux/regulator
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2013-03-21 15:59:01 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-03-22 12:03:16 +0100
commit3c1b8438d4bc99269aba560739e3e6cb640584f4 (patch)
tree5600247d4c4943ec15b27bf4df52ca6ed8426c12 /include/linux/regulator
parent7ce4669c8feefe0c772e9d5f3ae65160e20d8458 (diff)
ARM: ux500: regulators: Add mask for configuration
There is already before a register mask in the regulator driver to allow some bits of a register to be initialized. The register value is defined in the board configuration. This patch puts a mask in the board configuration to specify which bits should actually be altered. The purpose with this patch is to avoid future mistakes when updating the allowed bits in the regulator driver. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/linux/regulator')
-rw-r--r--include/linux/regulator/ab8500.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h
index 2c6c9625013..a1d245f13d9 100644
--- a/include/linux/regulator/ab8500.h
+++ b/include/linux/regulator/ab8500.h
@@ -48,13 +48,15 @@ enum ab9540_regulator_id {
/* AB8500 and AB9540 register initialization */
struct ab8500_regulator_reg_init {
int id;
+ u8 mask;
u8 value;
};
-#define INIT_REGULATOR_REGISTER(_id, _value) \
- { \
- .id = _id, \
- .value = _value, \
+#define INIT_REGULATOR_REGISTER(_id, _mask, _value) \
+ { \
+ .id = _id, \
+ .mask = _mask, \
+ .value = _value, \
}
/* AB8500 registers */