All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Abraham <thomas.abraham@linaro.org>,
	linux-mmc@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
	linux-samsung-soc@vger.kernel.org, grant.likely@secretlab.ca,
	rob.herring@calxeda.com, patches@linaro.org
Subject: Re: [PATCH] mmc: dt: Add 'broken-cd' DT binding
Date: Tue, 21 Aug 2012 07:14:20 -0400	[thread overview]
Message-ID: <87vcgc5wfn.fsf@octavius.laptop.org> (raw)
In-Reply-To: <201208211101.21612.arnd@arndb.de> (Arnd Bergmann's message of "Tue, 21 Aug 2012 11:01:21 +0000")

Hi,

On Tue, Aug 21 2012, Arnd Bergmann wrote:
> On Tuesday 21 August 2012, Thomas Abraham wrote:
>> 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   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

  reply	other threads:[~2012-08-21 11:14 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-21 11:09 [PATCH] mmc: dt: Add 'broken-cd' DT binding Thomas Abraham
2012-08-21 11:01 ` Arnd Bergmann
2012-08-21 11:14   ` Chris Ball [this message]
2012-08-21 11:14   ` Thomas Abraham
2012-08-21 11:56     ` Chris Ball
2012-08-21 12:08       ` Arnd Bergmann
2012-08-21 14:21         ` Rob Herring
2012-08-21 14:48         ` Chris Ball
2012-08-21 15:03           ` Rob Herring
2012-08-21 15:18             ` Chris Ball
2012-08-21 16:01               ` Rob Herring
2012-08-21 17:33                 ` Thomas Abraham
     [not found]                   ` <CAJuYYwR+oCQUcgoy6ZuHp0XAa+EAj9d-FvLtwsQcP3muFMrKLA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-08-21 18:32                     ` Mitch Bradley
2012-08-22  5:51                   ` Shawn Guo
2012-08-22 10:17                     ` Chris Ball
2012-08-22 10:51                       ` Thomas Abraham
2012-08-22 11:08                         ` Chris Ball
2012-08-22 12:04                           ` Thomas Abraham
2012-08-22 14:54                             ` Chris Ball
2012-08-22 14:59                               ` Thomas Abraham
2012-08-22 18:05                               ` [PATCH] mmc: dt: Add card-detection properties to core binding Chris Ball
2012-08-24  5:44                                 ` Shawn Guo
     [not found]                             ` <CAJuYYwQLUs5qb8NqtPf3=ytNHJ_VdnN8Z4yWwyk2+OTftdWFXw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-08-22 17:09                               ` [PATCH] mmc: dt: Add 'broken-cd' DT binding Mitch Bradley
2012-08-23  6:59                                 ` Thomas Abraham
2012-08-22 14:54                       ` Stephen Warren
2012-08-22 14:58                         ` Chris Ball
2012-08-21 15:21             ` Thomas Abraham
2012-08-22  6:00           ` Shawn Guo
2012-08-22 12:26           ` Shawn Guo
2012-08-22 13:54             ` Chris Ball
2012-08-21 12:30       ` Thomas Abraham
2012-08-21 11:09 ` Thomas Abraham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vcgc5wfn.fsf@octavius.laptop.org \
    --to=cjb@laptop.org \
    --cc=arnd@arndb.de \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=rob.herring@calxeda.com \
    --cc=thomas.abraham@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.