mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* (no subject)
@ 2012-09-28 10:28 yongd
  2012-09-28 10:28 ` [PATCH 1/3] mmc: esdhc: enable polling to detect card by itself yongd
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: yongd @ 2012-09-28 10:28 UTC (permalink / raw)
  To: Chris Ball, Anton Vorontsov, Marek Szyprowski, Shawn Guo,
	Wolfram Sang, Daniel Drake, Sascha Hauer, Wilson Callan,
	Ben Dooks
  Cc: zhangfei.gao, kevin.liu, jlfu, linux-mmc, linux-kernel

ngd@marvell.com> # This line is ignored.
From: yongd <yongd@marvell.com>
Subject:[PATCH 0/3] mmc: enable card-detection polling in host driver rather than in sdhci_add_host
In-Reply-To:


Hi all,
As checked, SDHCI_QUICK_BROKEN_CARD_DETECTION was previously introduced by Anton Vorontsov in commit
68d1fb7e229c6f95be4fbbe3eb46b24e41184924. For a removable card (MMC_CAP_NONREMOVABLE is not set),
if this QUICK is set, sdhci_add_host will set MMC_CAP_NEEDS_POLL to enable card-detection polling method,
and sdhci_set_card_detection will not enable host controller card insert/remove interrupts (the host
internal card detection method).

However, we can have some other card detection methods besides host internal card detection and polling
methods. For example, we might use an external GPIO pin for detection. In such case, we will not set
MMC_CAP_NONREMOVABLE since removable, and set SDHCI_QUICK_BROKEN_CARD_DETECTION since we don't use controller
card insert/remove interrupts. But unexpectedly, sdhci_add_host will still enable polling for us. This
is redundant.

So, here comes the following solution.
1st, enable card-detection polling in vendor host driver itself so that it will not rely on sdhci_add_host.
 [PATCH 1/3]: for sdhci-esdhc-imx.c
 [PATCH 2/3]: for sdhci-s3c.c
 And for other vendor host drivers(sdhci-pxav2/3.c, sdhci-pci.c, sdhci-of-esdhc.c), as checked, those who
set SDHCI_QUICK_BROKEN_CARD_DETECTION actually do not set this for enabling polling. So no similar change is          
needed.

2nd, remove MMC_CAP_NEEDS_POLL setting in sdhci_add_host, as in [PATCH 3/3].

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Actually I have had some discussion with Anton, and now added more reviewers here since my proposal influences
others. I will appreciate your review and comments. Thanks a lot:-)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-10-18  7:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-28 10:28 yongd
2012-09-28 10:28 ` [PATCH 1/3] mmc: esdhc: enable polling to detect card by itself yongd
2012-10-07 14:06   ` Shawn Guo
2012-10-17  4:01     ` Yong Ding
2012-10-18  5:50       ` Shawn Guo
2012-10-18  6:27         ` Yong Ding
2012-10-18  6:38           ` Shawn Guo
2012-10-18  7:19             ` Yong Ding
2012-09-28 10:28 ` [PATCH 2/3] mmc: sdhci-s3c: " yongd
2012-09-28 10:28 ` [PATCH 3/3] mmc: remove MMC_CAP_NEEDS_POLL setting in sdhci_add_host yongd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®