diff mbox

mmc: sdhci-pxav3: dt: Support "broken-cd"/"wp-inverted" properties

Message ID 87mx0zzyin.fsf@octavius.laptop.org (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Chris Ball Sept. 9, 2012, 3:05 a.m. UTC
Signed-off-by: Chris Ball <cjb@laptop.org>
---
 drivers/mmc/host/sdhci-pxav3.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Haojian Zhuang Sept. 11, 2012, 2:29 p.m. UTC | #1
On Sun, Sep 9, 2012 at 11:05 AM, Chris Ball <cjb@laptop.org> wrote:
> Signed-off-by: Chris Ball <cjb@laptop.org>
> ---
>  drivers/mmc/host/sdhci-pxav3.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
> index a553b18..8a9b367 100644
> --- a/drivers/mmc/host/sdhci-pxav3.c
> +++ b/drivers/mmc/host/sdhci-pxav3.c
> @@ -198,6 +198,12 @@ 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;
> +
> +       if (of_find_property(np, "wp-inverted", NULL))
> +               pdata->quirks |= SDHCI_QUIRK_INVERTED_WRITE_PROTECT;
> +
>         return pdata;
>  }
>  #else
> --
> Chris Ball   <cjb@laptop.org>   <http://printf.net/>
> One Laptop Per Child

Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
--
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
Chris Ball Sept. 11, 2012, 3:02 p.m. UTC | #2
Hi,

On Tue, Sep 11 2012, Haojian Zhuang wrote:
> On Sun, Sep 9, 2012 at 11:05 AM, Chris Ball <cjb@laptop.org> wrote:
>> Signed-off-by: Chris Ball <cjb@laptop.org>
>> ---
>>  drivers/mmc/host/sdhci-pxav3.c | 6 ++++++
>>  1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
>> index a553b18..8a9b367 100644
>> --- a/drivers/mmc/host/sdhci-pxav3.c
>> +++ b/drivers/mmc/host/sdhci-pxav3.c
>> @@ -198,6 +198,12 @@ 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;
>> +
>> +       if (of_find_property(np, "wp-inverted", NULL))
>> +               pdata->quirks |= SDHCI_QUIRK_INVERTED_WRITE_PROTECT;
>> +
>>         return pdata;
>>  }
>>  #else
>
> Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>

Thanks, pushed to mmc-next for 3.7.

- Chris.
diff mbox

Patch

diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
index a553b18..8a9b367 100644
--- a/drivers/mmc/host/sdhci-pxav3.c
+++ b/drivers/mmc/host/sdhci-pxav3.c
@@ -198,6 +198,12 @@  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;
+
+	if (of_find_property(np, "wp-inverted", NULL))
+		pdata->quirks |= SDHCI_QUIRK_INVERTED_WRITE_PROTECT;
+
 	return pdata;
 }
 #else