diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mfd/arizona-irq.c | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/drivers/mfd/arizona-irq.c b/drivers/mfd/arizona-irq.c index 98ac345f468e..64940c6da93c 100644 --- a/drivers/mfd/arizona-irq.c +++ b/drivers/mfd/arizona-irq.c | |||
@@ -156,18 +156,35 @@ int arizona_irq_init(struct arizona *arizona) | |||
156 | int flags = IRQF_ONESHOT; | 156 | int flags = IRQF_ONESHOT; |
157 | int ret, i; | 157 | int ret, i; |
158 | const struct regmap_irq_chip *aod, *irq; | 158 | const struct regmap_irq_chip *aod, *irq; |
159 | bool ctrlif_error = true; | ||
159 | 160 | ||
160 | switch (arizona->type) { | 161 | switch (arizona->type) { |
161 | #ifdef CONFIG_MFD_WM5102 | 162 | #ifdef CONFIG_MFD_WM5102 |
162 | case WM5102: | 163 | case WM5102: |
163 | aod = &wm5102_aod; | 164 | aod = &wm5102_aod; |
164 | irq = &wm5102_irq; | 165 | irq = &wm5102_irq; |
166 | |||
167 | switch (arizona->rev) { | ||
168 | case 0: | ||
169 | ctrlif_error = false; | ||
170 | break; | ||
171 | default: | ||
172 | break; | ||
173 | } | ||
165 | break; | 174 | break; |
166 | #endif | 175 | #endif |
167 | #ifdef CONFIG_MFD_WM5110 | 176 | #ifdef CONFIG_MFD_WM5110 |
168 | case WM5110: | 177 | case WM5110: |
169 | aod = &wm5110_aod; | 178 | aod = &wm5110_aod; |
170 | irq = &wm5110_irq; | 179 | irq = &wm5110_irq; |
180 | |||
181 | switch (arizona->rev) { | ||
182 | case 0: | ||
183 | ctrlif_error = false; | ||
184 | break; | ||
185 | default: | ||
186 | break; | ||
187 | } | ||
171 | break; | 188 | break; |
172 | #endif | 189 | #endif |
173 | default: | 190 | default: |
@@ -226,13 +243,17 @@ int arizona_irq_init(struct arizona *arizona) | |||
226 | } | 243 | } |
227 | 244 | ||
228 | /* Handle control interface errors in the core */ | 245 | /* Handle control interface errors in the core */ |
229 | i = arizona_map_irq(arizona, ARIZONA_IRQ_CTRLIF_ERR); | 246 | if (ctrlif_error) { |
230 | ret = request_threaded_irq(i, NULL, arizona_ctrlif_err, IRQF_ONESHOT, | 247 | i = arizona_map_irq(arizona, ARIZONA_IRQ_CTRLIF_ERR); |
231 | "Control interface error", arizona); | 248 | ret = request_threaded_irq(i, NULL, arizona_ctrlif_err, |
232 | if (ret != 0) { | 249 | IRQF_ONESHOT, |
233 | dev_err(arizona->dev, "Failed to request boot done %d: %d\n", | 250 | "Control interface error", arizona); |
234 | arizona->irq, ret); | 251 | if (ret != 0) { |
235 | goto err_ctrlif; | 252 | dev_err(arizona->dev, |
253 | "Failed to request CTRLIF_ERR %d: %d\n", | ||
254 | arizona->irq, ret); | ||
255 | goto err_ctrlif; | ||
256 | } | ||
236 | } | 257 | } |
237 | 258 | ||
238 | ret = request_threaded_irq(arizona->irq, NULL, arizona_irq_thread, | 259 | ret = request_threaded_irq(arizona->irq, NULL, arizona_irq_thread, |