diff options
author | Tero Kristo <t-kristo@ti.com> | 2012-02-16 05:27:52 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-11 16:08:45 -0400 |
commit | 63bfff4e20211b464cbea6e79e5fd36df227c154 (patch) | |
tree | 4ea7a62c37820578be7ecbc943f6e62a017c64e4 /include | |
parent | a33b6e5a8fb5fadeef206bacef13117e8a3080c4 (diff) |
regulator: twl4030: add support for external voltage get/set
This is needed for SMPS regulators, which use the OMAP voltage
processor for voltage get/set functions instead of the normal I2C
channel. For this purpose, regulator_init_data->driver_data contents
are expanded, it is now a struct which contains function pointers
for the set/get voltage operations, a data pointer for these, and
the previously used features bitmask.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com> [for the MFD part]
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/i2c/twl.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index 78d3465251d6..08a82d314f24 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
@@ -749,6 +749,13 @@ struct twl4030_platform_data { | |||
749 | struct regulator_init_data *vio6025; | 749 | struct regulator_init_data *vio6025; |
750 | }; | 750 | }; |
751 | 751 | ||
752 | struct twl_regulator_driver_data { | ||
753 | int (*set_voltage)(void *data, int target_uV); | ||
754 | int (*get_voltage)(void *data); | ||
755 | void *data; | ||
756 | unsigned long features; | ||
757 | }; | ||
758 | |||
752 | /*----------------------------------------------------------------------*/ | 759 | /*----------------------------------------------------------------------*/ |
753 | 760 | ||
754 | int twl4030_sih_setup(int module); | 761 | int twl4030_sih_setup(int module); |