Re: [PATCHv1 1/11] MFD: MFD module of DA9052 PMIC driver

From: Mark Brown
Date: Mon Apr 11 2011 - 10:49:13 EST


On Mon, Apr 11, 2011 at 05:01:12PM +0530, Ashish Jangam wrote:

> > > +static inline int da9052_request_irq(struct da9052 *da9052, int irq,
> > > + irq_handler_t handler, const char
> > *name,
> > > + void *data)
> > > + {
> > > + int ret;
> > > +
> > > + if (!da9052->irq_base)
> > > + return -EINVAL;
> > > +
> > > + ret = request_threaded_irq(da9052->irq_base + irq, NULL, handler,
> > > + IRQF_TRIGGER_LOW | IRQF_ONESHOT, name,
> > > + data);

> > Since you're implementing directly with genirq you don't need this
> > stuff, some drivers have it as they were written before genirq could
> > support devices on sleepy buses.

> DA9052 PMIC is event based so mfd device like touch, onkey, rtc etc gets register to their associated event by this function. In absence of the request_threaded_irq() call there will no mechanism for the said devices to receive their event. Hence we intend to keep this API call.

> In case our explanation is not inline with your review then kindly elaborate.

You're missing the point - the purpose of the code you're copying here
is to transition from an old, non-genirq interface for getting
interrupts to genirq. Now genirq can be used directly there's no need
to have a custom API in the driver.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/