diff options
author | Rob Herring <robh@kernel.org> | 2015-07-27 16:55:20 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2015-08-11 10:09:01 -0400 |
commit | 9bd09f345e62257958342f712efef644494274fb (patch) | |
tree | 8d1347a13be87f40319cd64598e930b4c32a2f93 | |
parent | 035faf4bd2776237940c95d08bfe8928fe0a80e1 (diff) |
mfd: Kill off set_irq_flags usage
set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:
IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN
For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also modify IRQ_NOPROBE and this has been maintained although it
is not clear that is really needed. There appears to be a great deal of
blind copy and paste of this code.
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r-- | drivers/mfd/88pm860x-core.c | 4 | ||||
-rw-r--r-- | drivers/mfd/ab8500-core.c | 4 | ||||
-rw-r--r-- | drivers/mfd/arizona-irq.c | 7 | ||||
-rw-r--r-- | drivers/mfd/asic3.c | 4 | ||||
-rw-r--r-- | drivers/mfd/db8500-prcmu.c | 1 | ||||
-rw-r--r-- | drivers/mfd/ezx-pcap.c | 6 | ||||
-rw-r--r-- | drivers/mfd/htc-egpio.c | 4 | ||||
-rw-r--r-- | drivers/mfd/htc-i2cpld.c | 6 | ||||
-rw-r--r-- | drivers/mfd/lp8788-irq.c | 5 | ||||
-rw-r--r-- | drivers/mfd/max8925-core.c | 5 | ||||
-rw-r--r-- | drivers/mfd/max8997-irq.c | 5 | ||||
-rw-r--r-- | drivers/mfd/max8998-irq.c | 5 | ||||
-rw-r--r-- | drivers/mfd/mt6397-core.c | 4 | ||||
-rw-r--r-- | drivers/mfd/pm8921-core.c | 5 | ||||
-rw-r--r-- | drivers/mfd/rc5t583-irq.c | 4 | ||||
-rw-r--r-- | drivers/mfd/stmpe.c | 7 | ||||
-rw-r--r-- | drivers/mfd/t7l66xb.c | 6 | ||||
-rw-r--r-- | drivers/mfd/tc3589x.c | 7 | ||||
-rw-r--r-- | drivers/mfd/tc6393xb.c | 4 | ||||
-rw-r--r-- | drivers/mfd/tps6586x.c | 7 | ||||
-rw-r--r-- | drivers/mfd/tps65912-irq.c | 8 | ||||
-rw-r--r-- | drivers/mfd/twl4030-irq.c | 11 | ||||
-rw-r--r-- | drivers/mfd/twl6030-irq.c | 13 | ||||
-rw-r--r-- | drivers/mfd/ucb1x00-core.c | 2 | ||||
-rw-r--r-- | drivers/mfd/wm831x-irq.c | 7 | ||||
-rw-r--r-- | drivers/mfd/wm8350-irq.c | 8 | ||||
-rw-r--r-- | drivers/mfd/wm8994-irq.c | 7 |
27 files changed, 17 insertions, 139 deletions
diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c index cb47d6e00ebe..3269a9990b24 100644 --- a/drivers/mfd/88pm860x-core.c +++ b/drivers/mfd/88pm860x-core.c | |||
@@ -558,11 +558,7 @@ static int pm860x_irq_domain_map(struct irq_domain *d, unsigned int virq, | |||
558 | irq_set_chip_data(virq, d->host_data); | 558 | irq_set_chip_data(virq, d->host_data); |
559 | irq_set_chip_and_handler(virq, &pm860x_irq_chip, handle_edge_irq); | 559 | irq_set_chip_and_handler(virq, &pm860x_irq_chip, handle_edge_irq); |
560 | irq_set_nested_thread(virq, 1); | 560 | irq_set_nested_thread(virq, 1); |
561 | #ifdef CONFIG_ARM | ||
562 | set_irq_flags(virq, IRQF_VALID); | ||
563 | #else | ||
564 | irq_set_noprobe(virq); | 561 | irq_set_noprobe(virq); |
565 | #endif | ||
566 | return 0; | 562 | return 0; |
567 | } | 563 | } |
568 | 564 | ||
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index 000da72a0ae9..fefbe4cfa61d 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c | |||
@@ -565,11 +565,7 @@ static int ab8500_irq_map(struct irq_domain *d, unsigned int virq, | |||
565 | irq_set_chip_and_handler(virq, &ab8500_irq_chip, | 565 | irq_set_chip_and_handler(virq, &ab8500_irq_chip, |
566 | handle_simple_irq); | 566 | handle_simple_irq); |
567 | irq_set_nested_thread(virq, 1); | 567 | irq_set_nested_thread(virq, 1); |
568 | #ifdef CONFIG_ARM | ||
569 | set_irq_flags(virq, IRQF_VALID); | ||
570 | #else | ||
571 | irq_set_noprobe(virq); | 568 | irq_set_noprobe(virq); |
572 | #endif | ||
573 | 569 | ||
574 | return 0; | 570 | return 0; |
575 | } | 571 | } |
diff --git a/drivers/mfd/arizona-irq.c b/drivers/mfd/arizona-irq.c index bb0063db6c4e..2cac4f463f1e 100644 --- a/drivers/mfd/arizona-irq.c +++ b/drivers/mfd/arizona-irq.c | |||
@@ -174,14 +174,7 @@ static int arizona_irq_map(struct irq_domain *h, unsigned int virq, | |||
174 | irq_set_chip_data(virq, data); | 174 | irq_set_chip_data(virq, data); |
175 | irq_set_chip_and_handler(virq, &arizona_irq_chip, handle_simple_irq); | 175 | irq_set_chip_and_handler(virq, &arizona_irq_chip, handle_simple_irq); |
176 | irq_set_nested_thread(virq, 1); | 176 | irq_set_nested_thread(virq, 1); |
177 | |||
178 | /* ARM needs us to explicitly flag the IRQ as valid | ||
179 | * and will set them noprobe when we do so. */ | ||
180 | #ifdef CONFIG_ARM | ||
181 | set_irq_flags(virq, IRQF_VALID); | ||
182 | #else | ||
183 | irq_set_noprobe(virq); | 177 | irq_set_noprobe(virq); |
184 | #endif | ||
185 | 178 | ||
186 | return 0; | 179 | return 0; |
187 | } | 180 | } |
diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c index 120df5c08741..4b54128bc78e 100644 --- a/drivers/mfd/asic3.c +++ b/drivers/mfd/asic3.c | |||
@@ -411,7 +411,7 @@ static int __init asic3_irq_probe(struct platform_device *pdev) | |||
411 | 411 | ||
412 | irq_set_chip_data(irq, asic); | 412 | irq_set_chip_data(irq, asic); |
413 | irq_set_handler(irq, handle_level_irq); | 413 | irq_set_handler(irq, handle_level_irq); |
414 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | 414 | irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE); |
415 | } | 415 | } |
416 | 416 | ||
417 | asic3_write_register(asic, ASIC3_OFFSET(INTR, INT_MASK), | 417 | asic3_write_register(asic, ASIC3_OFFSET(INTR, INT_MASK), |
@@ -431,7 +431,7 @@ static void asic3_irq_remove(struct platform_device *pdev) | |||
431 | irq_base = asic->irq_base; | 431 | irq_base = asic->irq_base; |
432 | 432 | ||
433 | for (irq = irq_base; irq < irq_base + ASIC3_NR_IRQS; irq++) { | 433 | for (irq = irq_base; irq < irq_base + ASIC3_NR_IRQS; irq++) { |
434 | set_irq_flags(irq, 0); | 434 | irq_set_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE); |
435 | irq_set_chip_and_handler(irq, NULL, NULL); | 435 | irq_set_chip_and_handler(irq, NULL, NULL); |
436 | irq_set_chip_data(irq, NULL); | 436 | irq_set_chip_data(irq, NULL); |
437 | } | 437 | } |
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index 8b14740f9fca..e6e4bacb09ee 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c | |||
@@ -2654,7 +2654,6 @@ static int db8500_irq_map(struct irq_domain *d, unsigned int virq, | |||
2654 | { | 2654 | { |
2655 | irq_set_chip_and_handler(virq, &prcmu_irq_chip, | 2655 | irq_set_chip_and_handler(virq, &prcmu_irq_chip, |
2656 | handle_simple_irq); | 2656 | handle_simple_irq); |
2657 | set_irq_flags(virq, IRQF_VALID); | ||
2658 | 2657 | ||
2659 | return 0; | 2658 | return 0; |
2660 | } | 2659 | } |
diff --git a/drivers/mfd/ezx-pcap.c b/drivers/mfd/ezx-pcap.c index 5991faddd3c6..19e55dd97a4e 100644 --- a/drivers/mfd/ezx-pcap.c +++ b/drivers/mfd/ezx-pcap.c | |||
@@ -463,11 +463,7 @@ static int ezx_pcap_probe(struct spi_device *spi) | |||
463 | for (i = pcap->irq_base; i < (pcap->irq_base + PCAP_NIRQS); i++) { | 463 | for (i = pcap->irq_base; i < (pcap->irq_base + PCAP_NIRQS); i++) { |
464 | irq_set_chip_and_handler(i, &pcap_irq_chip, handle_simple_irq); | 464 | irq_set_chip_and_handler(i, &pcap_irq_chip, handle_simple_irq); |
465 | irq_set_chip_data(i, pcap); | 465 | irq_set_chip_data(i, pcap); |
466 | #ifdef CONFIG_ARM | 466 | irq_clear_status_flags(i, IRQ_NOREQUEST | IRQ_NOPROBE); |
467 | set_irq_flags(i, IRQF_VALID); | ||
468 | #else | ||
469 | irq_set_noprobe(i); | ||
470 | #endif | ||
471 | } | 467 | } |
472 | 468 | ||
473 | /* mask/ack all PCAP interrupts */ | 469 | /* mask/ack all PCAP interrupts */ |
diff --git a/drivers/mfd/htc-egpio.c b/drivers/mfd/htc-egpio.c index 49f39feca784..c9d5e3fb4fd1 100644 --- a/drivers/mfd/htc-egpio.c +++ b/drivers/mfd/htc-egpio.c | |||
@@ -350,7 +350,7 @@ static int __init egpio_probe(struct platform_device *pdev) | |||
350 | irq_set_chip_and_handler(irq, &egpio_muxed_chip, | 350 | irq_set_chip_and_handler(irq, &egpio_muxed_chip, |
351 | handle_simple_irq); | 351 | handle_simple_irq); |
352 | irq_set_chip_data(irq, ei); | 352 | irq_set_chip_data(irq, ei); |
353 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | 353 | irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE); |
354 | } | 354 | } |
355 | irq_set_irq_type(ei->chained_irq, IRQ_TYPE_EDGE_RISING); | 355 | irq_set_irq_type(ei->chained_irq, IRQ_TYPE_EDGE_RISING); |
356 | irq_set_handler_data(ei->chained_irq, ei); | 356 | irq_set_handler_data(ei->chained_irq, ei); |
@@ -376,7 +376,7 @@ static int __exit egpio_remove(struct platform_device *pdev) | |||
376 | irq_end = ei->irq_start + ei->nirqs; | 376 | irq_end = ei->irq_start + ei->nirqs; |
377 | for (irq = ei->irq_start; irq < irq_end; irq++) { | 377 | for (irq = ei->irq_start; irq < irq_end; irq++) { |
378 | irq_set_chip_and_handler(irq, NULL, NULL); | 378 | irq_set_chip_and_handler(irq, NULL, NULL); |
379 | set_irq_flags(irq, 0); | 379 | irq_set_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE); |
380 | } | 380 | } |
381 | irq_set_chained_handler(ei->chained_irq, NULL); | 381 | irq_set_chained_handler(ei->chained_irq, NULL); |
382 | device_init_wakeup(&pdev->dev, 0); | 382 | device_init_wakeup(&pdev->dev, 0); |
diff --git a/drivers/mfd/htc-i2cpld.c b/drivers/mfd/htc-i2cpld.c index b54baad30164..1bd5b042c8b3 100644 --- a/drivers/mfd/htc-i2cpld.c +++ b/drivers/mfd/htc-i2cpld.c | |||
@@ -330,11 +330,7 @@ static int htcpld_setup_chip_irq( | |||
330 | irq_set_chip_and_handler(irq, &htcpld_muxed_chip, | 330 | irq_set_chip_and_handler(irq, &htcpld_muxed_chip, |
331 | handle_simple_irq); | 331 | handle_simple_irq); |
332 | irq_set_chip_data(irq, chip); | 332 | irq_set_chip_data(irq, chip); |
333 | #ifdef CONFIG_ARM | 333 | irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE); |
334 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
335 | #else | ||
336 | irq_set_probe(irq); | ||
337 | #endif | ||
338 | } | 334 | } |
339 | 335 | ||
340 | return ret; | 336 | return ret; |
diff --git a/drivers/mfd/lp8788-irq.c b/drivers/mfd/lp8788-irq.c index a87f2b548f71..c7a9825aa4ce 100644 --- a/drivers/mfd/lp8788-irq.c +++ b/drivers/mfd/lp8788-irq.c | |||
@@ -141,12 +141,7 @@ static int lp8788_irq_map(struct irq_domain *d, unsigned int virq, | |||
141 | irq_set_chip_data(virq, irqd); | 141 | irq_set_chip_data(virq, irqd); |
142 | irq_set_chip_and_handler(virq, chip, handle_edge_irq); | 142 | irq_set_chip_and_handler(virq, chip, handle_edge_irq); |
143 | irq_set_nested_thread(virq, 1); | 143 | irq_set_nested_thread(virq, 1); |
144 | |||
145 | #ifdef CONFIG_ARM | ||
146 | set_irq_flags(virq, IRQF_VALID); | ||
147 | #else | ||
148 | irq_set_noprobe(virq); | 144 | irq_set_noprobe(virq); |
149 | #endif | ||
150 | 145 | ||
151 | return 0; | 146 | return 0; |
152 | } | 147 | } |
diff --git a/drivers/mfd/max8925-core.c b/drivers/mfd/max8925-core.c index 8520bd68c1ff..fd8b15cd84fd 100644 --- a/drivers/mfd/max8925-core.c +++ b/drivers/mfd/max8925-core.c | |||
@@ -650,11 +650,8 @@ static int max8925_irq_domain_map(struct irq_domain *d, unsigned int virq, | |||
650 | irq_set_chip_data(virq, d->host_data); | 650 | irq_set_chip_data(virq, d->host_data); |
651 | irq_set_chip_and_handler(virq, &max8925_irq_chip, handle_edge_irq); | 651 | irq_set_chip_and_handler(virq, &max8925_irq_chip, handle_edge_irq); |
652 | irq_set_nested_thread(virq, 1); | 652 | irq_set_nested_thread(virq, 1); |
653 | #ifdef CONFIG_ARM | ||
654 | set_irq_flags(virq, IRQF_VALID); | ||
655 | #else | ||
656 | irq_set_noprobe(virq); | 653 | irq_set_noprobe(virq); |
657 | #endif | 654 | |
658 | return 0; | 655 | return 0; |
659 | } | 656 | } |
660 | 657 | ||
diff --git a/drivers/mfd/max8997-irq.c b/drivers/mfd/max8997-irq.c index d3025be57f39..684d901881dc 100644 --- a/drivers/mfd/max8997-irq.c +++ b/drivers/mfd/max8997-irq.c | |||
@@ -295,11 +295,8 @@ static int max8997_irq_domain_map(struct irq_domain *d, unsigned int irq, | |||
295 | irq_set_chip_data(irq, max8997); | 295 | irq_set_chip_data(irq, max8997); |
296 | irq_set_chip_and_handler(irq, &max8997_irq_chip, handle_edge_irq); | 296 | irq_set_chip_and_handler(irq, &max8997_irq_chip, handle_edge_irq); |
297 | irq_set_nested_thread(irq, 1); | 297 | irq_set_nested_thread(irq, 1); |
298 | #ifdef CONFIG_ARM | ||
299 | set_irq_flags(irq, IRQF_VALID); | ||
300 | #else | ||
301 | irq_set_noprobe(irq); | 298 | irq_set_noprobe(irq); |
302 | #endif | 299 | |
303 | return 0; | 300 | return 0; |
304 | } | 301 | } |
305 | 302 | ||
diff --git a/drivers/mfd/max8998-irq.c b/drivers/mfd/max8998-irq.c index 3702056628a8..35a077477ce2 100644 --- a/drivers/mfd/max8998-irq.c +++ b/drivers/mfd/max8998-irq.c | |||
@@ -206,11 +206,8 @@ static int max8998_irq_domain_map(struct irq_domain *d, unsigned int irq, | |||
206 | irq_set_chip_data(irq, max8998); | 206 | irq_set_chip_data(irq, max8998); |
207 | irq_set_chip_and_handler(irq, &max8998_irq_chip, handle_edge_irq); | 207 | irq_set_chip_and_handler(irq, &max8998_irq_chip, handle_edge_irq); |
208 | irq_set_nested_thread(irq, 1); | 208 | irq_set_nested_thread(irq, 1); |
209 | #ifdef CONFIG_ARM | ||
210 | set_irq_flags(irq, IRQF_VALID); | ||
211 | #else | ||
212 | irq_set_noprobe(irq); | 209 | irq_set_noprobe(irq); |
213 | #endif | 210 | |
214 | return 0; | 211 | return 0; |
215 | } | 212 | } |
216 | 213 | ||
diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c index 03929a6c6fc4..665d5e136b2d 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c | |||
@@ -142,11 +142,7 @@ static int mt6397_irq_domain_map(struct irq_domain *d, unsigned int irq, | |||
142 | irq_set_chip_data(irq, mt6397); | 142 | irq_set_chip_data(irq, mt6397); |
143 | irq_set_chip_and_handler(irq, &mt6397_irq_chip, handle_level_irq); | 143 | irq_set_chip_and_handler(irq, &mt6397_irq_chip, handle_level_irq); |
144 | irq_set_nested_thread(irq, 1); | 144 | irq_set_nested_thread(irq, 1); |
145 | #ifdef CONFIG_ARM | ||
146 | set_irq_flags(irq, IRQF_VALID); | ||
147 | #else | ||
148 | irq_set_noprobe(irq); | 145 | irq_set_noprobe(irq); |
149 | #endif | ||
150 | 146 | ||
151 | return 0; | 147 | return 0; |
152 | } | 148 | } |
diff --git a/drivers/mfd/pm8921-core.c b/drivers/mfd/pm8921-core.c index 00856a67d34b..24396d71a262 100644 --- a/drivers/mfd/pm8921-core.c +++ b/drivers/mfd/pm8921-core.c | |||
@@ -289,11 +289,8 @@ static int pm8xxx_irq_domain_map(struct irq_domain *d, unsigned int irq, | |||
289 | 289 | ||
290 | irq_set_chip_and_handler(irq, &pm8xxx_irq_chip, handle_level_irq); | 290 | irq_set_chip_and_handler(irq, &pm8xxx_irq_chip, handle_level_irq); |
291 | irq_set_chip_data(irq, chip); | 291 | irq_set_chip_data(irq, chip); |
292 | #ifdef CONFIG_ARM | ||
293 | set_irq_flags(irq, IRQF_VALID); | ||
294 | #else | ||
295 | irq_set_noprobe(irq); | 292 | irq_set_noprobe(irq); |
296 | #endif | 293 | |
297 | return 0; | 294 | return 0; |
298 | } | 295 | } |
299 | 296 | ||
diff --git a/drivers/mfd/rc5t583-irq.c b/drivers/mfd/rc5t583-irq.c index bb8502020274..3f8812daa304 100644 --- a/drivers/mfd/rc5t583-irq.c +++ b/drivers/mfd/rc5t583-irq.c | |||
@@ -386,9 +386,7 @@ int rc5t583_irq_init(struct rc5t583 *rc5t583, int irq, int irq_base) | |||
386 | irq_set_chip_and_handler(__irq, &rc5t583_irq_chip, | 386 | irq_set_chip_and_handler(__irq, &rc5t583_irq_chip, |
387 | handle_simple_irq); | 387 | handle_simple_irq); |
388 | irq_set_nested_thread(__irq, 1); | 388 | irq_set_nested_thread(__irq, 1); |
389 | #ifdef CONFIG_ARM | 389 | irq_clear_status_flags(__irq, IRQ_NOREQUEST); |
390 | set_irq_flags(__irq, IRQF_VALID); | ||
391 | #endif | ||
392 | } | 390 | } |
393 | 391 | ||
394 | ret = request_threaded_irq(irq, NULL, rc5t583_irq, IRQF_ONESHOT, | 392 | ret = request_threaded_irq(irq, NULL, rc5t583_irq, IRQF_ONESHOT, |
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c index 18c4d72d1d2a..e971af86ce1e 100644 --- a/drivers/mfd/stmpe.c +++ b/drivers/mfd/stmpe.c | |||
@@ -971,20 +971,13 @@ static int stmpe_irq_map(struct irq_domain *d, unsigned int virq, | |||
971 | irq_set_chip_data(virq, stmpe); | 971 | irq_set_chip_data(virq, stmpe); |
972 | irq_set_chip_and_handler(virq, chip, handle_edge_irq); | 972 | irq_set_chip_and_handler(virq, chip, handle_edge_irq); |
973 | irq_set_nested_thread(virq, 1); | 973 | irq_set_nested_thread(virq, 1); |
974 | #ifdef CONFIG_ARM | ||
975 | set_irq_flags(virq, IRQF_VALID); | ||
976 | #else | ||
977 | irq_set_noprobe(virq); | 974 | irq_set_noprobe(virq); |
978 | #endif | ||
979 | 975 | ||
980 | return 0; | 976 | return 0; |
981 | } | 977 | } |
982 | 978 | ||
983 | static void stmpe_irq_unmap(struct irq_domain *d, unsigned int virq) | 979 | static void stmpe_irq_unmap(struct irq_domain *d, unsigned int virq) |
984 | { | 980 | { |
985 | #ifdef CONFIG_ARM | ||
986 | set_irq_flags(virq, 0); | ||
987 | #endif | ||
988 | irq_set_chip_and_handler(virq, NULL, NULL); | 981 | irq_set_chip_and_handler(virq, NULL, NULL); |
989 | irq_set_chip_data(virq, NULL); | 982 | irq_set_chip_data(virq, NULL); |
990 | } | 983 | } |
diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c index 854b05f840bb..96d82980ead4 100644 --- a/drivers/mfd/t7l66xb.c +++ b/drivers/mfd/t7l66xb.c | |||
@@ -246,9 +246,6 @@ static void t7l66xb_attach_irq(struct platform_device *dev) | |||
246 | for (irq = irq_base; irq < irq_base + T7L66XB_NR_IRQS; irq++) { | 246 | for (irq = irq_base; irq < irq_base + T7L66XB_NR_IRQS; irq++) { |
247 | irq_set_chip_and_handler(irq, &t7l66xb_chip, handle_level_irq); | 247 | irq_set_chip_and_handler(irq, &t7l66xb_chip, handle_level_irq); |
248 | irq_set_chip_data(irq, t7l66xb); | 248 | irq_set_chip_data(irq, t7l66xb); |
249 | #ifdef CONFIG_ARM | ||
250 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
251 | #endif | ||
252 | } | 249 | } |
253 | 250 | ||
254 | irq_set_irq_type(t7l66xb->irq, IRQ_TYPE_EDGE_FALLING); | 251 | irq_set_irq_type(t7l66xb->irq, IRQ_TYPE_EDGE_FALLING); |
@@ -267,9 +264,6 @@ static void t7l66xb_detach_irq(struct platform_device *dev) | |||
267 | irq_set_handler_data(t7l66xb->irq, NULL); | 264 | irq_set_handler_data(t7l66xb->irq, NULL); |
268 | 265 | ||
269 | for (irq = irq_base; irq < irq_base + T7L66XB_NR_IRQS; irq++) { | 266 | for (irq = irq_base; irq < irq_base + T7L66XB_NR_IRQS; irq++) { |
270 | #ifdef CONFIG_ARM | ||
271 | set_irq_flags(irq, 0); | ||
272 | #endif | ||
273 | irq_set_chip(irq, NULL); | 267 | irq_set_chip(irq, NULL); |
274 | irq_set_chip_data(irq, NULL); | 268 | irq_set_chip_data(irq, NULL); |
275 | } | 269 | } |
diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c index 27e157908ce0..274bf39968aa 100644 --- a/drivers/mfd/tc3589x.c +++ b/drivers/mfd/tc3589x.c | |||
@@ -215,20 +215,13 @@ static int tc3589x_irq_map(struct irq_domain *d, unsigned int virq, | |||
215 | irq_set_chip_and_handler(virq, &dummy_irq_chip, | 215 | irq_set_chip_and_handler(virq, &dummy_irq_chip, |
216 | handle_edge_irq); | 216 | handle_edge_irq); |
217 | irq_set_nested_thread(virq, 1); | 217 | irq_set_nested_thread(virq, 1); |
218 | #ifdef CONFIG_ARM | ||
219 | set_irq_flags(virq, IRQF_VALID); | ||
220 | #else | ||
221 | irq_set_noprobe(virq); | 218 | irq_set_noprobe(virq); |
222 | #endif | ||
223 | 219 | ||
224 | return 0; | 220 | return 0; |
225 | } | 221 | } |
226 | 222 | ||
227 | static void tc3589x_irq_unmap(struct irq_domain *d, unsigned int virq) | 223 | static void tc3589x_irq_unmap(struct irq_domain *d, unsigned int virq) |
228 | { | 224 | { |
229 | #ifdef CONFIG_ARM | ||
230 | set_irq_flags(virq, 0); | ||
231 | #endif | ||
232 | irq_set_chip_and_handler(virq, NULL, NULL); | 225 | irq_set_chip_and_handler(virq, NULL, NULL); |
233 | irq_set_chip_data(virq, NULL); | 226 | irq_set_chip_data(virq, NULL); |
234 | } | 227 | } |
diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c index 63458b39a97d..c108472e5163 100644 --- a/drivers/mfd/tc6393xb.c +++ b/drivers/mfd/tc6393xb.c | |||
@@ -586,7 +586,7 @@ static void tc6393xb_attach_irq(struct platform_device *dev) | |||
586 | for (irq = irq_base; irq < irq_base + TC6393XB_NR_IRQS; irq++) { | 586 | for (irq = irq_base; irq < irq_base + TC6393XB_NR_IRQS; irq++) { |
587 | irq_set_chip_and_handler(irq, &tc6393xb_chip, handle_edge_irq); | 587 | irq_set_chip_and_handler(irq, &tc6393xb_chip, handle_edge_irq); |
588 | irq_set_chip_data(irq, tc6393xb); | 588 | irq_set_chip_data(irq, tc6393xb); |
589 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | 589 | irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE); |
590 | } | 590 | } |
591 | 591 | ||
592 | irq_set_irq_type(tc6393xb->irq, IRQ_TYPE_EDGE_FALLING); | 592 | irq_set_irq_type(tc6393xb->irq, IRQ_TYPE_EDGE_FALLING); |
@@ -605,7 +605,7 @@ static void tc6393xb_detach_irq(struct platform_device *dev) | |||
605 | irq_base = tc6393xb->irq_base; | 605 | irq_base = tc6393xb->irq_base; |
606 | 606 | ||
607 | for (irq = irq_base; irq < irq_base + TC6393XB_NR_IRQS; irq++) { | 607 | for (irq = irq_base; irq < irq_base + TC6393XB_NR_IRQS; irq++) { |
608 | set_irq_flags(irq, 0); | 608 | irq_set_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE); |
609 | irq_set_chip(irq, NULL); | 609 | irq_set_chip(irq, NULL); |
610 | irq_set_chip_data(irq, NULL); | 610 | irq_set_chip_data(irq, NULL); |
611 | } | 611 | } |
diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c index 4a87c1fe3495..5628a6b5b19b 100644 --- a/drivers/mfd/tps6586x.c +++ b/drivers/mfd/tps6586x.c | |||
@@ -299,14 +299,7 @@ static int tps6586x_irq_map(struct irq_domain *h, unsigned int virq, | |||
299 | irq_set_chip_data(virq, tps6586x); | 299 | irq_set_chip_data(virq, tps6586x); |
300 | irq_set_chip_and_handler(virq, &tps6586x_irq_chip, handle_simple_irq); | 300 | irq_set_chip_and_handler(virq, &tps6586x_irq_chip, handle_simple_irq); |
301 | irq_set_nested_thread(virq, 1); | 301 | irq_set_nested_thread(virq, 1); |
302 | |||
303 | /* ARM needs us to explicitly flag the IRQ as valid | ||
304 | * and will set them noprobe when we do so. */ | ||
305 | #ifdef CONFIG_ARM | ||
306 | set_irq_flags(virq, IRQF_VALID); | ||
307 | #else | ||
308 | irq_set_noprobe(virq); | 302 | irq_set_noprobe(virq); |
309 | #endif | ||
310 | 303 | ||
311 | return 0; | 304 | return 0; |
312 | } | 305 | } |
diff --git a/drivers/mfd/tps65912-irq.c b/drivers/mfd/tps65912-irq.c index fbecec7f1e3d..db2c29cb709b 100644 --- a/drivers/mfd/tps65912-irq.c +++ b/drivers/mfd/tps65912-irq.c | |||
@@ -197,13 +197,7 @@ int tps65912_irq_init(struct tps65912 *tps65912, int irq, | |||
197 | irq_set_chip_and_handler(cur_irq, &tps65912_irq_chip, | 197 | irq_set_chip_and_handler(cur_irq, &tps65912_irq_chip, |
198 | handle_edge_irq); | 198 | handle_edge_irq); |
199 | irq_set_nested_thread(cur_irq, 1); | 199 | irq_set_nested_thread(cur_irq, 1); |
200 | /* ARM needs us to explicitly flag the IRQ as valid | 200 | irq_clear_status_flags(cur_irq, IRQ_NOREQUEST | IRQ_NOPROBE); |
201 | * and will set them noprobe when we do so. */ | ||
202 | #ifdef CONFIG_ARM | ||
203 | set_irq_flags(cur_irq, IRQF_VALID); | ||
204 | #else | ||
205 | irq_set_noprobe(cur_irq); | ||
206 | #endif | ||
207 | } | 201 | } |
208 | 202 | ||
209 | ret = request_threaded_irq(irq, NULL, tps65912_irq, flags, | 203 | ret = request_threaded_irq(irq, NULL, tps65912_irq, flags, |
diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c index a3fa7f4f1fb4..40e51b0baa46 100644 --- a/drivers/mfd/twl4030-irq.c +++ b/drivers/mfd/twl4030-irq.c | |||
@@ -419,16 +419,7 @@ static int twl4030_init_sih_modules(unsigned line) | |||
419 | 419 | ||
420 | static inline void activate_irq(int irq) | 420 | static inline void activate_irq(int irq) |
421 | { | 421 | { |
422 | #ifdef CONFIG_ARM | 422 | irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE); |
423 | /* | ||
424 | * ARM requires an extra step to clear IRQ_NOREQUEST, which it | ||
425 | * sets on behalf of every irq_chip. Also sets IRQ_NOPROBE. | ||
426 | */ | ||
427 | set_irq_flags(irq, IRQF_VALID); | ||
428 | #else | ||
429 | /* same effect on other architectures */ | ||
430 | irq_set_noprobe(irq); | ||
431 | #endif | ||
432 | } | 423 | } |
433 | 424 | ||
434 | /*----------------------------------------------------------------------*/ | 425 | /*----------------------------------------------------------------------*/ |
diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c index 20fb58179ada..c1bb62473436 100644 --- a/drivers/mfd/twl6030-irq.c +++ b/drivers/mfd/twl6030-irq.c | |||
@@ -352,26 +352,13 @@ static int twl6030_irq_map(struct irq_domain *d, unsigned int virq, | |||
352 | irq_set_chip_and_handler(virq, &pdata->irq_chip, handle_simple_irq); | 352 | irq_set_chip_and_handler(virq, &pdata->irq_chip, handle_simple_irq); |
353 | irq_set_nested_thread(virq, true); | 353 | irq_set_nested_thread(virq, true); |
354 | irq_set_parent(virq, pdata->twl_irq); | 354 | irq_set_parent(virq, pdata->twl_irq); |
355 | |||
356 | #ifdef CONFIG_ARM | ||
357 | /* | ||
358 | * ARM requires an extra step to clear IRQ_NOREQUEST, which it | ||
359 | * sets on behalf of every irq_chip. Also sets IRQ_NOPROBE. | ||
360 | */ | ||
361 | set_irq_flags(virq, IRQF_VALID); | ||
362 | #else | ||
363 | /* same effect on other architectures */ | ||
364 | irq_set_noprobe(virq); | 355 | irq_set_noprobe(virq); |
365 | #endif | ||
366 | 356 | ||
367 | return 0; | 357 | return 0; |
368 | } | 358 | } |
369 | 359 | ||
370 | static void twl6030_irq_unmap(struct irq_domain *d, unsigned int virq) | 360 | static void twl6030_irq_unmap(struct irq_domain *d, unsigned int virq) |
371 | { | 361 | { |
372 | #ifdef CONFIG_ARM | ||
373 | set_irq_flags(virq, 0); | ||
374 | #endif | ||
375 | irq_set_chip_and_handler(virq, NULL, NULL); | 362 | irq_set_chip_and_handler(virq, NULL, NULL); |
376 | irq_set_chip_data(virq, NULL); | 363 | irq_set_chip_data(virq, NULL); |
377 | } | 364 | } |
diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c index 3591550598ad..616f5e4fbdc3 100644 --- a/drivers/mfd/ucb1x00-core.c +++ b/drivers/mfd/ucb1x00-core.c | |||
@@ -562,7 +562,7 @@ static int ucb1x00_probe(struct mcp *mcp) | |||
562 | 562 | ||
563 | irq_set_chip_and_handler(irq, &ucb1x00_irqchip, handle_edge_irq); | 563 | irq_set_chip_and_handler(irq, &ucb1x00_irqchip, handle_edge_irq); |
564 | irq_set_chip_data(irq, ucb); | 564 | irq_set_chip_data(irq, ucb); |
565 | set_irq_flags(irq, IRQF_VALID | IRQ_NOREQUEST); | 565 | irq_clear_status_flags(irq, IRQ_NOREQUEST); |
566 | } | 566 | } |
567 | 567 | ||
568 | irq_set_irq_type(ucb->irq, IRQ_TYPE_EDGE_RISING); | 568 | irq_set_irq_type(ucb->irq, IRQ_TYPE_EDGE_RISING); |
diff --git a/drivers/mfd/wm831x-irq.c b/drivers/mfd/wm831x-irq.c index 3da81263c764..dfea8b9c2fe6 100644 --- a/drivers/mfd/wm831x-irq.c +++ b/drivers/mfd/wm831x-irq.c | |||
@@ -552,14 +552,7 @@ static int wm831x_irq_map(struct irq_domain *h, unsigned int virq, | |||
552 | irq_set_chip_data(virq, h->host_data); | 552 | irq_set_chip_data(virq, h->host_data); |
553 | irq_set_chip_and_handler(virq, &wm831x_irq_chip, handle_edge_irq); | 553 | irq_set_chip_and_handler(virq, &wm831x_irq_chip, handle_edge_irq); |
554 | irq_set_nested_thread(virq, 1); | 554 | irq_set_nested_thread(virq, 1); |
555 | |||
556 | /* ARM needs us to explicitly flag the IRQ as valid | ||
557 | * and will set them noprobe when we do so. */ | ||
558 | #ifdef CONFIG_ARM | ||
559 | set_irq_flags(virq, IRQF_VALID); | ||
560 | #else | ||
561 | irq_set_noprobe(virq); | 555 | irq_set_noprobe(virq); |
562 | #endif | ||
563 | 556 | ||
564 | return 0; | 557 | return 0; |
565 | } | 558 | } |
diff --git a/drivers/mfd/wm8350-irq.c b/drivers/mfd/wm8350-irq.c index 813ff50f95b6..27054f357b8e 100644 --- a/drivers/mfd/wm8350-irq.c +++ b/drivers/mfd/wm8350-irq.c | |||
@@ -526,13 +526,7 @@ int wm8350_irq_init(struct wm8350 *wm8350, int irq, | |||
526 | handle_edge_irq); | 526 | handle_edge_irq); |
527 | irq_set_nested_thread(cur_irq, 1); | 527 | irq_set_nested_thread(cur_irq, 1); |
528 | 528 | ||
529 | /* ARM needs us to explicitly flag the IRQ as valid | 529 | irq_clear_status_flags(cur_irq, IRQ_NOREQUEST | IRQ_NOPROBE); |
530 | * and will set them noprobe when we do so. */ | ||
531 | #ifdef CONFIG_ARM | ||
532 | set_irq_flags(cur_irq, IRQF_VALID); | ||
533 | #else | ||
534 | irq_set_noprobe(cur_irq); | ||
535 | #endif | ||
536 | } | 530 | } |
537 | 531 | ||
538 | ret = request_threaded_irq(irq, NULL, wm8350_irq, flags, | 532 | ret = request_threaded_irq(irq, NULL, wm8350_irq, flags, |
diff --git a/drivers/mfd/wm8994-irq.c b/drivers/mfd/wm8994-irq.c index 55c380a67686..6f1427d32a93 100644 --- a/drivers/mfd/wm8994-irq.c +++ b/drivers/mfd/wm8994-irq.c | |||
@@ -172,14 +172,7 @@ static int wm8994_edge_irq_map(struct irq_domain *h, unsigned int virq, | |||
172 | irq_set_chip_data(virq, wm8994); | 172 | irq_set_chip_data(virq, wm8994); |
173 | irq_set_chip_and_handler(virq, &wm8994_edge_irq_chip, handle_edge_irq); | 173 | irq_set_chip_and_handler(virq, &wm8994_edge_irq_chip, handle_edge_irq); |
174 | irq_set_nested_thread(virq, 1); | 174 | irq_set_nested_thread(virq, 1); |
175 | |||
176 | /* ARM needs us to explicitly flag the IRQ as valid | ||
177 | * and will set them noprobe when we do so. */ | ||
178 | #ifdef CONFIG_ARM | ||
179 | set_irq_flags(virq, IRQF_VALID); | ||
180 | #else | ||
181 | irq_set_noprobe(virq); | 175 | irq_set_noprobe(virq); |
182 | #endif | ||
183 | 176 | ||
184 | return 0; | 177 | return 0; |
185 | } | 178 | } |