From patchwork Sun Nov 25 22:52:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 10697177 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2C9FE13AD for ; Sun, 25 Nov 2018 22:54:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1999B29923 for ; Sun, 25 Nov 2018 22:54:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C0A629924; Sun, 25 Nov 2018 22:54:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 871CE29920 for ; Sun, 25 Nov 2018 22:54:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726108AbeKZJrH (ORCPT ); Mon, 26 Nov 2018 04:47:07 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:43541 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726124AbeKZJrH (ORCPT ); Mon, 26 Nov 2018 04:47:07 -0500 Received: by mail-lf1-f66.google.com with SMTP id u18so12135401lff.10 for ; Sun, 25 Nov 2018 14:54:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=c85WpuqcaA4PDda4sO+F2wu8pQJ/bJGbNPWviKqj5N8=; b=I0G5ZJhBN1v9e6U/Cg87pU2FbBVowyfdYXkCe/SSxM2IJmqQ3NeyisQdHD6GggfyNy zvtytgw/kGb/caTLApkn2QjuzHe2WadDad3tWskT5vGTqYEkRPhsGSmr0BodK9eRBvK0 fefGacPY6aEMvP97KQb6CVReBLNhEbjrBQIFg= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=c85WpuqcaA4PDda4sO+F2wu8pQJ/bJGbNPWviKqj5N8=; b=qKZrJ6GOX5mJIykmIVlXk/ciGwZ/Et5H0iC+WOYsmncl85ojkthTAnvczT/FN1VfPc ZHcaHZFNznFfQwQknoRdHw96LLf1T8obR5rVEcokUSAb+e5GVAAEsVg2G20cDm2Hsk2q Pu4JUSwYBPPntftRANcQQYYtJJvyXyRHFaEuEuDUegbul4Ba/mimrYfx5oTOvyGK6yMY 2JvB74DCmZAia848UeTAp5YZ29uajFwpNJ99HEPkKteCU+hiiBbnY9+2q9sEOd4wwwJ3 LyVPYlSJcC2iXzVV9uR+gP5cDxVPmWTcYjsXjP5WA9ckpovDN9UEmnJ2o+Bp/3t1WuHl jbtg== X-Gm-Message-State: AGRZ1gLQqCvQ1K6VCIuQcq4RSf3qeFVhNPj8y+pkxu7+Sb4uQgOn9nHL pRroJrqvLJWa3f416REDEZ8sXktYehvTKg== X-Google-Smtp-Source: AJdET5fkmu9P6UNzm70nRgTSgUYR6kYhZze+dSY03sfNaimkg7T9IMQC8aiqQYK01LLJxDSFIBdeOg== X-Received: by 2002:a19:5154:: with SMTP id f81mr15304499lfb.96.1543186493672; Sun, 25 Nov 2018 14:54:53 -0800 (PST) Received: from localhost.localdomain (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id c19sm9047235lfg.86.2018.11.25.14.54.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 25 Nov 2018 14:54:52 -0800 (PST) From: Linus Walleij To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Linus Walleij , Daniel Mack , Robert Jarzmik , Bartosz Golaszewski , Andrea Adami Subject: [PATCH 09/11 v3] mmc: pxamci: Delete platform data handling of CD and WP Date: Sun, 25 Nov 2018 23:52:15 +0100 Message-Id: <20181125225217.23201-10-linus.walleij@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181125225217.23201-1-linus.walleij@linaro.org> References: <20181125225217.23201-1-linus.walleij@linaro.org> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This deletes the code dealing with handling card detect and write protect passed in as platform data and makes the host rely on just GPIO descriptors. The card read only inversion flag has to be kept around for now, as the core cannot handle the inversion flags on the descriptors yet. Cc: Daniel Mack Cc: Robert Jarzmik Cc: Bartosz Golaszewski Cc: Andrea Adami Signed-off-by: Linus Walleij --- ChangeLog v1->v3: - Split out as separate patch at Robert's request. --- drivers/mmc/host/pxamci.c | 19 ------------------- include/linux/platform_data/mmc-pxamci.h | 2 -- 2 files changed, 21 deletions(-) diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index baed636870e0..a8b6c14f2687 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c @@ -730,8 +730,6 @@ static int pxamci_probe(struct platform_device *pdev) } if (host->pdata) { - int gpio_cd = host->pdata->gpio_card_detect; - int gpio_ro = host->pdata->gpio_card_ro; int gpio_power = host->pdata->gpio_power; host->detect_delay_ms = host->pdata->detect_delay_ms; @@ -755,29 +753,12 @@ static int pxamci_probe(struct platform_device *pdev) dev_err(dev, "Failed requesting gpio_cd\n"); goto out; } - if (ret == -ENOENT && gpio_is_valid(gpio_cd)) { - ret = mmc_gpio_request_cd(mmc, gpio_cd, 0); - if (ret) { - dev_err(dev, "Failed requesting gpio_cd %d\n", - gpio_cd); - } - } ret = mmc_gpiod_request_ro(mmc, "wp", 0, false, 0, NULL); if (ret && ret != -ENOENT) { dev_err(dev, "Failed requesting gpio_ro\n"); goto out; } - /* Try platform data instead */ - if (if ret == -ENOENT && gpio_is_valid(gpio_ro)) { - ret = mmc_gpio_request_ro(mmc, gpio_ro); - if (ret) { - dev_err(dev, - "Failed requesting gpio_ro %d\n", - gpio_ro); - goto out; - } - } if (!ret) { host->use_ro_gpio = true; mmc->caps2 |= host->pdata->gpio_card_ro_invert ? diff --git a/include/linux/platform_data/mmc-pxamci.h b/include/linux/platform_data/mmc-pxamci.h index 752f97c62ef2..db6c247d42d1 100644 --- a/include/linux/platform_data/mmc-pxamci.h +++ b/include/linux/platform_data/mmc-pxamci.h @@ -15,8 +15,6 @@ struct pxamci_platform_data { int (*get_ro)(struct device *); int (*setpower)(struct device *, unsigned int); void (*exit)(struct device *, void *); - int gpio_card_detect; /* gpio detecting card insertion */ - int gpio_card_ro; /* gpio detecting read only toggle */ bool gpio_card_ro_invert; /* gpio ro is inverted */ int gpio_power; /* gpio powering up MMC bus */ bool gpio_power_invert; /* gpio power is inverted */