diff options
Diffstat (limited to 'include/linux/mfd/wm8350/pmic.h')
-rw-r--r-- | include/linux/mfd/wm8350/pmic.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/include/linux/mfd/wm8350/pmic.h b/include/linux/mfd/wm8350/pmic.h index 96acbfc8aa12..be3264e286e0 100644 --- a/include/linux/mfd/wm8350/pmic.h +++ b/include/linux/mfd/wm8350/pmic.h | |||
@@ -13,6 +13,10 @@ | |||
13 | #ifndef __LINUX_MFD_WM8350_PMIC_H | 13 | #ifndef __LINUX_MFD_WM8350_PMIC_H |
14 | #define __LINUX_MFD_WM8350_PMIC_H | 14 | #define __LINUX_MFD_WM8350_PMIC_H |
15 | 15 | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/leds.h> | ||
18 | #include <linux/regulator/machine.h> | ||
19 | |||
16 | /* | 20 | /* |
17 | * Register values. | 21 | * Register values. |
18 | */ | 22 | */ |
@@ -700,6 +704,33 @@ struct wm8350; | |||
700 | struct platform_device; | 704 | struct platform_device; |
701 | struct regulator_init_data; | 705 | struct regulator_init_data; |
702 | 706 | ||
707 | /* | ||
708 | * WM8350 LED platform data | ||
709 | */ | ||
710 | struct wm8350_led_platform_data { | ||
711 | const char *name; | ||
712 | const char *default_trigger; | ||
713 | int max_uA; | ||
714 | }; | ||
715 | |||
716 | struct wm8350_led { | ||
717 | struct platform_device *pdev; | ||
718 | struct mutex mutex; | ||
719 | struct work_struct work; | ||
720 | spinlock_t value_lock; | ||
721 | enum led_brightness value; | ||
722 | struct led_classdev cdev; | ||
723 | int max_uA_index; | ||
724 | int enabled; | ||
725 | |||
726 | struct regulator *isink; | ||
727 | struct regulator_consumer_supply isink_consumer; | ||
728 | struct regulator_init_data isink_init; | ||
729 | struct regulator *dcdc; | ||
730 | struct regulator_consumer_supply dcdc_consumer; | ||
731 | struct regulator_init_data dcdc_init; | ||
732 | }; | ||
733 | |||
703 | struct wm8350_pmic { | 734 | struct wm8350_pmic { |
704 | /* Number of regulators of each type on this device */ | 735 | /* Number of regulators of each type on this device */ |
705 | int max_dcdc; | 736 | int max_dcdc; |
@@ -717,10 +748,15 @@ struct wm8350_pmic { | |||
717 | 748 | ||
718 | /* regulator devices */ | 749 | /* regulator devices */ |
719 | struct platform_device *pdev[NUM_WM8350_REGULATORS]; | 750 | struct platform_device *pdev[NUM_WM8350_REGULATORS]; |
751 | |||
752 | /* LED devices */ | ||
753 | struct wm8350_led led[2]; | ||
720 | }; | 754 | }; |
721 | 755 | ||
722 | int wm8350_register_regulator(struct wm8350 *wm8350, int reg, | 756 | int wm8350_register_regulator(struct wm8350 *wm8350, int reg, |
723 | struct regulator_init_data *initdata); | 757 | struct regulator_init_data *initdata); |
758 | int wm8350_register_led(struct wm8350 *wm8350, int lednum, int dcdc, int isink, | ||
759 | struct wm8350_led_platform_data *pdata); | ||
724 | 760 | ||
725 | /* | 761 | /* |
726 | * Additional DCDC control not supported via regulator API | 762 | * Additional DCDC control not supported via regulator API |