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>
This commit is contained in:
Tero Kristo 2012-02-16 12:27:52 +02:00 committed by Mark Brown
parent a33b6e5a8f
commit 63bfff4e20
3 changed files with 56 additions and 6 deletions

View file

@ -749,6 +749,13 @@ struct twl4030_platform_data {
struct regulator_init_data *vio6025;
};
struct twl_regulator_driver_data {
int (*set_voltage)(void *data, int target_uV);
int (*get_voltage)(void *data);
void *data;
unsigned long features;
};
/*----------------------------------------------------------------------*/
int twl4030_sih_setup(int module);