On Tue, Feb 01, 2011 at 03:34:53PM +0530, vwadekar@xxxxxxxxxx wrote: > +static int tps6586x_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) > +{ ... > + if (rtc->irq_en) { > + disable_irq(rtc->irq); > + rtc->irq_en = false; > + } ... > + if (alrm->enabled) { > + enable_irq(rtc->irq); > + rtc->irq_en = true; > + } > +static int tps6586x_rtc_update_irq_enable(struct device *dev, > + unsigned int enabled) > +{ > + struct tps6586x_rtc *rtc = dev_get_drvdata(dev); > + struct device *tps_dev = to_tps6586x_dev(dev); > + int err; > + > + if (rtc->irq == -1) > + return -EIO; > + > + enabled = !!enabled; > + if (enabled == rtc->irq_en) > + return 0; I still don't understand how the IRQ management between the alarm and the update interrupts works. The alarm code unconditionally enables and disables the IRQ at the genirq level, but the update_irq_enable() code doesn't manage the IRQ at all and there's no interrupt handling for the alarm case. -- To unsubscribe from this list: send the line "unsubscribe linux-tegra" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html