From patchwork Fri Dec 6 17:08:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 180934 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp1054173ile; Fri, 6 Dec 2019 09:08:36 -0800 (PST) X-Google-Smtp-Source: APXvYqxyULRHaJnXP9s6qyZzUF34BMpZ9dIxlBG7XL0NqX+T4SUA5tFsbdLAMCDq5skRvsojSUS8 X-Received: by 2002:aca:cf11:: with SMTP id f17mr13389194oig.40.1575652116163; Fri, 06 Dec 2019 09:08:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575652116; cv=none; d=google.com; s=arc-20160816; b=0lBFwSpWK+iWSMfj5sXAAk4lzBT58crVxkjJ8tbat/NgkwmTMhCHjXq+om0YNiJSnG OTh5zIT8P34+R1a2u6drwEm3+N/7PXVgmHWOXnPchPzw7JBuMvP6+N1FKi6mpNBPxBty tle4qp/7hz04xjDyofOb4krY3w1CNQ2espvoJhnJUbkzvJ70u5PQzFEAj8Yw3w9LssKn UOADjXeO25ON6052rMZCQKXMByHS8kfIwF6CTA0EM47FqcQB+rBR5yUfKQwaqPO2Chil 3kxHs5qmIdsEuC3TDQQZX+ASyTfsfRNjx68F1XH1cXnJIRADnZ2WilTd1MPuT0CH8J9T f3aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=rFMoiOb3bUP9LxJIzW1x3OJ7y3lUt3rITRuiEhSamMw=; b=z+2fiMKy7tEYaQRvUGsOiE29GOWDG1awYPzkVXf3J3iI8f/5ytCWA9w9czlMB985Mm YGPv57UxBrmtKhlAaiMlw7wJjN6ST4T5ypkqhKEMhhE2a8lDtcl3XKFfUyQjj56tSmNL 1QVh/ZPyM9n819bb9GSSTnD9wN5BwBWuQnzXQFu62iSkdtfqRahoQ9vH+Stg3Lrah4n/ UortS5LtqbKw7qU+QkSMs+vHX5hTTvmoJ/ZBcT2KRzy41shNoK+TwN+NJ6Ucobg5g4ec deSY8UV2JiMYD39JNCW/Zfs+pU5EvMkFKbjHXxaWW175rs8xg7M1HwOw9HCAcVz7py9Y mYVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yuBt1Nz6; 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 p129si7062271oig.118.2019.12.06.09.08.35; Fri, 06 Dec 2019 09:08:36 -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=yuBt1Nz6; 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 S1726336AbfLFRIf (ORCPT + 5 others); Fri, 6 Dec 2019 12:08:35 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:44206 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726321AbfLFRIf (ORCPT ); Fri, 6 Dec 2019 12:08:35 -0500 Received: by mail-lf1-f67.google.com with SMTP id v201so5779308lfa.11 for ; Fri, 06 Dec 2019 09:08:33 -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; bh=rFMoiOb3bUP9LxJIzW1x3OJ7y3lUt3rITRuiEhSamMw=; b=yuBt1Nz63ljeeTGifF8LW4UZodTP03zOMvHRkLXlCEc4hZgzUrIZaFmigouYuu/5QQ yW2Wl3wSL6gGLxORyG6LdhioVtzqXg9caEL/Ryo/N24vFCPrG+ajtpk/gwAZibTAIolM ZxNiwoBij19TremrALO0Mx0jMqS9xK3LxRVKlWrDZvOgpjv4zNRvLz8vu1LTr4SMPhjm NH2bLJdJnbCKCWhS5H1DdQE7DKb/kraSjpB509FJqLGrxplNdsmayzsxhC2L8I6IH1RQ BCo/Lh7tZ+yvheB2BEKy4cPrV8Bn90ITFcRxOUUnHwj4pFYVXxiF8ElIUz6a38jUwPPW eXuQ== 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=rFMoiOb3bUP9LxJIzW1x3OJ7y3lUt3rITRuiEhSamMw=; b=E4Qd3xW1RhPF1+cx7C8pytJaDg7W94uzjDewWfh9MACgDoV9fr9PEoH3oBQflZdfUP yawkPB1kRECB3qYV0Qq09pOulclaFWDnlNNJdPbauwF1Y1b/wH6chJKKx7WM1bav/Ujy kEJVdFyBpUk5UvHW+r1otq1xCiSRgByAScwufDlDdOtL6V6juSSqRL5o7ibTO7sFaUmw vsHUqdy8xAb7r2gPghq7q3KQ/al5nK1tXNHF1jZ5FCemiqFvRNm6ljklLQDvUgJc41rt /hWDWX4Sp4g6gk37hN0yIfYkxKqDabuM5ErxF/cJS1Rq39LuF0ee4QXeXIqPlDRo0x4D VvxQ== X-Gm-Message-State: APjAAAV4gbhhYIkyrKW+pjWC0eynMn1z8l6jHmFyBQZg/MmBFHGif8Yz WfOJjwZN4xX43CzJkUmvW4nY8g== X-Received: by 2002:a05:6512:21d:: with SMTP id a29mr1570063lfo.186.1575652112299; Fri, 06 Dec 2019 09:08:32 -0800 (PST) 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.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Dec 2019 09:08:31 -0800 (PST) From: Ulf Hansson To: linux-gpio@vger.kernel.org, Linus Walleij Cc: linux-mmc@vger.kernel.org, Ulf Hansson , Jesper Nilsson , Lars Persson Subject: [PATCH 4/9] mmc: usdhi6rol0: Convert to pinctrl_select_default_state() Date: Fri, 6 Dec 2019 18:08:16 +0100 Message-Id: <20191206170821.29711-5-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> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Let's drop the boilerplate code for managing the default pinctrl state and convert into using the new pinctrl_select_default_state(). Cc: Jesper Nilsson Cc: Lars Persson Signed-off-by: Ulf Hansson --- drivers/mmc/host/usdhi6rol0.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) -- 2.17.1 diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c index b11ac2314328..969a34e698f2 100644 --- a/drivers/mmc/host/usdhi6rol0.c +++ b/drivers/mmc/host/usdhi6rol0.c @@ -199,7 +199,6 @@ struct usdhi6_host { /* Pin control */ struct pinctrl *pinctrl; - struct pinctrl_state *pins_default; struct pinctrl_state *pins_uhs; }; @@ -1162,8 +1161,7 @@ static int usdhi6_set_pinstates(struct usdhi6_host *host, int voltage) host->pins_uhs); default: - return pinctrl_select_state(host->pinctrl, - host->pins_default); + return pinctrl_select_default_state(mmc_dev(host->mmc)); } } @@ -1770,17 +1768,6 @@ static int usdhi6_probe(struct platform_device *pdev) } host->pins_uhs = pinctrl_lookup_state(host->pinctrl, "state_uhs"); - if (!IS_ERR(host->pins_uhs)) { - host->pins_default = pinctrl_lookup_state(host->pinctrl, - PINCTRL_STATE_DEFAULT); - - if (IS_ERR(host->pins_default)) { - dev_err(dev, - "UHS pinctrl requires a default pin state.\n"); - ret = PTR_ERR(host->pins_default); - goto e_free_mmc; - } - } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); host->base = devm_ioremap_resource(dev, res);