diff options
| author | Laxman Dewangan <ldewangan@nvidia.com> | 2011-02-01 01:19:38 +0530 |
|---|---|---|
| committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-04-26 15:50:53 -0700 |
| commit | fe79cb1b6701a2d10647698dfb70eefbcd9a197e (patch) | |
| tree | 37fa838aae0aec1bdf800e0d8a72e7a7ac699bfd /include/linux | |
| parent | c5ef41350a7b771ef5ea3b4374f4b3c9a40af62d (diff) | |
arm: regulator: gpio_switch: Registering gpio rails as sub devices.
Registering gpio rails as sub devices of platform device in place of
registering all the rails as different platform device.
The kernel pmu driver have all rails as regulator devices under
platform devices.
Original-Change-Id: I7a636ce47b0d715ccca4d0d6c92b76c578c5e5dc
Reviewed-on: http://git-master/r/17620
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Hanumanth Venkateswa Moganty <vmoganty@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Jonathan Mayo <jmayo@nvidia.com>
Change-Id: If2347bf775edfbef0129219064723138249e70ce
Diffstat (limited to 'include/linux')
| -rwxr-xr-x | include/linux/gpio-switch-regulator.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/include/linux/gpio-switch-regulator.h b/include/linux/gpio-switch-regulator.h index 2b02e4bfd5b4..611081272216 100755 --- a/include/linux/gpio-switch-regulator.h +++ b/include/linux/gpio-switch-regulator.h @@ -22,10 +22,10 @@ #include <linux/regulator/machine.h> /* - * struct gpio_regulator_switch_platform_data - Gpio based regulato switch - * platform data. + * struct gpio_switch_regulator_subdev_data - Gpio switch regulator subdevice + * data. * - * Platform data to register a gpio regulator switch device driver. + * Subdevice data to register a gpio regulator switch device driver. * * @regulator_name: The name of regulator. * @input_supply: Input supply name. @@ -38,7 +38,7 @@ * @num_consumer_supplies: Number of cosumer supplies. * @consumer_supplies: List of consumer spllies. */ -struct gpio_switch_regulator_platform_data { +struct gpio_switch_regulator_subdev_data { const char *regulator_name; const char *input_supply; int id; @@ -51,8 +51,19 @@ struct gpio_switch_regulator_platform_data { struct regulator_consumer_supply *consumer_supplies; int num_consumer_supplies; struct regulation_constraints constraints; - int (*enable_rail)(struct gpio_switch_regulator_platform_data *pdata); - int (*disable_rail)(struct gpio_switch_regulator_platform_data *pdata); + int (*enable_rail)(struct gpio_switch_regulator_subdev_data *pdata); + int (*disable_rail)(struct gpio_switch_regulator_subdev_data *pdata); + +}; +/** + * gpio_switch_regulator_platform_data - platform data for gpio_switch_regulator + * @num_subdevs: number of regulators used + * @subdevs: pointer to regulators used + */ +struct gpio_switch_regulator_platform_data { + int num_subdevs; + struct gpio_switch_regulator_subdev_data *subdevs; }; + #endif |
