diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-14 12:28:55 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-14 12:28:55 -0700 |
commit | c269bc00fcb876ae3b85f178f1e34601185c8ccc (patch) | |
tree | cae61de48c631301984a5e8be345be220adabb82 /include/linux/regulator | |
parent | 2d51b75370d83535883c66521b03fcd6a1f1f68d (diff) | |
parent | caf1859199e4360ffa826179bc0e881b0348f3ce (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6: (26 commits)
mfd: Fix warning in WM8350
mfd: Add placeholders for WM8350 client devices
da903x: add regulator support for DA9030/DA9034
mfd: Add WM8350 subdevice registration helper
regulator: Add WM8350 regulator support
mfd: Add WM8350 interrupt support
mfd: Add initialisation callback for WM8350
mfd: Add GPIO pin configuration support for WM8350
mfd: Add I2C control support for WM8350
mfd: Core support for the WM8350 AudioPlus PMIC
mfd: Add WM8350 watchdog register definitions
mfd: Add WM8350 RTC register definitions
mfd: Add WM8350 comparator register definitions
mfd: Add WM8350 PMU register definitions
mfd: Add WM8350 PMIC register definitions
mfd: Add WM8350 GPIO register definitions
mfd: Add WM8350 audio register definitions
regulator: Export regulator name via sysfs
regulator: Add WM8400 regulator support
mfd: Core support for the WM8400 AudioPlus HiFi CODEC and PMU
...
Diffstat (limited to 'include/linux/regulator')
-rw-r--r-- | include/linux/regulator/driver.h | 10 | ||||
-rw-r--r-- | include/linux/regulator/machine.h | 30 |
2 files changed, 30 insertions, 10 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 1d712c7172a..e37d8056198 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h @@ -18,8 +18,8 @@ #include <linux/device.h> #include <linux/regulator/consumer.h> -struct regulator_constraints; struct regulator_dev; +struct regulator_init_data; /** * struct regulator_ops - regulator operations. @@ -51,7 +51,7 @@ struct regulator_ops { int output_uV, int load_uA); /* the operations below are for configuration of regulator state when - * it's parent PMIC enters a global STANBY/HIBERNATE state */ + * its parent PMIC enters a global STANDBY/HIBERNATE state */ /* set regulator suspend voltage */ int (*set_suspend_voltage) (struct regulator_dev *, int uV); @@ -85,15 +85,17 @@ struct regulator_desc { struct module *owner; }; - struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, - void *reg_data); + struct device *dev, void *driver_data); void regulator_unregister(struct regulator_dev *rdev); int regulator_notifier_call_chain(struct regulator_dev *rdev, unsigned long event, void *data); void *rdev_get_drvdata(struct regulator_dev *rdev); +struct device *rdev_get_dev(struct regulator_dev *rdev); int rdev_get_id(struct regulator_dev *rdev); +void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data); + #endif diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h index 11e737dbfcf..c6d69331a81 100644 --- a/include/linux/regulator/machine.h +++ b/include/linux/regulator/machine.h @@ -89,15 +89,33 @@ struct regulation_constraints { unsigned apply_uV:1; /* apply uV constraint iff min == max */ }; -int regulator_set_supply(const char *regulator, const char *regulator_supply); +/** + * struct regulator_consumer_supply - supply -> device mapping + * + * This maps a supply name to a device. + */ +struct regulator_consumer_supply { + struct device *dev; /* consumer */ + const char *supply; /* consumer supply - e.g. "vcc" */ +}; -const char *regulator_get_supply(const char *regulator); +/** + * struct regulator_init_data - regulator platform initialisation data. + * + * Initialisation constraints, our supply and consumers supplies. + */ +struct regulator_init_data { + struct device *supply_regulator_dev; /* or NULL for LINE */ -int regulator_set_machine_constraints(const char *regulator, - struct regulation_constraints *constraints); + struct regulation_constraints constraints; -int regulator_set_device_supply(const char *regulator, struct device *dev, - const char *supply); + int num_consumer_supplies; + struct regulator_consumer_supply *consumer_supplies; + + /* optional regulator machine specific init */ + int (*regulator_init)(void *driver_data); + void *driver_data; /* core does not touch this */ +}; int regulator_suspend_prepare(suspend_state_t state); |