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: 151940 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp4908953ljp; Sun, 25 Nov 2018 14:54:56 -0800 (PST) X-Google-Smtp-Source: AFSGD/UBPD97lNMIZ14mQ9Njz4cprZdhCrDUYhNqGn2s47G0jRLGAOIv6g+DvuFsmom5jLjsEYhN X-Received: by 2002:a63:3204:: with SMTP id y4mr22239991pgy.41.1543186496740; Sun, 25 Nov 2018 14:54:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543186496; cv=none; d=google.com; s=arc-20160816; b=NotwQd8j+Qwj5L0PtqrEaZOVR9biBH3eGS3ltPk8reSQyK+EZL/ErVoMgrLRdcQzSh n+Dd+7fC4EtudfFIQa5TUqyH5mLE2J3jRjG4v10JNqm5n/T4LI0YyQwQCGBbMgO92y+t hP0v493Y8OXfkOON29Cl/qN/XdALzjF725pv0lbzXNEeI9OpONDQsO/lezPvO7klw5FY 82P3S6ncceFD2W+o0jAkVgf/4QDu97DQfV9FyC8rRf43tCGJFQt+ZpDBxGjYX3Zfb84b lrJZfysSukqFzj9qbcrJlVkOxAO7YDVnsWkMcJLW62mTE832eB7kTm4PaophR9z+i6mM qzLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=c85WpuqcaA4PDda4sO+F2wu8pQJ/bJGbNPWviKqj5N8=; b=Ao/Txj2pQYCUbj9BgRrZk06S4jXSGMLQJrBdSMHDilZ6jq7M+kqvBTnXVc7TQVImST lzG5jb0I5Wc9bvTVHewBBVz0SOLSG+8uCAe+YJxywVYjccMHxn/MEBXo+7q6uuF0knsv 18mH14t4TZrUxXZAMuMEgsWrDvf58PAMvOje9Mg1zeoGviTTrYhIlnL4COIrv+7Cbhnh diCsBZi4A2UD0kW8qNxVS+RHX9n/OWPQ6/dlho0DloZq1gomShL4wTASmOYkz72jG4Tn mJr7QAunrd3jiEWMDkLJ08ZesAPNdYcW5pxrAU9ao1OmQOoYZ08kEX5GjzfSTJB+7N+9 hPlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I0G5ZJhB; 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 m75si39838955pga.432.2018.11.25.14.54.56; Sun, 25 Nov 2018 14:54:56 -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=pass header.i=@linaro.org header.s=google header.b=I0G5ZJhB; 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 S1726108AbeKZJrH (ORCPT + 5 others); 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-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 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(-) -- 2.19.1 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 */