diff options
author | Alex Frid <afrid@nvidia.com> | 2014-02-04 18:54:30 -0800 |
---|---|---|
committer | Aleksandr Frid <afrid@nvidia.com> | 2014-02-07 11:18:38 -0800 |
commit | 24e84b589836a314f3e2a8676ead9819cf0865d5 (patch) | |
tree | 309a582271e8712c50f5c94e22d8a60b867ad028 /include | |
parent | 77c2db2ddf81946185eaf47db18a5b8b89efd536 (diff) |
mfd: palmas: Add SMPS VSEL volatile option
Currently all Palmas SMPS regulators voltage selection registers are
always cached. Added a regulator configuration flag to mark volatile
VSEL register. This flag can be set either in board platform data or
in device tree node for the regulator that is controlled by hardware
mechanism underneath s/w driver.
Change-Id: I733de6e2e9d42bbcc2359f033bfb8ddccdaf7202
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/363635
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mfd/palmas.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h index 55676e977182..34b22030a4bf 100644 --- a/include/linux/mfd/palmas.h +++ b/include/linux/mfd/palmas.h @@ -224,12 +224,14 @@ struct palmas_rtc; struct palmas_battery_info; #define palmas_rails(_name) "palmas_"#_name +#define PALMAS_MAX_FN_REGISTERS 64 struct palmas { struct device *dev; struct i2c_client *i2c_clients[PALMAS_NUM_CLIENTS]; struct regmap *regmap[PALMAS_NUM_CLIENTS]; + DECLARE_BITMAP(volatile_smps_registers, PALMAS_MAX_FN_REGISTERS); /* Stored chip id */ int id; @@ -815,6 +817,7 @@ enum usb_irq_events { /* helper macro to get correct slave number */ #define PALMAS_BASE_TO_SLAVE(x) ((x >> 8) - 1) #define PALMAS_BASE_TO_REG(x, y) ((x & 0xff) + y) +#define PALMAS_REG_TO_FN_ADDR(x, y) ((y) - ((x) & 0xff)) #define RTC_SLAVE 0 /* Base addresses of IP blocks in Palmas */ @@ -4055,6 +4058,7 @@ enum { PALMAS_REGULATOR_CONFIG_SUSPEND_FORCE_OFF = 0x1, PALMAS_REGULATOR_CONFIG_TRACKING_ENABLE = 0x2, PALMAS_REGULATOR_CONFIG_SUSPEND_TRACKING_DISABLE = 0x4, + PALMAS_REGULATOR_CONFIG_VSEL_VOLATILE = 0x8, }; /* |