diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-10-10 15:58:15 +0100 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2008-10-13 21:51:56 +0100 |
commit | da09155ac8d3f04c299b3d82a6ab0df8d03da632 (patch) | |
tree | d6a74be9aa350179d51f5a0ffbcbf06c37a11d37 /include/linux/mfd/wm8350 | |
parent | ebccec0fa4e35dff0c18663a492a65f4dc6cad7a (diff) |
regulator: Add WM8350 regulator support
The WM8350 features six DCDC convertors (four buck and two boost), four
LDO voltage regulators and two constant current sinks. This driver adds
support for these through the regulator API.
This driver was written by Liam Girdwood with updates for submission
from Mark Brown.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'include/linux/mfd/wm8350')
-rw-r--r-- | include/linux/mfd/wm8350/core.h | 5 | ||||
-rw-r--r-- | include/linux/mfd/wm8350/pmic.h | 42 |
2 files changed, 47 insertions, 0 deletions
diff --git a/include/linux/mfd/wm8350/core.h b/include/linux/mfd/wm8350/core.h index d86d38260c6..348101cb00d 100644 --- a/include/linux/mfd/wm8350/core.h +++ b/include/linux/mfd/wm8350/core.h @@ -17,6 +17,8 @@ #include <linux/mutex.h> #include <linux/workqueue.h> +#include <linux/mfd/wm8350/pmic.h> + /* * Register values. */ @@ -570,6 +572,9 @@ struct wm8350 { struct mutex irq_mutex; /* IRQ table mutex */ struct wm8350_irq irq[WM8350_NUM_IRQ]; int chip_irq; + + /* Client devices */ + struct wm8350_pmic pmic; }; /** diff --git a/include/linux/mfd/wm8350/pmic.h b/include/linux/mfd/wm8350/pmic.h index 28d2fab2787..69b69e07f62 100644 --- a/include/linux/mfd/wm8350/pmic.h +++ b/include/linux/mfd/wm8350/pmic.h @@ -696,4 +696,46 @@ #define NUM_WM8350_REGULATORS 12 +struct wm8350; +struct platform_device; +struct regulator_init_data; + +struct wm8350_pmic { + /* ISINK to DCDC mapping */ + int isink_A_dcdc; + int isink_B_dcdc; + + /* hibernate configs */ + u16 dcdc1_hib_mode; + u16 dcdc3_hib_mode; + u16 dcdc4_hib_mode; + u16 dcdc6_hib_mode; + + /* regulator devices */ + struct platform_device *pdev[NUM_WM8350_REGULATORS]; +}; + +int wm8350_register_regulator(struct wm8350 *wm8350, int reg, + struct regulator_init_data *initdata); + +/* + * Additional DCDC control not supported via regulator API + */ +int wm8350_dcdc_set_slot(struct wm8350 *wm8350, int dcdc, u16 start, + u16 stop, u16 fault); +int wm8350_dcdc25_set_mode(struct wm8350 *wm8350, int dcdc, u16 mode, + u16 ilim, u16 ramp, u16 feedback); + +/* + * Additional LDO control not supported via regulator API + */ +int wm8350_ldo_set_slot(struct wm8350 *wm8350, int ldo, u16 start, u16 stop); + +/* + * Additional ISINK control not supported via regulator API + */ +int wm8350_isink_set_flash(struct wm8350 *wm8350, int isink, u16 mode, + u16 trigger, u16 duration, u16 on_ramp, + u16 off_ramp, u16 drive); + #endif |