Thread (1 message) 1 message, 1 author, 2012-08-21

Re: [PATCH] mmc: dt: Add 'broken-cd' DT binding

From: Chris Ball <hidden>
Date: 2012-08-21 11:14:20
Also in: linux-mmc, linux-samsung-soc
Subsystem: multimedia card (mmc), secure digital (sd) and sdio subsystem, secure digital host controller interface (sdhci) driver, the rest · Maintainers: Ulf Hansson, Adrian Hunter, Linus Torvalds

Possibly related (same subject, not in this thread)

Hi,

On Tue, Aug 21 2012, Arnd Bergmann wrote:
On Tuesday 21 August 2012, Thomas Abraham wrote:
quoted
diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt
b/Documentation/devicetree/bindings/mmc/mmc.txt
index 8a6811f..1aa527a 100644
--- a/Documentation/devicetree/bindings/mmc/mmc.txt
+++ b/Documentation/devicetree/bindings/mmc/mmc.txt
@@ -16,6 +16,8 @@ Optional properties:
 - wp-inverted: when present, polarity on the wp gpio line is inverted
 - non-removable: non-removable slot (like eMMC)
 - max-frequency: maximum operating clock frequency
+- broken-cd: when present, indicates that the cd-gpios line is not
+       connected to the card-detect pad of the MMC host controller.
What is the difference between listing the cd line as broken and
listing no cd line at all?
I think the documentation's incorrect here -- "broken-cd" should be used
without a cd-gpios node, and tells the driver that there is no working
WP and we'll need to poll the host (SDHCI_QUIRK_BROKEN_CARD_DETECTION):
diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
index 25733ef..23ebdbb 100644
--- a/drivers/mmc/host/sdhci-pxav3.c
+++ b/drivers/mmc/host/sdhci-pxav3.c
@@ -198,6 +198,9 @@ static struct sdhci_pxa_platdata *pxav3_get_mmc_pdata(struct device *dev)
 	if (clk_delay_cycles > 0)
 		pdata->clk_delay_cycles = clk_delay_cycles;
 
+	if (of_find_property(np, "broken-cd", NULL))
+		pdata->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
+
 	return pdata;
 }
 #else
So, I'd say:

"- broken-cd: when present, indicates that there is no card-detect
   line available on the host; polling should be used instead."

Thanks,

- Chris.
-- 
Chris Ball   [off-list ref]   <http://printf.net/>
One Laptop Per Child
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help