void (*i2c_release)(struct device *dev);
int irq;
+ int irq_type;
u32 last_otg_ctrl;
unsigned working:1;
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;
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()) {
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);
struct i2c_client client;
struct semaphore lock;
int irq;
+ int irq_type;
struct work_struct work;
struct dentry *file;
unsigned charging:1;
return 0;
}
+ tps->irq_type = SA_SAMPLE_RANDOM;
+
#ifdef CONFIG_ARM
if (machine_is_omap_h2()) {
tps->model = TPS65010;
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;
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);
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);
}
}
/* 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");
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;
};
omap_set_gpio_direction(gpio, 1);
- set_irq_type(ts->irq, IRQT_FALLING);
+ ts->irq_type = SA_TRIGGER_FALLING;
return 0;
}
return -ENODEV;
ts->irq = OMAP1510_INT_FPGA_TS;
+ ts->irq_type = SA_SAMPLE_RANDOM;
return 0;
}
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;
}
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);