From patchwork Fri Dec 6 17:08:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 180930 Delivered-To: patches@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp1054030ile; Fri, 6 Dec 2019 09:08:30 -0800 (PST) X-Received: by 2002:a19:4906:: with SMTP id w6mr8678472lfa.168.1575652110470; Fri, 06 Dec 2019 09:08:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575652110; cv=none; d=google.com; s=arc-20160816; b=So1C+9+ciI4e52Tbe5T5MoDOrmEjv+lkAqpuK1CuamcfCMyw4IPm6qtPxQCpJElm6Y Oum5lfzoIv/78ipTMwEwdfM3rZF+xQyRtNqxSqWRkdRUmMKcKGRA7K//r0cw4ydN3EkX Eo2Umz0RDMmrPb1pzA/IOOKnw5Ad5bnJeWxsPhz8sAIC0bVogOsQGc/nt6BWh+AUvjLq GSKwJkco1UbzeyaAhX3pnZz8M9RFnkzqUJmst+Cudap8xg8jKEmvsO5j7+P0AGNY3Q3x fFL3xPqyURn4l9RPGKP28Mzp6dkQLHIrxgiYKLW/hbrpx6AT9MhdIfzH7kX2UoITa9Z9 eGgQ== 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=O8WqN3lnEyD9AJPmC5ibEKsr/6UO7fhL7XDNvCov7/A=; b=ndDqRTLIYV4kBWxDLl7GBeFzNrK8Vjkun48HvwtujUC+AXsTcNe/TGZmJRJx6QJtK7 IlIGec0LDdLItF3z9puN5zLq2Sxw6BqBH43HvFpDGsVh7TXvpeiRRNlEgSLLTGCL4OCP K3nzukbyK3dSLCdvFcT4HTUgDrNTnxcc3yoIV5M3k44it1WmB3i5FSLRqaTXLwqYMcFK uF85E4HMQpygXcUixD+hGRLcVQAumwcE/mL9LllAJ4+2YeBD/3/XSEGf3Q+tJ6xR0P31 wkxKcS1Gys2mLL9OyBWc09uQcCfHcEFWNIKSXbRk7ZUVRQTS8AZn60w6mJG9zgz/w76J ODsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q44gSt2T; 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 t4sor484526lff.42.2019.12.06.09.08.30 for (Google Transport Security); Fri, 06 Dec 2019 09:08:30 -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=Q44gSt2T; 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=O8WqN3lnEyD9AJPmC5ibEKsr/6UO7fhL7XDNvCov7/A=; b=Q44gSt2TrsiZ2pSroay4LmdmBxBEL+IzpH+ye7xKOGnSPcnZffLFmAWa2J42YbNoEl 5wZpDfG6gkeJYCQny4pRAJwgNaNOlh02jjhm3jaP7eZtu6iuIVsWWm3dbmwII05lg60v 1qJXOgtYyIruva88pR9JPq2OGTeCwB9XGT/ma5OrQgzOsrKnohVx548xlYLKaXpz4S47 7H2W0ldMFGYxbp7rzM060Q5tGJTrHjXqrzL6Z7rZn+X9gGPFFMKDeQWd3E+9zpwFcnTK A7J0BlkerrfC31vur6y5ZyAtCb/NBDQ1jrCJ+/GZm+q8egakeb4qg+NDtuu6B6luiCD7 Wcxg== 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=O8WqN3lnEyD9AJPmC5ibEKsr/6UO7fhL7XDNvCov7/A=; b=WmcSCgUFIUGYjmLCY5y3u9SHrGMm6S+5zL8y9PFvkwFYfspFD8SXXYrTWGZ6N1KFuE qontWLuo6UN/HboiBx+PrrjSOk8Ydljwfw7yntzIovqLOU5n8n4sbWvXkGn6Bkf3DnKR E3IRYLH/r7YYegSa5UhiBRCaprYbOtrUIkcD1HRkcv2CQNxAep7GFhW6K9YlD1S2DETU 1QjqPW5tZFFxISqwyAZdwYdLguzm4BWwXx5b5Tz3IQJAfEOAu6bgbon6yXJmfPx3X97u soG78u1h8TvzIlCK+1lv2VFuQ6XmkvXFdE4KUcotXHeSvLe+CwUOZZ5qITVQXCP9Ho92 591Q== X-Gm-Message-State: APjAAAWApOKbwZBIjf900pSNR4bB55jRipiT6ayir3cZujT39RREkjOV U7NnC2eMbttB78eXIUfkn55KCssy X-Google-Smtp-Source: APXvYqwHweyq6mEptO8og8uBC9DT4NaGsbDLKM7d70VYzZ2DIG4Qfmb9tMUeAe5weBz+vUhsYYjpjg== X-Received: by 2002:ac2:5b41:: with SMTP id i1mr8691197lfp.82.1575652110129; Fri, 06 Dec 2019 09:08:30 -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.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Dec 2019 09:08:29 -0800 (PST) From: Ulf Hansson To: linux-gpio@vger.kernel.org, Linus Walleij Cc: linux-mmc@vger.kernel.org, Ulf Hansson , Kevin Hilman Subject: [PATCH 2/9] mmc: meson-gx: Convert to pinctrl_select_default_state() Date: Fri, 6 Dec 2019 18:08:14 +0100 Message-Id: <20191206170821.29711-3-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(). Cc: Kevin Hilman Signed-off-by: Ulf Hansson --- drivers/mmc/host/meson-gx-mmc.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) -- 2.17.1 Reviewed-by: Jerome Brunet diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index e712315c7e8d..35400cf2a2e4 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -161,7 +161,6 @@ struct meson_host { bool dram_access_quirk; struct pinctrl *pinctrl; - struct pinctrl_state *pins_default; struct pinctrl_state *pins_clk_gate; unsigned int bounce_buf_size; @@ -327,7 +326,7 @@ static void meson_mmc_clk_ungate(struct meson_host *host) u32 cfg; if (host->pins_clk_gate) - pinctrl_select_state(host->pinctrl, host->pins_default); + pinctrl_select_default_state(host->dev); /* Make sure the clock is not stopped in the controller */ cfg = readl(host->regs + SD_EMMC_CFG); @@ -1101,13 +1100,6 @@ static int meson_mmc_probe(struct platform_device *pdev) goto free_host; } - host->pins_default = pinctrl_lookup_state(host->pinctrl, - PINCTRL_STATE_DEFAULT); - if (IS_ERR(host->pins_default)) { - ret = PTR_ERR(host->pins_default); - goto free_host; - } - host->pins_clk_gate = pinctrl_lookup_state(host->pinctrl, "clk-gate"); if (IS_ERR(host->pins_clk_gate)) {