Re: [PATCH 3/4] mmc: sdhi: Make use of per-source irq handlers
From: Simon Horman <horms@verge.net.au>
Date: 2011-08-17 09:49:45
Also in:
linux-mmc
On Wed, Aug 17, 2011 at 10:20:24AM +0200, Guennadi Liakhovetski wrote:
On Wed, 17 Aug 2011, Simon Horman wrote:
[snip ]
quoted
+ ret = irq = platform_get_irq(pdev, SH_MOBILE_SDHI_IRQ_SDCARD); + if (irq >= 0) { + multi_irq = true; + ret = request_irq(irq, tmio_mmc_sdcard_irq, 0, + dev_name(&pdev->dev), host); + if (ret) + goto eirq_sdcard; + } else if (multi_irq) + goto eirq_sdcard; + + ret = irq = platform_get_irq(pdev, SH_MOBILE_SDHI_IRQ_CARD_DETECT); + if (irq < 0) + goto eirq_card_detect; + f = multi_irq ? tmio_mmc_card_detect_irq : tmio_mmc_irq; + ret = request_irq(irq, f, 0, dev_name(&pdev->dev), host); + if (ret) + goto eirq_card_detect; +I still don't see why a multi-IRQ configuration without a card-detect IRQ like static struct resource sdhi_resources[] = { [0] = { .name = "SDHI2", ..., }, [1 + SH_MOBILE_SDHI_IRQ_SDCARD] = { .start = ..., .flags = IORESOURCE_IRQ, }, [1 + SH_MOBILE_SDHI_IRQ_SDIO] = { .start = ..., .flags = IORESOURCE_IRQ, }, }; should be invalid. Especially since we actually want to avoid using the controller card-detect IRQ for power efficiency and use a GPIO instead.
Ok, in this case you would like SH_MOBILE_SDHI_IRQ_SDCARD to use tmio_mmc_sdcard_irq() ?