diff options
author | Lee Jones <lee.jones@linaro.org> | 2013-03-21 19:59:01 +0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-22 15:03:16 +0400 |
commit | 3c1b8438d4bc99269aba560739e3e6cb640584f4 (patch) | |
tree | 5600247d4c4943ec15b27bf4df52ca6ed8426c12 /include/linux/regulator | |
parent | 7ce4669c8feefe0c772e9d5f3ae65160e20d8458 (diff) | |
download | linux-3c1b8438d4bc99269aba560739e3e6cb640584f4.tar.xz |
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.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h index 2c6c9625013c..a1d245f13d9c 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 */ |