3 Feb
2011
3 Feb
'11
4:20 p.m.
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.