Message ID | 20240102-j7200-pcie-s2r-v3-6-5c2e4a3fac1f@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-67153-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp472373dyb; Thu, 15 Feb 2024 07:22:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW5VSuHt5YakwfvZJo0vUNhsCj1gx7GUmPSEORmZSEGNBAwfK/7RxprDd28tV2Rmw86Jxy89ui9yrG26pkEqrm5uWSqww== X-Google-Smtp-Source: AGHT+IFVj+R+wa0jBmZsCdhrq44zj3pJpf8JXEOlMzBg8RGpEBejhqneqn2qx9VC616jmyHpj+ls X-Received: by 2002:a05:6a21:1788:b0:19e:cb0e:4729 with SMTP id nx8-20020a056a21178800b0019ecb0e4729mr2554296pzb.38.1708010535103; Thu, 15 Feb 2024 07:22:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708010535; cv=pass; d=google.com; s=arc-20160816; b=upnFeZRNnkbycoUlX0zWJ9++rN97sHa/7U2VtapTh7+ttACHLyhgGRYgOBZCV+Pj28 FdLqRTz53wnv1b3A4hmNwJ+FpdpuROdoL75XYcZ7t5y3/JrtwfbfIF3he5hmYNENKgtp hofYtynm/BbatpUQ+UQhsSQ/c79KEfezGtMRoeI6SmYHCmorWPUSJdmnyqPBq1jWUJda Ot40qqa0Uy0HiNhcXBbH4gGNJyye8PN9dqzoOtFXQ9bmuoE5i5+DlJVzl9KyJj82cNSG /+lMQ4Dt37YW8rmZSaKick4jpAefFuMq3pUvNtHBObf20ZID18O0w7PgDQ+TGspCT0GX jdGA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=mPxPc7Xvb7+q1PFnLq8F3pklOXjELgiYL5RrEQlPZLM=; fh=wHZQkXie84v2FP+2z7dUEuyvptHwnAyqgx34WxJkhrY=; b=cYmba53YpRY2yzMRNLVZ04LcghMR/K5SK9w3PD8yGE4ioBqMKwZw0spmEgNOyojEQh 2wdvm09pQsXxYf93iy0z5rYafTmgWIOyaEQWThJhjiFJoaXHdn1q+ojk5sWtRv4gPq30 woeR+5eWhTfzTwx+qj7wP9448y13Ae6d8SBkCUDFLQD6atrBbtxjeaeGyLooc2UD4t22 YVTQKy0+UcktzckFOsUR9sSdl1d5f0vbUFoZVhKY8dnyzbitORHNA87u1Ft8ANEFwmCl A2yWAKwMlkvYqPW8VGPhlDCfdlEvbNTnSNO7zKQZLb7Wx9N92w4I7DMa454gfXp0Mnie xDsw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=hv4KJLdE; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-67153-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67153-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id n10-20020aa7984a000000b006dd881750d2si1289746pfq.46.2024.02.15.07.22.14 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 07:22:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67153-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=hv4KJLdE; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-67153-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67153-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E625028BCD9 for <ouuuleilei@gmail.com>; Thu, 15 Feb 2024 15:20:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CA7981350D8; Thu, 15 Feb 2024 15:18:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="hv4KJLdE" Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D84E6132C2D; Thu, 15 Feb 2024 15:18:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708010290; cv=none; b=jXC7OObq3T+J/x7jPg0Ae9NCIPPGNw2xIaKS8pzGwoFh9jSp6LcCxP9WOA+0UuQJB+vJayYaEZtmzqEe6SYu+wcwe4Zf4za81/ngiu0s3qTf0wUBi49P/6lLhaijL3ocUcHA0Z5hNWW+HId37Ydc9I0EFIZ5cJpL+UDpGKEs7sk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708010290; c=relaxed/simple; bh=5c3PEdEw9K2SWSbCnl8JZa/Az4dMYehFM7efi82xY10=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TVObwfY6VFbbsdfKFBxsEyOZrG4HRaWNbjRcCf6IZAe2LHt3ukqhFsOzipten9UCJnodwEsNSXua2hG73WlmDjJzLMQXwwnhgLB7tYDizb4fen43HlEa+7Ujw0OZbw+hEFgufn75dmdOJZvcVEo6dcxeKvyNiKNiX+kwGrnIBgs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=hv4KJLdE; arc=none smtp.client-ip=217.70.183.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 2E89F240014; Thu, 15 Feb 2024 15:18:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708010286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mPxPc7Xvb7+q1PFnLq8F3pklOXjELgiYL5RrEQlPZLM=; b=hv4KJLdEm3D68ygjCeQI0f6Li0bYy6g5tgDVSnZMtNe5x1p7CsSbwqLnRHg6UPqX2YrxVe 10MkwKsoaqwKb5voo2rwB+E1cey1kphwHuEJI+D9LjchjctBi2Hgsm8bSrfselmBVdPuVh SEebNpingPgX6J9U4thp4aGS3BJO4liAmfG4PckUMTSG/sUAOx71jXmetVFjjVbR1BNuf7 YwG6o1He6OZPyy76WnL8/Ke04Dc1nflsHMnflWwDL28k3u+tbMUGl0denojY3kPv8dOfy2 /Oa1lFZtnWTPEK6ZIwkUKlkuRKgFAjwozvFucfG1Lhd4K5etvMd9xmCCo1LXMQ== From: Thomas Richard <thomas.richard@bootlin.com> Date: Thu, 15 Feb 2024 16:17:51 +0100 Subject: [PATCH v3 06/18] mux: mmio: add resume support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240102-j7200-pcie-s2r-v3-6-5c2e4a3fac1f@bootlin.com> References: <20240102-j7200-pcie-s2r-v3-0-5c2e4a3fac1f@bootlin.com> In-Reply-To: <20240102-j7200-pcie-s2r-v3-0-5c2e4a3fac1f@bootlin.com> To: Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <brgl@bgdev.pl>, Andy Shevchenko <andy@kernel.org>, Tony Lindgren <tony@atomide.com>, Haojian Zhuang <haojian.zhuang@linaro.org>, Vignesh R <vigneshr@ti.com>, Aaro Koskinen <aaro.koskinen@iki.fi>, Janusz Krzysztofik <jmkrzyszt@gmail.com>, Andi Shyti <andi.shyti@kernel.org>, Peter Rosin <peda@axentia.se>, Vinod Koul <vkoul@kernel.org>, Kishon Vijay Abraham I <kishon@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>, Lorenzo Pieralisi <lpieralisi@kernel.org>, =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= <kw@linux.com>, Rob Herring <robh@kernel.org>, Bjorn Helgaas <bhelgaas@google.com> Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org, linux-phy@lists.infradead.org, linux-pci@vger.kernel.org, gregory.clement@bootlin.com, theo.lebrun@bootlin.com, thomas.petazzoni@bootlin.com, u-kumar1@ti.com, Thomas Richard <thomas.richard@bootlin.com> X-Mailer: b4 0.12.0 X-GND-Sasl: thomas.richard@bootlin.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790978854860029371 X-GMAIL-MSGID: 1790978854860029371 |
Series |
Add suspend to ram support for PCIe on J7200
|
|
Commit Message
Thomas Richard
Feb. 15, 2024, 3:17 p.m. UTC
From: Théo Lebrun <theo.lebrun@bootlin.com> No need to save something during the suspend stage, as the mux core has an internal cache to store the state of muxes. This cache is used by mux_chip_resume() to restore all muxes. Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com> Signed-off-by: Thomas Richard <thomas.richard@bootlin.com> --- drivers/mux/mmio.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/drivers/mux/mmio.c b/drivers/mux/mmio.c index fd1d121a584b..892ff4714b68 100644 --- a/drivers/mux/mmio.c +++ b/drivers/mux/mmio.c @@ -125,13 +125,25 @@ static int mux_mmio_probe(struct platform_device *pdev) mux_chip->ops = &mux_mmio_ops; + dev_set_drvdata(dev, mux_chip); + return devm_mux_chip_register(dev, mux_chip); } +static int mux_mmio_resume_noirq(struct device *dev) +{ + struct mux_chip *mux_chip = dev_get_drvdata(dev); + + return mux_chip_resume(mux_chip); +} + +static DEFINE_NOIRQ_DEV_PM_OPS(mux_mmio_pm_ops, NULL, mux_mmio_resume_noirq); + static struct platform_driver mux_mmio_driver = { .driver = { .name = "mmio-mux", .of_match_table = mux_mmio_dt_ids, + .pm = pm_sleep_ptr(&mux_mmio_pm_ops), }, .probe = mux_mmio_probe, };