From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934058AbeALO3h (ORCPT + 1 other); Fri, 12 Jan 2018 09:29:37 -0500 Received: from mail-io0-f195.google.com ([209.85.223.195]:32947 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933863AbeALO3e (ORCPT ); Fri, 12 Jan 2018 09:29:34 -0500 X-Google-Smtp-Source: ACJfBouLaowok1ito3NYE0rJbPKI10lZHyvnutW087cJWicRdGz9XPGjVZ5jy0HzjFHMwp8sM2PPGRRrmlNIT0LP6I8= MIME-Version: 1.0 In-Reply-To: <1511540697-27387-10-git-send-email-yamada.masahiro@socionext.com> References: <1511540697-27387-1-git-send-email-yamada.masahiro@socionext.com> <1511540697-27387-10-git-send-email-yamada.masahiro@socionext.com> From: Ulf Hansson Date: Fri, 12 Jan 2018 15:29:33 +0100 Message-ID: Subject: Re: [PATCH v2 09/22] mmc: tmio: use mmc_can_gpio_cd() instead of checking TMIO_MMC_USE_GPIO_CD To: Masahiro Yamada Cc: "linux-mmc@vger.kernel.org" , Wolfram Sang , Simon Horman , Yoshihiro Shimoda , Linux-Renesas , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 24 November 2017 at 17:24, Masahiro Yamada wrote: > 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 Thanks, applied for next! For the rest of the series, please re-post those changes. Kind regards Uffe > --- > > Changes in v2: None > > drivers/mmc/host/tmio_mmc_core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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)); > > -- > 2.7.4 >