]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Convert drivers to new irq trigger modes
authorDirk Behme <dirk.behme@googlemail.com>
Tue, 7 Feb 2006 23:15:26 +0000 (15:15 -0800)
committerTony Lindgren <tony@atomide.com>
Tue, 7 Feb 2006 23:15:26 +0000 (15:15 -0800)
New way to handle irq trigger mode is to pass it as flag to
request_irq()  instead of using special ARM function
set_irq_mode().

Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/i2c/chips/isp1301_omap.c
drivers/i2c/chips/tps65010.c
drivers/input/keyboard/omap-keypad.c
drivers/input/touchscreen/omap/omap_ts.c
drivers/input/touchscreen/omap/omap_ts.h
drivers/input/touchscreen/omap/ts_hx.c
drivers/input/touchscreen/omap/ts_inn1510.c
drivers/input/touchscreen/omap/ts_osk.c
drivers/mmc/omap.c

index 7770171ab96829c59839d3fb408692a23e79a74d..14c63ae9f5d77491b3b29e8768436f169142c698 100644 (file)
@@ -60,6 +60,7 @@ struct isp1301 {
        void                    (*i2c_release)(struct device *dev);
 
        int                     irq;
+       int                     irq_type;
 
        u32                     last_otg_ctrl;
        unsigned                working:1;
@@ -1526,6 +1527,7 @@ static int isp1301_probe(struct i2c_adapter *bus, int address, int kind)
        isp->timer.data = (unsigned long) isp;
 
        isp->irq = -1;
+       isp->irq_type = SA_SAMPLE_RANDOM;
        isp->client.addr = address;
        i2c_set_clientdata(&isp->client, isp);
        isp->client.adapter = bus;
@@ -1602,7 +1604,7 @@ fail1:
                isp->irq = OMAP_GPIO_IRQ(2);
                omap_request_gpio(2);
                omap_set_gpio_direction(2, 1);
-               set_irq_type(isp->irq, IRQT_FALLING);
+               isp->irq_type = SA_TRIGGER_FALLING;
        }
 
        if (machine_is_omap_h3()) {
@@ -1611,11 +1613,11 @@ fail1:
                isp->irq = OMAP_GPIO_IRQ(14);
                omap_request_gpio(14);
                omap_set_gpio_direction(14, 1);
-               set_irq_type(isp->irq, IRQT_FALLING);
+               isp->irq_type = SA_TRIGGER_FALLING;
        }
 
        status = request_irq(isp->irq, isp1301_irq,
-                       SA_SAMPLE_RANDOM, DRIVER_NAME, isp);
+                       isp->irq_type, DRIVER_NAME, isp);
        if (status < 0) {
                dev_dbg(&i2c->dev, "can't get IRQ %d, err %d\n",
                                isp->irq, status);
index f8b13206ee798eb6bf803f7bdc78a839e9868c04..6a3d71494c4654235e763c3027fb62cb7306d8ee 100644 (file)
@@ -87,6 +87,7 @@ struct tps65010 {
        struct i2c_client       client;
        struct semaphore        lock;
        int                     irq;
+       int                     irq_type;
        struct work_struct      work;
        struct dentry           *file;
        unsigned                charging:1;
@@ -526,6 +527,8 @@ fail1:
                return 0;
        }
 
+       tps->irq_type = SA_SAMPLE_RANDOM;
+
 #ifdef CONFIG_ARM
        if (machine_is_omap_h2()) {
                tps->model = TPS65010;
@@ -533,7 +536,7 @@ fail1:
                tps->irq = OMAP_GPIO_IRQ(58);
                omap_request_gpio(58);
                omap_set_gpio_direction(58, 1);
-               set_irq_type(tps->irq, IRQT_FALLING);
+               tps->irq_type = SA_TRIGGER_FALLING;
        }
        if (machine_is_omap_osk()) {
                tps->model = TPS65010;
@@ -541,21 +544,18 @@ fail1:
                tps->irq = OMAP_GPIO_IRQ(OMAP_MPUIO(1));
                omap_request_gpio(OMAP_MPUIO(1));
                omap_set_gpio_direction(OMAP_MPUIO(1), 1);
-               set_irq_type(tps->irq, IRQT_FALLING);
+               tps->irq_type = SA_TRIGGER_FALLING;
        }
        if (machine_is_omap_h3()) {
                tps->model = TPS65013;
 
                // FIXME set up this board's IRQ ...
        }
-#else
-#define set_irq_type(num,trigger)      do{}while(0)
 #endif
 
        if (tps->irq > 0) {
-               set_irq_type(tps->irq, IRQT_LOW);
                status = request_irq(tps->irq, tps65010_irq,
-                       SA_SAMPLE_RANDOM, DRIVER_NAME, tps);
+                        tps->irq_type, DRIVER_NAME, tps);
                if (status < 0) {
                        dev_dbg(&tps->client.dev, "can't get IRQ %d, err %d\n",
                                        tps->irq, status);
index ef30720a1f5de2297fb64c3ce55939751d45013a..66ee31f277c524f32ec33d5849e9980a44d5ca58 100644 (file)
@@ -365,10 +365,9 @@ static int __init omap_kp_probe(struct platform_device *pdev)
                omap_writew(0, OMAP_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT);
        } else {
                for (i = 0; i < omap_kp->rows; i++) {
-                       if (request_irq(OMAP_GPIO_IRQ(row_gpios[i]), omap_kp_interrupt, 0,
-                                               "omap-keypad", omap_kp) < 0)
+                       if (request_irq(OMAP_GPIO_IRQ(row_gpios[i]), omap_kp_interrupt,
+                                       SA_TRIGGER_FALLING, "omap-keypad", omap_kp) < 0)
                                return -EINVAL;
-                       set_irq_type(OMAP_GPIO_IRQ(row_gpios[i]), IRQT_FALLING);
                }
        }
 
index e8d67e3f06bbb2f0574f29c9f8bac31e5d7e128e..b55dc9e42b89403bbd343ff0fc22493a4a768e3e 100644 (file)
@@ -162,7 +162,7 @@ static int __init omap_ts_probe(struct platform_device *pdev)
 
        /* request irq */
        if (ts_omap.irq != -1) {
-               if (request_irq(ts_omap.irq, omap_ts_handler, 0,
+               if (request_irq(ts_omap.irq, omap_ts_handler, ts_omap.irq_type,
                                OMAP_TS_NAME, &ts_omap)) {
                        printk(KERN_ERR
          "omap_ts.c: Could not allocate touchscreen IRQ!\n");
index fade7bde04b8b6990063367d700a4172d8c3c66c..6efb7dbb526a715d455207ab87f4917f1cf3af81 100644 (file)
@@ -46,6 +46,7 @@ struct omap_ts_t{
        struct timer_list ts_timer;      // Timer for triggering acquisitions
        int touched;
        int irq;
+       int irq_type;
        int irq_enabled;
        struct ts_device *dev;
        spinlock_t lock;
index fac78daaa904f47ecbabe42d8128cbc54d563485..f148f19765e011cd7b51084734276750e4abe659 100644 (file)
@@ -98,7 +98,7 @@ static int __init hx_ts_probe(struct omap_ts_t *ts)
        };
 
        omap_set_gpio_direction(gpio, 1);
-       set_irq_type(ts->irq, IRQT_FALLING);
+       ts->irq_type = SA_TRIGGER_FALLING;
        return 0;
 }
 
index b85f0032771a7d7e900f6f692efc57a9b48e291d..5147ac64560b97f0c6787c093836aa9e40ffd1f4 100644 (file)
@@ -176,6 +176,7 @@ static int __init inn1510_ts_probe(struct omap_ts_t *ts)
                return -ENODEV;
 
        ts->irq = OMAP1510_INT_FPGA_TS;
+       ts->irq_type = SA_SAMPLE_RANDOM;
        
        return 0;
 }
index 45b4eb9a3786d39365595000df62fce99bab4510..9531fcdb95adf8000191bf1a90cefe291f2f72fa 100644 (file)
@@ -91,7 +91,7 @@ static int  __init osk_ts_probe(struct omap_ts_t *ts)
         omap_cfg_reg(P20_1610_GPIO4);
        omap_request_gpio(4);
        omap_set_gpio_direction(4, 1);
-       set_irq_type(OMAP_GPIO_IRQ(4), IRQT_FALLING);
+       ts->irq_type = SA_TRIGGER_FALLING;
 
        ts->irq = PEN_IRQ;
 
index 67f2801303ceb7254c943b1ab7b918a583f8cb9a..45a147f961041983b9f0c3a032eacf18ae626745 100644 (file)
@@ -1262,9 +1262,8 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
                }
 
                omap_set_gpio_direction(host->switch_pin, 1);
-               set_irq_type(OMAP_GPIO_IRQ(host->switch_pin), IRQT_RISING);
                ret = request_irq(OMAP_GPIO_IRQ(host->switch_pin),
-                                 mmc_omap_switch_irq, 0, DRIVER_NAME, host);
+                                 mmc_omap_switch_irq, SA_TRIGGER_RISING, DRIVER_NAME, host);
                if (ret) {
                        printk(KERN_WARNING "MMC%d: Unable to get IRQ for MMC cover switch\n",
                               host->id);