From patchwork Fri Dec 6 17:08:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 180932 Delivered-To: patches@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp1054122ile; Fri, 6 Dec 2019 09:08:34 -0800 (PST) X-Received: by 2002:a2e:9a93:: with SMTP id p19mr9475247lji.158.1575652114249; Fri, 06 Dec 2019 09:08:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575652114; cv=none; d=google.com; s=arc-20160816; b=njvV82/jM6FxvU4FEr1xsnY/fO/FoXUv3QUjjjVVN/9MFhEaYWJUuS9xRMVS2Ogt/D ME9Z97ZK1M+Its+0qWv/sxwMpGNojYvB4ao4I/QZNygupntoW7TbAw9+zcNB9WM3FLUt +7WMVL+i/6damJBafkWzoXsbwD1wnPNyvENG8YWFVFsYlkomDIspGj8DghpeldohzDPE b7zMmIwXHwtSXZhDB/mIY9MSfIKLOHQ47yS1GvzKuIy8+67MZKB5wTA+qmRqQTbc9taw q6NbdlUW1Roqx/09h5O3CEeCj2J3dY8PnDLI6JIEeYXabw/H8dot5T5S0Yn+g9/Bx6r5 JG+Q== 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=P6wkq44hOUaRXToIbJJl7vWgcKUynxHObY8PwUP4zZ8=; b=Ay8mpPC3IoBNkI8eU80bx0g000k3NwkGqsID/xA3uwbM2Soa7GV5Yok69QNcQQoDh5 61SJnf5tSGWrDRtpWrr34Y5Uv/L+XAHT1QufAKe11lfHpqFc15XHR2R1rEOXgDyDPBYv kbKnW+1NUHcs4k5n/Mm2qNGksjgMROtbDzllXBM3KdJuJ3XTAAEslFqG5w1FtdbNjvyn 1iHz8/LuE/2tP/Ajm6a9v06l3W/sbF1LbDNWpF4t6Mf2A/6B2EQVq4KmfkXKnIuGhLQp 56NHLZtXmqa9zBavqoWRdjaiEG4YyDDut5rKNpxzyFsX/QUlFnNgJ/tTp+zK6gILeTAi TRbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aJl+9hkZ; 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 e15sor4740430lfc.37.2019.12.06.09.08.34 for (Google Transport Security); Fri, 06 Dec 2019 09:08:34 -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=aJl+9hkZ; 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=P6wkq44hOUaRXToIbJJl7vWgcKUynxHObY8PwUP4zZ8=; b=aJl+9hkZMeoYw7Sp+Ah8kASUSXs35gClU8Xj3C5zggbrGrUybRnN7qlpEHJDlF5Aub 6j9/pXLqhVpsmPFKj3A6G12TKeJ5nGQlILdr8UpaSUpN6VedW63FVN5GvAQJKwHtTl/m blmWxjmifZV6TS7mSz8uWfOPxPD4bU5/ZR9Tw1cNZ9XWNRxK9CBH3ycpTHzDWrVGufwn VAowJ+1E9apNmpsOSk20Csw67uK06DkinJeyvRVl92hS7XLCBOEnqPHlDIpN30dstq8p 8TmX+Lm2foRKawEsnJ/NVYBIE1yC/ZiGC3GaypYVJEFczjWA4HLWY+EAhYK3rQrQf91v leRg== 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=P6wkq44hOUaRXToIbJJl7vWgcKUynxHObY8PwUP4zZ8=; b=oHh7vNErW0mhVBHnDXYa0dPUhgVXsO8DPtotW7buDVN/IW6lqcQsqbvtuhJYyrEcPn Hb3Yko7VLF6tA6RI3/VOQchdyB473d37fPQSuA1mHwiAWaaVPUCAbG4L5MmqcalMkpUF yV5ChQ9gcteBSItTeWM/KNj1ysQe1mCJgIOB0FurcwkSq7pNSxvEvSc4tTUpRVaW/OBF sEe4V+tT0xT8dKHftu0lM7FQM6rSHkvNRHIIK7sBA84bwerc1MwCPkDvt/XxBxj5+llf gkF3fs9hVgPg3TfoWPZvaasw2HjI5NMj+kAxQT51Vljp0TruJ77xu2liLHaaxynPZZIp xJJw== X-Gm-Message-State: APjAAAVUkhKMnevvdbF7UPqxNBVcuNEAERBrk5JFtDelAo8FAwRf6JyC QxlKeP/Ovf3X4lHwkBThAlMejAM3 X-Google-Smtp-Source: APXvYqyXQ/7aXhzLUKmtOFra4sQxFySjBivrm4MghpcnnI5es3eI5GzwgETumQKWJxEB5uEyttz3xg== X-Received: by 2002:ac2:5a43:: with SMTP id r3mr9042656lfn.150.1575652113906; Fri, 06 Dec 2019 09:08:33 -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.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Dec 2019 09:08:32 -0800 (PST) From: Ulf Hansson To: linux-gpio@vger.kernel.org, Linus Walleij Cc: linux-mmc@vger.kernel.org, Ulf Hansson Subject: [PATCH 5/9] mmc: omap_hsmmc: Convert to pinctrl_select_default_state() Date: Fri, 6 Dec 2019 18:08:17 +0100 Message-Id: <20191206170821.29711-6-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. Signed-off-by: Ulf Hansson --- drivers/mmc/host/omap_hsmmc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) -- 2.17.1 diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 767e964ca5a2..a379c45b985c 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1605,12 +1605,6 @@ static int omap_hsmmc_configure_wake_irq(struct omap_hsmmc_host *host) ret = PTR_ERR(p); goto err_free_irq; } - if (IS_ERR(pinctrl_lookup_state(p, PINCTRL_STATE_DEFAULT))) { - dev_info(host->dev, "missing default pinctrl state\n"); - devm_pinctrl_put(p); - ret = -EINVAL; - goto err_free_irq; - } if (IS_ERR(pinctrl_lookup_state(p, PINCTRL_STATE_IDLE))) { dev_info(host->dev, "missing idle pinctrl state\n"); @@ -2153,14 +2147,14 @@ static int omap_hsmmc_runtime_resume(struct device *dev) if ((host->mmc->caps & MMC_CAP_SDIO_IRQ) && (host->flags & HSMMC_SDIO_IRQ_ENABLED)) { - pinctrl_pm_select_default_state(host->dev); + pinctrl_select_default_state(host->dev); /* irq lost, if pinmux incorrect */ OMAP_HSMMC_WRITE(host->base, STAT, STAT_CLEAR); OMAP_HSMMC_WRITE(host->base, ISE, CIRQ_EN); OMAP_HSMMC_WRITE(host->base, IE, CIRQ_EN); } else { - pinctrl_pm_select_default_state(host->dev); + pinctrl_select_default_state(host->dev); } spin_unlock_irqrestore(&host->irq_lock, flags); return 0;