]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/rtc/rtc-twl4030.c
remove twl4030-pwrirq.c
[linux-2.6-omap-h63xx.git] / drivers / rtc / rtc-twl4030.c
index 53c67c636ce547c9ec09157f4735e187f13a5ab6..abe87a4d266520d67976ac7f7620cbdfe07446c2 100644 (file)
@@ -347,6 +347,14 @@ static irqreturn_t twl4030_rtc_interrupt(int irq, void *rtc)
        int res;
        u8 rd_reg;
 
+#ifdef CONFIG_LOCKDEP
+       /* WORKAROUND for lockdep forcing IRQF_DISABLED on us, which
+        * we don't want and can't tolerate.  Although it might be
+        * friendlier not to borrow this thread context...
+        */
+       local_irq_enable();
+#endif
+
        res = twl4030_rtc_read_u8(&rd_reg, REG_RTC_STATUS_REG);
        if (res)
                goto out;
@@ -439,7 +447,8 @@ static int __devinit twl4030_rtc_probe(struct platform_device *pdev)
                goto out1;
 
        ret = request_irq(irq, twl4030_rtc_interrupt,
-                               0, rtc->dev.bus_id, rtc);
+                               IRQF_TRIGGER_RISING,
+                               rtc->dev.bus_id, rtc);
        if (ret < 0) {
                dev_err(&pdev->dev, "IRQ is not free.\n");
                goto out1;
@@ -458,22 +467,6 @@ static int __devinit twl4030_rtc_probe(struct platform_device *pdev)
                        goto out2;
        }
 
-       /* FIXME stop touching MODULE_INT registers; there's already
-        * driver code responsible for them.
-        */
-
-       /* use rising edge detection for RTC alarm */
-       ret = twl4030_i2c_read_u8(TWL4030_MODULE_INT,
-                       &rd_reg, TWL4030_INT_PWR_EDR1);
-       if (ret < 0)
-               goto out2;
-
-       rd_reg |= BIT(3);
-       ret = twl4030_i2c_write_u8(TWL4030_MODULE_INT,
-                       rd_reg, TWL4030_INT_PWR_EDR1);
-       if (ret < 0)
-               goto out2;
-
        /* init cached IRQ enable bits */
        ret = twl4030_rtc_read_u8(&rtc_irq_bits, REG_RTC_INTERRUPTS_REG);
        if (ret < 0)