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: 10832 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id E27BC23E29 for ; Tue, 21 Aug 2012 11:14:37 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id 3DD24A18293 for ; Tue, 21 Aug 2012 11:14:29 +0000 (UTC) Received: by yenl8 with SMTP id l8so6002951yen.11 for ; Tue, 21 Aug 2012 04:14:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type:x-gm-message-state; bh=0BxbH1GZsNnWUEy05x2k3dlndXoLw3i9CKRIwqiDMuM=; b=JhvXeCkl09dE0mE4LJjnnPnBoQiIjVyOw3IaeoR10sUrDBMyawChG/ly1DW2YJ1wR3 +DGMOXf+fD5wR2CHMegg/asGSCHcdoUNWBZh/SzaUZH/wbWY5VkrLnsfA9yDAIt1F9cG SLJmn63tTZ7kfcYRuGWBU2ALmyN0jyjTzSzcwCsWwkvUtQOuRt4uQpXzDHjjKbAwt9ru 6Oh4gMMPGkX7wdNWCFBVo3tPelIYDFNaLwRpip38QWiUVnf1hSBF5yLAO3YT7EEM/5nL PCOopOrqlXhZhKporVDkKZVam4wKgVcnVwLmJDxW/hmfdqyiHObOQ2Nis47k7mIL87Gs v7Bw== Received: by 10.50.180.129 with SMTP id do1mr13056571igc.28.1345547676043; Tue, 21 Aug 2012 04:14:36 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp140458igc; Tue, 21 Aug 2012 04:14:34 -0700 (PDT) Received: by 10.216.238.134 with SMTP id a6mr8559294wer.172.1345547673269; Tue, 21 Aug 2012 04:14:33 -0700 (PDT) Received: from void.printf.net (void.printf.net. [89.145.121.20]) by mx.google.com with ESMTPS id fj1si39814328wib.21.2012.08.21.04.14.31 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 21 Aug 2012 04:14:33 -0700 (PDT) Received-SPF: neutral (google.com: 89.145.121.20 is neither permitted nor denied by best guess record for domain of cjb@laptop.org) client-ip=89.145.121.20; Authentication-Results: mx.google.com; spf=neutral (google.com: 89.145.121.20 is neither permitted nor denied by best guess record for domain of cjb@laptop.org) smtp.mail=cjb@laptop.org 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 X-Gm-Message-State: ALoCoQkvQmr4hmlW6U7AafN3/gIi4p5Aw319YtfChCmTR0G98RNsGL2azFG2JSp+LC3k04uBerYX 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