From patchwork Tue Aug 21 11:14:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Ball X-Patchwork-Id: 1354191 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id AF8F840210 for ; Tue, 21 Aug 2012 11:14:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755494Ab2HULOb (ORCPT ); Tue, 21 Aug 2012 07:14:31 -0400 Received: from void.printf.net ([89.145.121.20]:38914 "EHLO void.printf.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751643Ab2HULOb (ORCPT ); Tue, 21 Aug 2012 07:14:31 -0400 Received: from c-76-24-28-220.hsd1.ma.comcast.net ([76.24.28.220] helo=octavius.laptop.org) by void.printf.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1T3mPg-0004vw-KV; Tue, 21 Aug 2012 12:14:24 +0100 From: Chris Ball To: Arnd Bergmann Cc: Thomas Abraham , 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 References: <1345547371-6784-1-git-send-email-thomas.abraham@linaro.org> <201208211101.21612.arnd@arndb.de> Date: Tue, 21 Aug 2012 07:14:20 -0400 In-Reply-To: <201208211101.21612.arnd@arndb.de> (Arnd Bergmann's message of "Tue, 21 Aug 2012 11:01:21 +0000") Message-ID: <87vcgc5wfn.fsf@octavius.laptop.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org 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): 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. 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