From patchwork Fri Nov 24 16:24:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 119617 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2448106qgn; Fri, 24 Nov 2017 08:31:22 -0800 (PST) X-Google-Smtp-Source: AGs4zMb6NAfx7dRuDORMaXKdN/Q6B7MrMzjp7XuaCv7neXknkOEtjynW2X58lYbLNio75tdzagEN X-Received: by 10.98.217.133 with SMTP id b5mr14194958pfl.173.1511541082294; Fri, 24 Nov 2017 08:31:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511541082; cv=none; d=google.com; s=arc-20160816; b=SzjKCkdXHYH3YLbqOiVtnm6WLXPuMi7PSfmAErN+IiwhY9JNg+1P5lbkm4ESxzjr9Z q/ggSj68vVaS54pWmqcxpdpySkERD5KhuWh9hqghNv+f8+GpC9ZvlNVA3G93KBZooUbR +qwYWEyJYiDqJVh5fq4ns575gQPbrpME+ebkhpPBopRa3nXT370LXCrjxKPI252blv3C Fjs3FKQLyD18SbqOYBl+L+iY5wwCY1Yj7taiDZNqmUTAj9TeVM7OCrjkAKXmK6DpB6YU UKJomMBF0oBm7jOZ8F9SFaeMOoukiHPh8JrtCXdLda08ZpCYtrB6sHJbqGAcmG0WN8ZD uJwA== 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=R29tWxFfSr5IIb9U8066R+4s7h3X5dUmLtS1PMDK29A=; b=lBuAIFMr0FHd9QOpjGYIdfSoV8HauO8t82Sbl99ARJSHE0XrTZ6FFo4ZMZmsJtHgQ4 DkqOVpQnr4knZW25QL2wdDK+NqseSt7uAIZn6xIbMKiPDM/uy0OJWlHoYaeCsEbbJSAx 6h/3OKffYjRyyM5+l+B3m0PBFQ6RUPSJVsPBmkoQpb/uvlt4t8qoFRDL/vcbVWJZJIvV ybUG7+X9/oP7BLKgY7sfBpBWA1crxEMidQRgcyIetfMTQr3gRTPe7ZY3fIqcv9K39VGt umJNiwuNhfnoIz2sCZwF8W6JIcUFQakF71xYS/08GF4zPpUVrUtsaMiWVwzqD5brcsPW p6WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=BM8LgqQ1; 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 97si18810273plc.450.2017.11.24.08.31.22; Fri, 24 Nov 2017 08:31:22 -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=BM8LgqQ1; 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 S1753632AbdKXQbU (ORCPT + 6 others); Fri, 24 Nov 2017 11:31:20 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:61431 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753584AbdKXQZ6 (ORCPT ); Fri, 24 Nov 2017 11:25:58 -0500 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-11.nifty.com with ESMTP id vAOGP9Vt007100; Sat, 25 Nov 2017 01:25:17 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com vAOGP9Vt007100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1511540717; bh=nAFKnXQwDbIlcsGTRoos7TmsVj0l0/qAK3lmA0fh5zo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BM8LgqQ1BbHYoiXcorG55Vk2YzqwLULtowJhul23Uk5metCaw0J6YfxVgzYRUqR3g dyiO3jUpqyXpTV39fAnHwx1ZmOW7fwXXvL+MYmap9lxAOMwIP72dezF7gSgtzxCB1X ZfHr98kbtUW0zNwFSDcXFE0bvesA0TpDbmuKTcrMbsNoLzgFH9oq3JrwbHkmqR4DJT ABxaFWU8eqWx8EMivUjzFVyCJF0X1Xtx7Ww3+1qo1112JiFlWQO+ZFlven1P8WUe3X qj5QDCHzErnAEy0FihW8T7YOYTQEjMlk0p3CBFtVqWOXT3lgD/H0ImRti7TatzYrCB 71az4hEwtfjMw== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: linux-mmc@vger.kernel.org, Wolfram Sang Cc: Simon Horman , Yoshihiro Shimoda , linux-renesas-soc@vger.kernel.org, Masahiro Yamada , linux-kernel@vger.kernel.org, Ulf Hansson Subject: [PATCH v2 09/22] mmc: tmio: use mmc_can_gpio_cd() instead of checking TMIO_MMC_USE_GPIO_CD Date: Sat, 25 Nov 2017 01:24:44 +0900 Message-Id: <1511540697-27387-10-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511540697-27387-1-git-send-email-yamada.masahiro@socionext.com> References: <1511540697-27387-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 set 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 --- Changes in v2: None 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 Reviewed-by: Wolfram Sang diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c index efffb04..610f26f 100644 --- a/drivers/mmc/host/tmio_mmc_core.c +++ b/drivers/mmc/host/tmio_mmc_core.c @@ -1232,7 +1232,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));