From patchwork Sun Sep 23 07:03:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 147329 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1494876ljw; Sun, 23 Sep 2018 00:05:30 -0700 (PDT) X-Google-Smtp-Source: ANB0VdajvF1/lbopZdWJ7H81TDfEHvPbDd4KNzIwUqfSa2KT+Fzrf/QU6eZZb0ME4w8SIjLNsCGc X-Received: by 2002:a62:2f84:: with SMTP id v126-v6mr5218972pfv.115.1537686330637; Sun, 23 Sep 2018 00:05:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537686330; cv=none; d=google.com; s=arc-20160816; b=UfNuXHeSzCNa0WRzzDrYJql6AdmOIjIkgcPDUQ2MV+Cro+R0h8mz/y2meVr82WsWcE /aucOkFmp0sP5SZTzZXBYFj8zp7ShzyJBCk87KPyB5kwMu/nkIZ85jK+nP/uN47rv1gX kHZeqc9kNzQSO8qhn2U96YuT7bdt+9kUpBXnGXbqdHlfenLN0em89LtVErtyxTesk7cV FT62H3CrssC4dKLVEm+aIqxpq1amvKTBbNGc9Fewq78PKIi+W3lzMHJrYC32ZS4ee9HB KpgORmTmp3zLYUvypWwmK1wg4YTu8UlqpA2FExOtkomRFByLY8y+NQcA7yNP8wTzlkF6 HJCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=W2k965pMSttiSTqB4I8pYNG+UYEmrtjsW87PKpwGGTI=; b=UCUJK4gRxPNi8O/p0yF9zAZDhvZEubsL7ojyejOPibYwkblJ47P5lQSbrVui1Wz97T TtXxe9iCkBT1Ejnc2h8XhPz5ECJzXTXtUuMExGnA1/glWQ9npqGR/ur+I7KfFC1lnz0H iqqT0r1+RjqmZl3y0boVL4nz534++HXSkhkOueHj3IcTJvw6JhFD+zY/bB81fdw3iB6v dD2WFZQ7EF4iWACsO4RuOpuinx+QJGqyZ3lES9+5BshNqlB0zXU9mT1pA2pqT27He6MN o0AESceuWHF/D2oN02fCybUwDYq0YGpKbe6wGzpvudoLJsgGEVytH0sm4brOmvFJEa2J PF8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KYRUJ561; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m23-v6si1636272pls.399.2018.09.23.00.05.30; Sun, 23 Sep 2018 00:05:30 -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; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KYRUJ561; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726036AbeIWNBy (ORCPT + 5 others); Sun, 23 Sep 2018 09:01:54 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:38544 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726029AbeIWNBy (ORCPT ); Sun, 23 Sep 2018 09:01:54 -0400 Received: by mail-lf1-f68.google.com with SMTP id z186-v6so14186239lfa.5 for ; Sun, 23 Sep 2018 00:05:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=W2k965pMSttiSTqB4I8pYNG+UYEmrtjsW87PKpwGGTI=; b=KYRUJ561JL65a78XzrNPtyxsoXWoCAHBJZ64vCZy+hGxCAc+mFWSOnIkoJ0C5mxPbl 0ZdMBeYThGnRP+s91YSWBUMSBnkFNVvM2weG2m25vNbjcIFXKqwY+uFmh6jGUBSov6zv fVtu8dV9iFgAzDlF5Z2CL/MEoLEOUmLMDu/tw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=W2k965pMSttiSTqB4I8pYNG+UYEmrtjsW87PKpwGGTI=; b=t/EhhOx9f3eSNU/oBtqvlhVrvHIatm1y8pcUyTTlC/pejY5g0osoyk0k9jkjGQAZ/R xHZKMOWq0aYySxPhSDI0Tc61MaTv8AFO3MKtFUZqKA0yhHjjCc9hd7qaPlCFhwaLhsGh UJ0dAJ65qm/IM64aD6lBwyaR8zwbvPjIWJ7DxZDkaPPiZ7QMYlhO0RLFgWB/NtglBwx5 X5Mc8s/i5BcKGkFEYDrh+6dWtiClyfQeQRJB0n93JPt6ynlnABYYWHL1R/vSuaXJK6Qo D1hGnTkukJQvNEjz5LI5gb0VR2svcOs6yrvpFsFAPPcSd6v9TGBMv/0MCwD1uteB4qxv dxOQ== X-Gm-Message-State: APzg51AVwaFE/4YLQfQCJ+C2X6+c5B/FQweJ3nizjdjRF1pFP//zlasQ dTW//u5LH/cTY/lgaQQBYfWO2DeOlq8= X-Received: by 2002:a19:d189:: with SMTP id i131-v6mr2869362lfg.20.1537686326669; Sun, 23 Sep 2018 00:05:26 -0700 (PDT) Received: from localhost.localdomain (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id n3-v6sm493510lfe.8.2018.09.23.00.05.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Sep 2018 00:05:25 -0700 (PDT) From: Linus Walleij To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Linus Walleij , Jisheng Zhang , Adrian Hunter Subject: [PATCH] mmc: sdhci: pxav3: Delete GPIO handling Date: Sun, 23 Sep 2018 09:03:21 +0200 Message-Id: <20180923070321.872-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The platform data for the PXAv3 driver allows passing a card detect GPIO, but this code is not used in the kernel. In order to not encourage the use of the old global GPIO numberspace we need to remove this. Card detect (and write protect) GPIO can easily be added into the driver using machine descriptor tables instead, and the descriptor-based (gpiod) variants of the slot GPIO APIs. Cc: Jisheng Zhang Cc: Adrian Hunter Signed-off-by: Linus Walleij --- drivers/mmc/host/sdhci-pxav3.c | 14 -------------- include/linux/platform_data/pxa_sdhci.h | 4 ---- 2 files changed, 18 deletions(-) -- 2.17.1 Reviewed-by: Jisheng Zhang Acked-by: Adrian Hunter diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c index b8e96f392428..1783e29eae04 100644 --- a/drivers/mmc/host/sdhci-pxav3.c +++ b/drivers/mmc/host/sdhci-pxav3.c @@ -21,17 +21,14 @@ #include #include #include -#include #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -452,16 +449,6 @@ static int sdhci_pxav3_probe(struct platform_device *pdev) host->mmc->caps2 |= pdata->host_caps2; if (pdata->pm_caps) host->mmc->pm_caps |= pdata->pm_caps; - - if (gpio_is_valid(pdata->ext_cd_gpio)) { - ret = mmc_gpio_request_cd(host->mmc, pdata->ext_cd_gpio, - 0); - if (ret) { - dev_err(mmc_dev(host->mmc), - "failed to allocate card detect gpio\n"); - goto err_cd_req; - } - } } pm_runtime_get_noresume(&pdev->dev); @@ -486,7 +473,6 @@ static int sdhci_pxav3_probe(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); err_of_parse: -err_cd_req: err_mbus_win: clk_disable_unprepare(pxa->clk_io); clk_disable_unprepare(pxa->clk_core); diff --git a/include/linux/platform_data/pxa_sdhci.h b/include/linux/platform_data/pxa_sdhci.h index 9e20c2fb4ffd..4977c06d8a86 100644 --- a/include/linux/platform_data/pxa_sdhci.h +++ b/include/linux/platform_data/pxa_sdhci.h @@ -33,8 +33,6 @@ * 1: choose feedback clk + delay value * 2: choose internal clk * @clk_delay_enable: enable clk_delay or not, used on pxa910 - * @ext_cd_gpio: gpio pin used for external CD line - * @ext_cd_gpio_invert: invert values for external CD gpio line * @max_speed: the maximum speed supported * @host_caps: Standard MMC host capabilities bit field. * @quirks: quirks of platfrom @@ -46,8 +44,6 @@ struct sdhci_pxa_platdata { unsigned int clk_delay_cycles; unsigned int clk_delay_sel; bool clk_delay_enable; - unsigned int ext_cd_gpio; - bool ext_cd_gpio_invert; unsigned int max_speed; u32 host_caps; u32 host_caps2;