RE: [PATCH 1/6] mfd: add lp8788 mfd driver
From: Kim, Milo
Date: Thu Aug 09 2012 - 04:33:47 EST
> > +static irqreturn_t lp8788_irq_handler(int irq, void *ptr)
> > +{
> > + struct lp8788_irq_data *irqd = ptr;
> > + unsigned long delay = msecs_to_jiffies(DEBOUNCE_MSEC);
> > +
> > + queue_delayed_work(irqd->thread, &irqd->work, delay);
> > +
> > + return IRQ_HANDLED;
> > +}
>
> Why a delayed work? That's *very* unusual.
>
> > + if (!lp->pdata) {
> > + dev_warn(lp->dev, "no platform data for irq\n");
> > + goto no_err;
> > + }
>
> Given that you're using irq domains why does the device need platform
> data?
>
> > + if (irq_base) {
> > + irq_base = irq_alloc_descs(irq_base, 0, LP8788_INT_MAX, 0);
> > + if (irq_base < 0) {
> > + dev_warn(lp->dev, "no allocated irq: %d\n", irq_base);
> > + goto no_err;
> > + }
> > + }
>
> This shouldn't be needed with irq domains.
In patch v2, generic irq chip is used for interrupt handling.
At this moment, no need to support irq domain with lp8788 driver.
Title: [PATCH v2 1/3] mfd: add lp8788 mfd driver
> > +EXPORT_SYMBOL(lp8788_read_byte);
>
> You're reexporting regmap functionality with looser licensing
> requirements...
>
All EXPORT_SYMBOLs were replaced with *_GPL() in the same patch v2.
> > +unsigned int lp8788_get_adc(struct lp8788 *lp, enum lp8788_adc_id id,
> > + enum lp8788_adc_resolution res)
>
> For new drivers the ADC should probably be integrated into IIO.
New iio driver patch was submitted.
Title : [PATCH 2/3] iio: adc: add new lp8788 adc driver
Thanks a lot for your detailed review.
Best Regards,
Milo
--
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/