Re: [PATCH V2 1/3] mmc: esdhc: enable polling to detect card by itself

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

 



On Tue, Nov 06, 2012 at 04:49:42PM +0800, yongd wrote:
> From your info, we can see that on your platform, those pins (including
> power, clk, DATA) necessary for MMC_SEND_STATUS transaction still keep
> connected for some time just after the GPIO's level changes due to card
> removable. And if we remove the card very slowly, such time duration can be
> such long that the MMC_SEND_STATUS query can still succeed.
> 
I was not removing the card as slowly as you think. It's actually
a normal speed.  That's why I thought your patch breaks the
card-detection functionality before I found the cause.

> So I think we can add a proper delay(maybe 100ms) before the gpio interrupt
> triggers the MMC_SEND_STATUS query, and maybe this can probably fix this issue:-)
> 
I do not think it's a proper fixing.

<snip>

> Anyway, I 100% agree with you that for a ESDHC_CD_GPIO card, we shall query gpio
> state to know such card's presence rather than sending MMC_SEND_STATUS rudely.
> 
> But just as I mentioned before, I don't think using SDHCI_QUIRK_BROKEN_CARD_DETECTION
> as the flag to determine whether and how we can know card's presence before sending
> command is a proper way.
> 
> I haven't gotten any good idea. Do u have any idea on this?
> 
I guess what we need is to call mmc_gpio_get_cd() trying to know card's
presence before sending MMC_SEND_STATUS command.  sdhci-esdhc-imx
driver will surely need some changes to cope with that.

Shawn

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux