From patchwork Fri Dec 6 17:08:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 180931 Delivered-To: patches@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp1054058ile; Fri, 6 Dec 2019 09:08:31 -0800 (PST) X-Received: by 2002:a2e:9e55:: with SMTP id g21mr9067889ljk.245.1575652111640; Fri, 06 Dec 2019 09:08:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575652111; cv=none; d=google.com; s=arc-20160816; b=Z+EMjMUYSsA5Y4IETN/bZAP8slHlTBgwUOEEqANsONrc61kKXoMPeS4t/8kDnMnJXJ Pq8cKlv68hcLLG3ohSjhhK3M8tSCj1jHbrsaip+NTxPmshQym2aX4aAerttYOpLkiLMg DClYLOYh3+swU7PO5OvTGRFw0IUl3rW0HdGH7xIzR5OU7waOE1miieWis9tJ0bgu38vv Fr+NUhoNFhQDHNVmIpCXDCxt/sR0MxIXtwXAEFXSmYroTkznK6MkGZO8gDX0gPCTjXug +zm06NIDez0M4COozMjUdwAot64zI7D9rcyeWu9cDNY7/RJmRhqqDbMIBZwMwK/wtj92 Ambg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=37DobpBRHG+Arri5XimcII7cjm39P54Z6MB80sywBSk=; b=bY5R/GUqKxMNqH/+WYmIJaKOEdbO+n1BpXIEQhHlUkzwSbPNcwsNZ77ZH13CuubYSu AmmHVu2zEvhw74u07EPrA4PM4BEeRzmVAMiLz3a/3c7dPikEZ1Ortw/TGgDB69IdM55x 3qjyIPavnUTVZL19tbO7dvASySDrIYtyKtuMoZ1I0ErgFYfGRdxCc1F2xNM9Xl2BFOKk 1yDpLJxp1E5qvu8Dtx9W5WUIJEApiedG7860/9r0TXFkWNgJCs7iI9DQHpa1pZ1aijCK //nM9180aEIOUSO/JlKmG+bZGywMDx9n5ZdD0Hp0Y1FETV6eSHsTXFoZnO5e8NrHiHZM Cr+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qatgVOSV; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id 17sor10007932ljp.4.2019.12.06.09.08.31 for (Google Transport Security); Fri, 06 Dec 2019 09:08:31 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qatgVOSV; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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; bh=37DobpBRHG+Arri5XimcII7cjm39P54Z6MB80sywBSk=; b=qatgVOSVmLDVIp7XgklEyOrDj/rrXlD3wp53NTIRuEwUOcHm2tOXL1DzqXSD7Z7wrt KM+uScEywd8QAeCfxvxV/aRUqrb2O4Vl3MgzlqI+EyJodTnO1i7wiVdjpjTuatbTMGMe cMtJH2V5rMA2kFwCC3JgC7Vqgzgi/P9zR8ixpAZ+uNJbnUa5TLwtJDk6twqd8U/zzFE/ qGee7bOUpV8uaBGGP/Y88SYCCnWwB0bknzMjtm4DK84R5/p3UbnQuXM3Bgo3CeE4mZN6 vufKoWaUJyLHWP7un4AjgtF/JrEXV+RZeqkNterX5bq1pTRt0UFpf9ViTWLs9eWiHRmH icNQ== 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; bh=37DobpBRHG+Arri5XimcII7cjm39P54Z6MB80sywBSk=; b=cEcQEzkm1TW1769zh8QjQ/0B1A+tR8caXdz3EfEUzU44Gov4PQifZa9oJX/Eqp4ptB Bvve6KI2E23pTUzct/Y8FjFZHB3RQztGJXUN1DPSBetgvlNXSPT3n/VJU3B3NRz7Ztox RrAFKfqzuGlxNFS966l/1CxQ5mPXdaMN9BGZ5hZP3GZbs5VoIF34W7Dj9MQdcnAF8Q/q yDkWw+9zZ6srOEL1i5HQGR6rgPaSdODY0DOVCLwHXlX45wKHdIZPkPGdI6Cf9TC1/38U 5EewdrAsr0JqWCLVXUlqDDbtftcPta03wZvB5Hx0lSNlpzToVgQCX3Kwq+1LOb6uHgTG eEgw== X-Gm-Message-State: APjAAAUn8nmId6q5D5dTHupwHt3i9wpqAnNLSVDrFnn68bPk/CHyvYOL us33FQ8FyoOOQDxh8xPbH30jBVsT X-Google-Smtp-Source: APXvYqyn0sVnGRizZai+AQWeTt9ieJhl8y01vZ/9+O7HbMDJ/P3f23zp74dIJYlEog1R0TX0hOvNUg== X-Received: by 2002:a05:651c:112d:: with SMTP id e13mr8015393ljo.99.1575652111308; Fri, 06 Dec 2019 09:08:31 -0800 (PST) Return-Path: Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id z9sm6905283ljm.40.2019.12.06.09.08.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Dec 2019 09:08:30 -0800 (PST) From: Ulf Hansson To: linux-gpio@vger.kernel.org, Linus Walleij Cc: linux-mmc@vger.kernel.org, Ulf Hansson , Russell King Subject: [PATCH 3/9] mmc: mmci: Convert to pinctrl_select_default_state() Date: Fri, 6 Dec 2019 18:08:15 +0100 Message-Id: <20191206170821.29711-4-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191206170821.29711-1-ulf.hansson@linaro.org> References: <20191206170821.29711-1-ulf.hansson@linaro.org> Let's drop the boilerplate code for managing the default pinctrl state and convert into using the new pinctrl_select_default_state(). Additionally, move away from using pinctrl_pm_select_default_state() as it's scheduled for removal and use pinctrl_select_default_state() instead. Cc: Russell King Signed-off-by: Ulf Hansson --- drivers/mmc/host/mmci.c | 12 ++---------- drivers/mmc/host/mmci.h | 1 - 2 files changed, 2 insertions(+), 11 deletions(-) -- 2.17.1 diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 40e72c30ea84..caaa4687de93 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -1704,7 +1704,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) if (ios->bus_mode == MMC_BUSMODE_OPENDRAIN) pinctrl_select_state(host->pinctrl, host->pins_opendrain); else - pinctrl_select_state(host->pinctrl, host->pins_default); + pinctrl_select_default_state(mmc_dev(mmc)); } /* @@ -1877,14 +1877,6 @@ static int mmci_probe(struct amba_device *dev, goto host_free; } - host->pins_default = pinctrl_lookup_state(host->pinctrl, - PINCTRL_STATE_DEFAULT); - if (IS_ERR(host->pins_default)) { - dev_err(mmc_dev(mmc), "Can't select default pins\n"); - ret = PTR_ERR(host->pins_default); - goto host_free; - } - host->pins_opendrain = pinctrl_lookup_state(host->pinctrl, MMCI_PINCTRL_STATE_OPENDRAIN); if (IS_ERR(host->pins_opendrain)) { @@ -2203,7 +2195,7 @@ static int mmci_runtime_resume(struct device *dev) struct mmci_host *host = mmc_priv(mmc); clk_prepare_enable(host->clk); mmci_restore(host); - pinctrl_pm_select_default_state(dev); + pinctrl_select_default_state(dev); } return 0; diff --git a/drivers/mmc/host/mmci.h b/drivers/mmc/host/mmci.h index 158e1231aa23..12d4ed8af88a 100644 --- a/drivers/mmc/host/mmci.h +++ b/drivers/mmc/host/mmci.h @@ -404,7 +404,6 @@ struct mmci_host { struct mmci_host_ops *ops; struct variant_data *variant; struct pinctrl *pinctrl; - struct pinctrl_state *pins_default; struct pinctrl_state *pins_opendrain; u8 hw_designer;