diff options
Diffstat (limited to 'include/linux/mfd/mc13783.h')
-rw-r--r-- | include/linux/mfd/mc13783.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/include/linux/mfd/mc13783.h b/include/linux/mfd/mc13783.h index 8895d9d8879c..0fa44fb8dd26 100644 --- a/include/linux/mfd/mc13783.h +++ b/include/linux/mfd/mc13783.h | |||
@@ -21,6 +21,8 @@ int mc13783_reg_write(struct mc13783 *mc13783, unsigned int offset, u32 val); | |||
21 | int mc13783_reg_rmw(struct mc13783 *mc13783, unsigned int offset, | 21 | int mc13783_reg_rmw(struct mc13783 *mc13783, unsigned int offset, |
22 | u32 mask, u32 val); | 22 | u32 mask, u32 val); |
23 | 23 | ||
24 | int mc13783_get_flags(struct mc13783 *mc13783); | ||
25 | |||
24 | int mc13783_irq_request(struct mc13783 *mc13783, int irq, | 26 | int mc13783_irq_request(struct mc13783 *mc13783, int irq, |
25 | irq_handler_t handler, const char *name, void *dev); | 27 | irq_handler_t handler, const char *name, void *dev); |
26 | int mc13783_irq_request_nounmask(struct mc13783 *mc13783, int irq, | 28 | int mc13783_irq_request_nounmask(struct mc13783 *mc13783, int irq, |
@@ -64,6 +66,70 @@ static inline int mc13783_ackirq(struct mc13783 *mc13783, int irq) | |||
64 | MC13783_ADC0_TSMOD1 | \ | 66 | MC13783_ADC0_TSMOD1 | \ |
65 | MC13783_ADC0_TSMOD2) | 67 | MC13783_ADC0_TSMOD2) |
66 | 68 | ||
69 | struct mc13783_led_platform_data { | ||
70 | #define MC13783_LED_MD 0 | ||
71 | #define MC13783_LED_AD 1 | ||
72 | #define MC13783_LED_KP 2 | ||
73 | #define MC13783_LED_R1 3 | ||
74 | #define MC13783_LED_G1 4 | ||
75 | #define MC13783_LED_B1 5 | ||
76 | #define MC13783_LED_R2 6 | ||
77 | #define MC13783_LED_G2 7 | ||
78 | #define MC13783_LED_B2 8 | ||
79 | #define MC13783_LED_R3 9 | ||
80 | #define MC13783_LED_G3 10 | ||
81 | #define MC13783_LED_B3 11 | ||
82 | #define MC13783_LED_MAX MC13783_LED_B3 | ||
83 | int id; | ||
84 | const char *name; | ||
85 | const char *default_trigger; | ||
86 | |||
87 | /* Three or two bits current selection depending on the led */ | ||
88 | char max_current; | ||
89 | }; | ||
90 | |||
91 | struct mc13783_leds_platform_data { | ||
92 | int num_leds; | ||
93 | struct mc13783_led_platform_data *led; | ||
94 | |||
95 | #define MC13783_LED_TRIODE_MD (1 << 0) | ||
96 | #define MC13783_LED_TRIODE_AD (1 << 1) | ||
97 | #define MC13783_LED_TRIODE_KP (1 << 2) | ||
98 | #define MC13783_LED_BOOST_EN (1 << 3) | ||
99 | #define MC13783_LED_TC1HALF (1 << 4) | ||
100 | #define MC13783_LED_SLEWLIMTC (1 << 5) | ||
101 | #define MC13783_LED_SLEWLIMBL (1 << 6) | ||
102 | #define MC13783_LED_TRIODE_TC1 (1 << 7) | ||
103 | #define MC13783_LED_TRIODE_TC2 (1 << 8) | ||
104 | #define MC13783_LED_TRIODE_TC3 (1 << 9) | ||
105 | int flags; | ||
106 | |||
107 | #define MC13783_LED_AB_DISABLED 0 | ||
108 | #define MC13783_LED_AB_MD1 1 | ||
109 | #define MC13783_LED_AB_MD12 2 | ||
110 | #define MC13783_LED_AB_MD123 3 | ||
111 | #define MC13783_LED_AB_MD1234 4 | ||
112 | #define MC13783_LED_AB_MD1234_AD1 5 | ||
113 | #define MC13783_LED_AB_MD1234_AD12 6 | ||
114 | #define MC13783_LED_AB_MD1_AD 7 | ||
115 | char abmode; | ||
116 | |||
117 | #define MC13783_LED_ABREF_200MV 0 | ||
118 | #define MC13783_LED_ABREF_400MV 1 | ||
119 | #define MC13783_LED_ABREF_600MV 2 | ||
120 | #define MC13783_LED_ABREF_800MV 3 | ||
121 | char abref; | ||
122 | |||
123 | #define MC13783_LED_PERIOD_10MS 0 | ||
124 | #define MC13783_LED_PERIOD_100MS 1 | ||
125 | #define MC13783_LED_PERIOD_500MS 2 | ||
126 | #define MC13783_LED_PERIOD_2S 3 | ||
127 | char bl_period; | ||
128 | char tc1_period; | ||
129 | char tc2_period; | ||
130 | char tc3_period; | ||
131 | }; | ||
132 | |||
67 | /* to be cleaned up */ | 133 | /* to be cleaned up */ |
68 | struct regulator_init_data; | 134 | struct regulator_init_data; |
69 | 135 | ||
@@ -80,12 +146,14 @@ struct mc13783_regulator_platform_data { | |||
80 | struct mc13783_platform_data { | 146 | struct mc13783_platform_data { |
81 | int num_regulators; | 147 | int num_regulators; |
82 | struct mc13783_regulator_init_data *regulators; | 148 | struct mc13783_regulator_init_data *regulators; |
149 | struct mc13783_leds_platform_data *leds; | ||
83 | 150 | ||
84 | #define MC13783_USE_TOUCHSCREEN (1 << 0) | 151 | #define MC13783_USE_TOUCHSCREEN (1 << 0) |
85 | #define MC13783_USE_CODEC (1 << 1) | 152 | #define MC13783_USE_CODEC (1 << 1) |
86 | #define MC13783_USE_ADC (1 << 2) | 153 | #define MC13783_USE_ADC (1 << 2) |
87 | #define MC13783_USE_RTC (1 << 3) | 154 | #define MC13783_USE_RTC (1 << 3) |
88 | #define MC13783_USE_REGULATOR (1 << 4) | 155 | #define MC13783_USE_REGULATOR (1 << 4) |
156 | #define MC13783_USE_LED (1 << 5) | ||
89 | unsigned int flags; | 157 | unsigned int flags; |
90 | }; | 158 | }; |
91 | 159 | ||