From 63bfff4e20211b464cbea6e79e5fd36df227c154 Mon Sep 17 00:00:00 2001 From: Tero Kristo Date: Thu, 16 Feb 2012 12:27:52 +0200 Subject: 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 Acked-by: Samuel Ortiz [for the MFD part] Signed-off-by: Mark Brown --- include/linux/i2c/twl.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/linux/i2c/twl.h') 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 { 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); -- cgit v1.2.3