[alsa-devel] [PATCH] Allow passing platform_data to devices attached to AC97 bus
Marek Vasut
marek.vasut at gmail.com
Wed Jul 22 00:43:33 CEST 2009
Dne St 22. července 2009 00:34:24 Anton Vorontsov napsal(a):
> On Wed, Jul 22, 2009 at 12:13:12AM +0200, Marek Vasut wrote:
> > Btw. I also reworked the wm97xx-battery a little more. Also, CCing power-
> > supply people.
> >
> > From 0c04c7f9cac26de8b4e401c17e65051c7f44ec3e Mon Sep 17 00:00:00 2001
> > From: Marek Vasut <marek.vasut at gmail.com>
> > Date: Tue, 21 Jul 2009 18:52:28 +0200
> > Subject: [PATCH 3/4] Convert WM97xx driver to use platform_data
> >
> > This patch converts the wm97xx driver to use platform_data supplied by
> > ac97 bus. Also, this fixes the related wm97xx-battery driver to use
> > it's platform_data and prepares a structure for touchscreen driver.
> >
> > Signed-off-by: Marek Vasut <marek.vasut at gmail.com>
> > ---
>
> Acked-by: Anton Vorontsov <cbouatmailru at gmail.com>
>
> > + ret = set_irq_type(gpio_to_irq(pdata->charge_gpio),
> > + IRQ_TYPE_EDGE_BOTH);
> > + if (ret)
> > + goto err2;
>
> I always thought that request_irq() would set trigger type
> as necessary if you pass IRQF_TRIGGER_* flags, so there is
> no need for explicit set_irq_type() call?
>
> This code in kernel/irq/manage.c:__setup_irq():
>
> /* Setup the type (level, edge polarity) if configured: */
> if (new->flags & IRQF_TRIGGER_MASK) {
> ret = __irq_set_trigger(desc, irq,
> new->flags & IRQF_TRIGGER_MASK);
>
> > + ret = request_irq(gpio_to_irq(pdata->charge_gpio),
> > + wm97xx_chrg_irq, IRQF_DISABLED,
> > + "AC Detect", 0);
> > + if (ret)
> > + goto err3;
Yes, sorry, I fixed this one. Btw. we can safely apply the attached patch then.
This will need Robert's ack though (mioa701 change).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Convert-all-platforms-to-pass-platform_data-to-wm97x.patch
Type: text/x-patch
Size: 11575 bytes
Desc: not available
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20090722/33113314/attachment.patch
More information about the Alsa-devel
mailing list