~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/mfd/wm831x-irq.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
515
515
                                 0xffff);
516
516
        }
517
517
 
518
 
        if (!irq) {
519
 
                dev_warn(wm831x->dev,
520
 
                         "No interrupt specified - functionality limited\n");
521
 
                return 0;
522
 
        }
523
 
 
524
518
        if (!pdata || !pdata->irq_base) {
525
519
                dev_err(wm831x->dev,
526
520
                        "No interrupt base specified, no interrupts\n");
553
547
        for (cur_irq = wm831x->irq_base;
554
548
             cur_irq < ARRAY_SIZE(wm831x_irqs) + wm831x->irq_base;
555
549
             cur_irq++) {
556
 
                set_irq_chip_data(cur_irq, wm831x);
557
 
                set_irq_chip_and_handler(cur_irq, &wm831x_irq_chip,
 
550
                irq_set_chip_data(cur_irq, wm831x);
 
551
                irq_set_chip_and_handler(cur_irq, &wm831x_irq_chip,
558
552
                                         handle_edge_irq);
559
 
                set_irq_nested_thread(cur_irq, 1);
 
553
                irq_set_nested_thread(cur_irq, 1);
560
554
 
561
555
                /* ARM needs us to explicitly flag the IRQ as valid
562
556
                 * and will set them noprobe when we do so. */
563
557
#ifdef CONFIG_ARM
564
558
                set_irq_flags(cur_irq, IRQF_VALID);
565
559
#else
566
 
                set_irq_noprobe(cur_irq);
 
560
                irq_set_noprobe(cur_irq);
567
561
#endif
568
562
        }
569
563
 
570
 
        ret = request_threaded_irq(irq, NULL, wm831x_irq_thread,
571
 
                                   IRQF_TRIGGER_LOW | IRQF_ONESHOT,
572
 
                                   "wm831x", wm831x);
573
 
        if (ret != 0) {
574
 
                dev_err(wm831x->dev, "Failed to request IRQ %d: %d\n",
575
 
                        irq, ret);
576
 
                return ret;
 
564
        if (irq) {
 
565
                ret = request_threaded_irq(irq, NULL, wm831x_irq_thread,
 
566
                                           IRQF_TRIGGER_LOW | IRQF_ONESHOT,
 
567
                                           "wm831x", wm831x);
 
568
                if (ret != 0) {
 
569
                        dev_err(wm831x->dev, "Failed to request IRQ %d: %d\n",
 
570
                                irq, ret);
 
571
                        return ret;
 
572
                }
 
573
        } else {
 
574
                dev_warn(wm831x->dev,
 
575
                         "No interrupt specified - functionality limited\n");
577
576
        }
578
577
 
 
578
 
 
579
 
579
580
        /* Enable top level interrupts, we mask at secondary level */
580
581
        wm831x_reg_write(wm831x, WM831X_SYSTEM_INTERRUPTS_MASK, 0);
581
582