From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Harsha Priya <priya.harsha@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>,
alsa-devel@alsa-project.org, lrg@slimlogic.co.uk
Subject: Re: [PATCH 2/3] ASoC: mid-x86 machine driver - add jack detect support
Date: Thu, 3 Feb 2011 15:20:48 +0000 [thread overview]
Message-ID: <20110203152048.GC2576@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1296732361-24172-1-git-send-email-priya.harsha@intel.com>
On Thu, Feb 03, 2011 at 04:56:01PM +0530, Harsha Priya wrote:
> +#define IRQ_BASE 0xFFFF7FCD
> +#define IRQ_SIZE 1
This looks like it should be coming in via a platform device or
something?
> +static struct snd_soc_jack_pin mfld_jack_pins[] = {
> + {
> + .pin = "Headphones",
> + .mask = SND_JACK_HEADPHONE,
> + },
> + {
> + .pin = "AMIC1",
> + .mask = SND_JACK_MICROPHONE,
> + },
> +};
> +/* jack detection voltage zones */
Blank line between these - in general it'd be worth checking into this.
> + /* retrive the irq number */
> + irq = platform_get_irq(pdev, 0);
> + /* audio interrupt base of SRAM location where
> + * interrupts are stored by System FW */
> + mc_drv_ctx.int_base = ioremap_nocache(IRQ_BASE, IRQ_SIZE);
> + if (!mc_drv_ctx.int_base) {
> + pr_err("Mapping of cache failed\n");
> + ret_val = -ENOMEM;
> + goto unalloc;
> + }
> + /* create botoom half handler for interrupt */
> + mc_drv_ctx.mfld_jack_wq = create_workqueue("mfld_jack_wq");
> + if (!mc_drv_ctx.mfld_jack_wq) {
> + pr_err("cannot create jack workqueue\n");
> + ret_val = -ENOMEM;
> + goto unalloc;
> + }
> + /* register for interrupt */
> + ret_val = request_irq(irq, snd_mfld_jack_intr_handler,
> + IRQF_SHARED, pdev->dev.driver->name,
> + &mc_drv_ctx);
I suspect you can just use request_threaded_irq() here which would ave
open coding the workqueue.
next prev parent reply other threads:[~2011-02-03 15:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-03 11:26 [PATCH 2/3] ASoC: mid-x86 machine driver - add jack detect support Harsha Priya
2011-02-03 15:20 ` Mark Brown [this message]
2011-02-04 3:54 ` Harsha, Priya
2011-02-04 14:26 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2011-01-28 17:10 Harsha Priya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110203152048.GC2576@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=lrg@slimlogic.co.uk \
--cc=priya.harsha@intel.com \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.