Re: [PATCH 11/12] mfd: twl4030-irq: Return twl6030_mmc_card_detect IRQ for board setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On 3/2/2012 9:28 PM, Cousson, Benoit wrote:
Hi Tony,

On 3/2/2012 8:20 PM, Tony Lindgren wrote:
* Felipe Balbi<balbi@xxxxxx> [120302 09:43]:

On Fri, Mar 02, 2012 at 05:50:23PM +0100, Benoit Cousson wrote:
Card detect IRQ from the TWL6030 used to be provided to the MMC
controller code using a statically allocated IRQ scheme:

card_detect_irq = TWL6030_IRQ_BASE + MMCDETECT_INTR_OFFSET;

This is no longer valid in a SPARSE_IRQ context since there is no more
pre-defined TWL6030_IRQ_BASE.

Return the proper card detect IRQ value in the
that will be called from the MMC controller.

Signed-off-by: Benoit Cousson<b-cousson@xxxxxx>
Cc: Felipe Balbi<balbi@xxxxxx>
Cc: Tony Lindgren<tony@xxxxxxxxxxx>
Cc: Rajendra Nayak<rnayak@xxxxxx>

Reviewed-by: Felipe Balbi<balbi@xxxxxx>

drivers/mfd/twl6030-irq.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c
index a1c7183..4a63de2 100644
--- a/drivers/mfd/twl6030-irq.c
+++ b/drivers/mfd/twl6030-irq.c
@@ -308,7 +308,8 @@ int twl6030_mmc_card_detect_config(void)
return ret;
- return 0;
+ return twl6030_irq_base + MMCDETECT_INTR_OFFSET;

At some point this twl6030_mmc_card_detect_config() needs to vanish in
favor of a better mechanism. Maybe passing the GPIO number an requiring
the driver to request the GPIO, set its direction and use it as IRQ

the only problem would arise if we end up hooking the Card Detect pin to
a real IRQ line, but then we can use a flag to differentiate.

I'm trying to leave out the need for this callback to pdata..
See mmc: omap_hsmmc: Simplify init for twl6030 MMC card detect
that does pretty much the same as Benoit's patch plus removes
the need for the callback.

That's cool. I did that patch to still have a working MMC after my TWL
series because I missed your MMC series :-(.

The patch #4 "mmc: omap_hsmmc: Simplify init for twl6030 MMC card
detect" is indeed simplifying a lot that IRQ mess.

I will check with that TWL series, but since you are already using the
twl6030_irq_base it should work without any trouble.

I created a for_3.4/twl_irq_gpio_fix branch based on irqdomain/next with all the TWL + GPIO patches except the DTS and without the MMC hacks.

And I merged it into your hsmmc-gpio branch. There is a small conflict in gpio-twl4030 but otherwise it works on the SDP4430.

I cannot test remotely with Panda or Beagle, the animals are already sleeping.

The branch is there if you want to check for OMAP3 as well.
git:// for_3.4/twl_irq_gpio_fix

To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux