From patchwork Wed Nov 8 10:16:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 118232 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5096918qgn; Wed, 8 Nov 2017 02:18:05 -0800 (PST) X-Google-Smtp-Source: ABhQp+Sf177/hvyegNGL2G5+hkXTZUXFQtJB7prRlCJQ+Nnf51muwZI2P3OScKjfsyqmEZWyPtuA X-Received: by 10.99.99.71 with SMTP id x68mr1879666pgb.334.1510136285797; Wed, 08 Nov 2017 02:18:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510136285; cv=none; d=google.com; s=arc-20160816; b=ahrYcvd57PWr4QV3xhurYwN0tHmtB+BO05QjRHFTeWIsFqnX6kktdE2nu6RWgupOAc 4fY+o4HRILXcMYcDzsUBYHhlsMJ9jcCu2VkEAu+ZCIktIuvuTCL8jp5V0GBSanf379E9 MWJSEULXRPdSJt6WjxtxPklG4C/V3aKlYv7oBBUIsZCwcv2KEi5UFz56mj91GWHvhfwT zkKyiN8B/rgpNPild9ysG6ii+AZirV8T+h9k24c9+QuCfsPNwMn3z3FVkvBXblHFw7aA eX22RajVvvIeHnMkhcGmowGvhH1M5+53DojiQ1Q5jNIDyR+EybDeUaSRHC641m/CnDNt gEDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=itPkkWC0gl9CFX2MpknX/oza/sOITMldRqfLHMDdrdE=; b=fMTGFvThm/GKZi/uQdVLXngwZNwQdkuN1V3JJsU1eIisIYOrmFxdU2URwfVUp8bqw7 KRiLWblQTs3kVvREETjZEnmJ6i3Bk7cL0sld6tk2ZaMgNb3TW2GGSMwhrOWaLlM5moQm frxBQ1GFpvJLRJpNTRnvzvM8vax/4hxNk4aM/2ErIfShr2Tc/JXjao4BOmBjmPkf1Q1p etewuhjb0iYKXhuA0RnUlfkCsdk/6d6wnWSyBy+EQa0pBw8qJjTFDHRH9v8lEraQNK6v kqRL5SZmzniGf1O7R2ocztgqZE5DgE7JOgUpg1lEFSkYU9gNUEkTNsz537kjebek8f5V 3iKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=LVqyKM/g; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 102si3416888pld.614.2017.11.08.02.18.05; Wed, 08 Nov 2017 02:18:05 -0800 (PST) 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; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=LVqyKM/g; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751489AbdKHKSC (ORCPT + 6 others); Wed, 8 Nov 2017 05:18:02 -0500 Received: from conuserg-08.nifty.com ([210.131.2.75]:43318 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752057AbdKHKR7 (ORCPT ); Wed, 8 Nov 2017 05:17:59 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id vA8AH4ru031631; Wed, 8 Nov 2017 19:17:06 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com vA8AH4ru031631 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1510136226; bh=vwPTx3xPR0VwxS3ZMa3bQfqPUuODdw1NbGpyVnJoawE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LVqyKM/gAvajeZBR6mhnun6uMgmSyYGYNfi50lYU/iT/N/pd6vxqhZ1I+oeiw9L+N Hp9B24/cfRY+eiwMTDcj204EsZHm4HEh99fzCkgzdR4Fe74cuXizzAtGh75aTY9COK Oz9NOhvoBpPNOZbavhSJ1mp4nhxGKGJYdVgM4HOfMK7CeIxVwEWRgzpHKF3OuDkyx5 3h6SgqTVf5Rxbwosz3w/3i/j522DoEN1qYtaPaXRrOXnCrneGbSLpHcE6T95hbuZ83 aT3PGyy/Z2z0CjuR80kI2vUNULOTbgoTd/qAP+0FJnA6qk38XkYvP+K5/VTbixdsXz rwimeF2aw8i7g== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Wolfram Sang , linux-mmc@vger.kernel.org Cc: Simon Horman , Yoshihiro Shimoda , Masahiro Yamada , linux-kernel@vger.kernel.org, Ulf Hansson Subject: [PATCH 2/3] mmc: tmio: use mmc_can_gpio_cd() instead of checking TMIO_MMC_USE_GPIO_CD Date: Wed, 8 Nov 2017 19:16:59 +0900 Message-Id: <1510136220-31853-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510136220-31853-1-git-send-email-yamada.masahiro@socionext.com> References: <1510136220-31853-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org To use a GPIO line for card detection, TMIO_MMC_USE_GPIO_CD is used by a legacy board (arch/sh/boards/mach-ecovec24). For DT platforms, the "cd-gpios" property is a legitimate way for that in case the IP-builtin card detection can not be used for some reason. mmc_of_parse() calls mmc_gpiod_request_cd() to set up ctx->cd_gpio if the "cd-gpios" property is specified. To cater to both cases, mmc_can_gpio_cd() is a correct way to check which card detection logic is used. Signed-off-by: Masahiro Yamada --- drivers/mmc/host/tmio_mmc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 -- 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/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c index 7c0e952..9fd0874 100644 --- a/drivers/mmc/host/tmio_mmc_core.c +++ b/drivers/mmc/host/tmio_mmc_core.c @@ -1228,7 +1228,7 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host, } mmc->max_seg_size = mmc->max_req_size; - _host->native_hotplug = !(pdata->flags & TMIO_MMC_USE_GPIO_CD || + _host->native_hotplug = !(mmc_can_gpio_cd(mmc) || mmc->caps & MMC_CAP_NEEDS_POLL || !mmc_card_is_removable(mmc));