From patchwork Mon Jul 6 12:16:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ivan T. Ivanov" X-Patchwork-Id: 50741 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1FEAC229FC for ; Mon, 6 Jul 2015 12:16:52 +0000 (UTC) Received: by wgjx7 with SMTP id x7sf49195704wgj.3 for ; Mon, 06 Jul 2015 05:16:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=M+fzNy+a5MhDvFRlL7NqJVkJ53ylUp5yaz6csePetMQ=; b=Ek7qQTQutMhddreifa8z7TMKjRnjXRhAPtZXUQYNbDOJHuDDFVSe6HaG+utGdzsfWH PY7C3TVF9UoY6bPGPAF0c4uqdkOUAbPO7f9VGjS9CnyfSdcuyx70fy90jfw+psugCXhr 0aNJjRgUWp6Q+NfpD76BCaMXXnbDQDepYlb2Et7pSR5gGpcnODbaXBCavLROMUw5gubb m5EyuzBgAjd/UtXoKcMmSn7ojmBobVSzTtTuAqTs2vyQxZN3v4lMeHsQ0H+A6tdWjgi5 yroxaqWOFlViu70PDIXChnUT3hrqTGha3QQ0XXUriogUdSQEoV2AA5ubVWDih00YWSOw 7Dmw== X-Gm-Message-State: ALoCoQmvL+afIA1hvFqL9VpjVPibG7CkuTuWYdNFgbBp0OCbmAzy8v9TIOXsFqpc55rkvfX8qD+k X-Received: by 10.112.160.39 with SMTP id xh7mr3272993lbb.22.1436185011437; Mon, 06 Jul 2015 05:16:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.19.137 with SMTP id f9ls690304lae.5.gmail; Mon, 06 Jul 2015 05:16:51 -0700 (PDT) X-Received: by 10.152.45.9 with SMTP id i9mr47862790lam.87.1436185011008; Mon, 06 Jul 2015 05:16:51 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id ml17si15116072lbb.116.2015.07.06.05.16.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jul 2015 05:16:50 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by lazt12 with SMTP id t12so7199561laz.2 for ; Mon, 06 Jul 2015 05:16:50 -0700 (PDT) X-Received: by 10.112.222.133 with SMTP id qm5mr48773567lbc.86.1436185010790; Mon, 06 Jul 2015 05:16:50 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1687000lbb; Mon, 6 Jul 2015 05:16:49 -0700 (PDT) X-Received: by 10.68.209.227 with SMTP id mp3mr104096632pbc.100.1436185008939; Mon, 06 Jul 2015 05:16:48 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tn8si28688294pbc.207.2015.07.06.05.16.48; Mon, 06 Jul 2015 05:16:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755225AbbGFMQh (ORCPT + 2 others); Mon, 6 Jul 2015 08:16:37 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:34227 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754952AbbGFMQf (ORCPT ); Mon, 6 Jul 2015 08:16:35 -0400 Received: by wifm2 with SMTP id m2so27881749wif.1 for ; Mon, 06 Jul 2015 05:16:33 -0700 (PDT) X-Received: by 10.180.206.211 with SMTP id lq19mr95032651wic.81.1436184993840; Mon, 06 Jul 2015 05:16:33 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by mx.google.com with ESMTPSA id ha4sm46918316wib.0.2015.07.06.05.16.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Jul 2015 05:16:33 -0700 (PDT) From: "Ivan T. Ivanov" To: Ulf Hansson Cc: Adrian Hunter , Tim Kryger , Aisheng Dong , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 2/3] mmc: sdhci: don't use card state polling when CD GPIO is defined Date: Mon, 6 Jul 2015 15:16:20 +0300 Message-Id: <1436184981-16719-3-git-send-email-ivan.ivanov@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1436184981-16719-1-git-send-email-ivan.ivanov@linaro.org> References: <1436184981-16719-1-git-send-email-ivan.ivanov@linaro.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ivan.ivanov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , There is no reason to use polling for card detection state change when drivers are using dedicated GPIO for this. Don't poll in this case. Signed-off-by: Ivan T. Ivanov --- drivers/mmc/host/sdhci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 1.9.1 -- 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 diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index dd91b24..02ac7a4 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -3124,7 +3124,8 @@ int sdhci_add_host(struct sdhci_host *host) mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED; if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) && - !(mmc->caps & MMC_CAP_NONREMOVABLE)) + !(mmc->caps & MMC_CAP_NONREMOVABLE) && + IS_ERR_VALUE(mmc_gpio_get_cd(host->mmc))) mmc->caps |= MMC_CAP_NEEDS_POLL; /* If there are external regulators, get them */