Thread (25 messages) 25 messages, 4 authors, 2012-08-28

Re: [PATCH v4 9/9] mmc: dw_mmc: add support for exynos specific implementation of dw-mshc

From: Jaehoon Chung <jh80.chung@samsung.com>
Date: 2012-08-28 05:16:30
Also in: linux-mmc, linux-samsung-soc

On 08/28/2012 02:10 PM, Thomas Abraham wrote:
On 28 August 2012 10:40, Thomas Abraham [off-list ref] wrote:
quoted
On 28 August 2012 10:25, Jaehoon Chung [off-list ref] wrote:
quoted
Hi Thomas,

On 08/28/2012 01:48 PM, Thomas Abraham wrote:
quoted
On 27 August 2012 14:28, Jaehoon Chung [off-list ref] wrote:
quoted
Hi Thomas,
quoted
+     gpio = of_get_named_gpio(slot_np, "wp-gpios", 0);
+     if (gpio_is_valid(gpio)) {
+             if (devm_gpio_request(host->dev, gpio, "dw-mci-wp"))
+                     dev_info(host->dev, "gpio [%d] request failed\n",
+                                             gpio);
+     } else {
+             dev_info(host->dev, "wp gpio not available");
+             host->pdata->quirks |= DW_MCI_QUIRK_NO_WRITE_PROTECT;
+     }
+
+     if (host->pdata->quirks & DW_MCI_QUIRK_BROKEN_CARD_DETECTION)
+             return 0;
+
+     gpio = of_get_named_gpio(slot_np, "samsung,cd-pinmux-gpio", 0);
+     if (gpio_is_valid(gpio)) {
+             if (devm_gpio_request(host->dev, gpio, "dw-mci-cd"))
I'm not sure, but i saw mmc_gpio_request_cd() into drivers/mmc/core/slot-gpio.c.
Can we use this? i think we can use them.
Just my opinion.
Thanks for letting me know about this, I was not aware of this.
Looking into this code, it is usable for controllers that use a gpio
(specified using cd-gpios property) as card-detect line. As you know,
the dw-mmc driver does not support this feature yet. In case of
exynos, the card-detect pin of the mmc slot is connected to the
card-detect pad of the dw-mmc controller using pinmux, which is not
considered as a gpio. Hence, mmc_gpio_request_cd() is not applicable
in this case.
But In case of external card-detect-pin, we can use the mmc_gpio_request_cd().
Yes, we can use. But the current dw-mmc controller driver does not
support this feature yet. The existing driver considers that (a)
card-detect line is connected to the card-detect pad of the controller
or (b) it is broken. For Exynos5250, it is case (a). There is no
Sorry, I meant smdk5250, not Exynos5250.
Already i tested with my exynos5 board.
If you want, i will share the patch.

Best Regards,
Jaehoon Chung
quoted
support for using a gpio as an card-detect line.

Thanks,
Thomas.
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help