Received: by 2002:ab2:5182:0:b0:1f4:61d5:3ad4 with SMTP id x2csp61603lqi; Fri, 5 Apr 2024 09:44:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUEvFljUH6IMHNWDqS67qXWnMlnMvU7o67P+mgdY7B8ZdcRaUyAsJhp1PoL+79Ag4aem9L6iTPCS9yLvo8OpbYSohU+teXanfGPbyYD/A== X-Google-Smtp-Source: AGHT+IEIaK1RB6sdU198TL3it6XpO6lATi+r4bCDau9woUcA/P+XaVfL2AI6Efvg0XIvFJ/YHY5R X-Received: by 2002:a17:902:e88f:b0:1e2:bdfa:9ca2 with SMTP id w15-20020a170902e88f00b001e2bdfa9ca2mr2343893plg.54.1712335480367; Fri, 05 Apr 2024 09:44:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712335480; cv=pass; d=google.com; s=arc-20160816; b=AaXtb6iycLIuNrqURuZilabwGT/fCASw/12Mg6haQUSpPhEe0nCtDCwp7BV3LbQL2p Gans1lToI0NEmjI0Tc3mKimBQy1xhDOhOYhh+aioYFkRdokNBO5R7fjNU4z0jnuPAtGW 8fykXwGpCutkA/1mb+gV8KF+Gmg1SZIa+BhXmrOY7xmIgpAvav6jkYN0Dyl6EbFnuz6l Do3fX2K6RNIRikvZ5v+D2JCi7BICvSvYi61JeDEZtVPKQc/KvqzlQ7k0SdCcRNo899tL 8qhGKx5Lkgko+77jTZlALjXqWWwAImRsL0ikG4Vi38ex2jR+2I2CCStOxPqmdOjw9kE1 MY7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1Yn1F54E1w39sZsoVBCcxiObqfa84ZAflL0WwvWLNtg=; fh=7Lnth7Y25j5+vNUGqTvQV7szewHf6cIu2Of5E/0gm/0=; b=l7tDfB8tjGCnjg39uZcQUPGqLoK14Yp5XZlvkACbWprZG3vjOcqY5XvpKLpJHYNTa1 rexWpZNPJTdiwyVqRDt9W/ML0/RU4mu19Gzw8+AyMSAr4ulM1dGvIR5keUHMVl7pnWlF f2uc5I07FYeiNBuwQB3iY1ZK9M1J6FCTvrmiMSJYdqscTkF6Mj7KrkFnmHOBzgPNhSCa u99WS/UYLgkZa7D06B+Zf9IIPJ0oqmmPRmHSUs1IYU6f8kBYEW7qEIjijrr2sM+OoL83 OD6thywqKfC8qYab0J410A8xXahncUfhvFQib+eVhrMH5W4/PErTIrZS9WB+OIO+2HZf Pxwg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Hd8ozYRU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-133358-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133358-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id z2-20020a170903018200b001dddd1df881si1633541plg.295.2024.04.05.09.44.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 09:44:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133358-linux.lists.archive=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=@kernel.org header.s=k20201202 header.b=Hd8ozYRU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-133358-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133358-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 92AFB285AD0 for ; Fri, 5 Apr 2024 16:44:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 889BD171656; Fri, 5 Apr 2024 16:44:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Hd8ozYRU" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 94D426AB6; Fri, 5 Apr 2024 16:44:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712335453; cv=none; b=pCpgvIaBeYY5yEFOdUFFQwk7Q8iOF+WBSpFRMvJi5g/jJ9l0P/dTSmvIQ+LhqfFUsT5tmUeXS7DIPlE6Wq5y3YIQI+LVUxIsTCj/xl3w35U+xlEyHzjD4/Hsc6ltLAqf5VW9wvNcd/ilDQY+baZX8KMXlauWFU/CMKC6Fqu2FOs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712335453; c=relaxed/simple; bh=ViaSMrZIPCzmKnR3iMx+cq3XI+FjdW5BQMMi7XeiIVU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LCwfxF/Qjbe/IxAixnDy8K6wbLIjykxBAYUK06MnnOSuVnnPlbiDodAZAKYStPAvzRIBflIovGFsUAcy37yRfrKbD4z4R61ROPQRaUxlPR/oZgiqMwFuYXHRXg+xc6hGK+Va7FszeTrd5EZ+iF8/hhVK41GP5nLMi3+xMsG/T+Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Hd8ozYRU; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31107C433F1; Fri, 5 Apr 2024 16:44:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712335453; bh=ViaSMrZIPCzmKnR3iMx+cq3XI+FjdW5BQMMi7XeiIVU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Hd8ozYRUncFrTzLH+SmJ/vF3tOrvsD6NvHIFf9fb2ANT6bBktVoawIFjRGqjL2JOL 69l3TrB0IA0gzVGKKqdPSjG09Fd23/P14KhVr9CmEL7i81CiiwvJKNYsDpQ5x4O57h 4stJUsyJ3THA0LbFLhqY3dkVTatUGzD5FQoQ0yCRQABMI3rgIvmmnO8JHfU51XiNdJ sFEPtTEZfT6hWD0v/Q4bFOXWV2VNWwEID21JBshgiyEtBsSxe2o8Kl3mpPv21yqVto ep9zzo0HvKAzvVWTGAfnbaUJmnDoVhOUyPmeYHw0iS/av7Pswk6cOC54mUx5KUyI2R 3QIyTyTQ8ucGw== Date: Fri, 5 Apr 2024 22:14:09 +0530 From: Vinod Koul To: Thomas Richard Cc: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Tony Lindgren , Haojian Zhuang , Vignesh R , Aaro Koskinen , Janusz Krzysztofik , Andi Shyti , Peter Rosin , Kishon Vijay Abraham I , Philipp Zabel , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , 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 Subject: Re: [PATCH v4 08/18] phy: ti: phy-j721e-wiz: add resume support Message-ID: References: <20240102-j7200-pcie-s2r-v4-0-6f1f53390c85@bootlin.com> <20240102-j7200-pcie-s2r-v4-8-6f1f53390c85@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240102-j7200-pcie-s2r-v4-8-6f1f53390c85@bootlin.com> On 04-03-24, 16:35, Thomas Richard wrote: > Add resume support. > It has been tested on J7200 SR1.0 and SR2.0. > > Co-developed-by: Th?o Lebrun > Signed-off-by: Th?o Lebrun > Signed-off-by: Thomas Richard > --- > drivers/phy/ti/phy-j721e-wiz.c | 29 +++++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > > diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c > index 0e3cb1ed5a52..b2320f2efb72 100644 > --- a/drivers/phy/ti/phy-j721e-wiz.c > +++ b/drivers/phy/ti/phy-j721e-wiz.c > @@ -1660,12 +1660,41 @@ static void wiz_remove(struct platform_device *pdev) > pm_runtime_disable(dev); > } > > +static int wiz_resume_noirq(struct device *dev) I think this should be annotated with __maybe_unused > +{ > + struct device_node *node = dev->of_node; > + struct wiz *wiz = dev_get_drvdata(dev); > + int ret; > + > + /* Enable supplemental Control override if available */ > + if (wiz->sup_legacy_clk_override) > + regmap_field_write(wiz->sup_legacy_clk_override, 1); > + > + wiz_clock_init(wiz); > + > + ret = wiz_init(wiz); > + if (ret) { > + dev_err(dev, "WIZ initialization failed\n"); > + goto err_wiz_init; > + } > + > + return 0; > + > +err_wiz_init: > + wiz_clock_cleanup(wiz, node); > + > + return ret; > +} > + > +static DEFINE_NOIRQ_DEV_PM_OPS(wiz_pm_ops, NULL, wiz_resume_noirq); > + > static struct platform_driver wiz_driver = { > .probe = wiz_probe, > .remove_new = wiz_remove, > .driver = { > .name = "wiz", > .of_match_table = wiz_id_table, > + .pm = pm_sleep_ptr(&wiz_pm_ops), > }, > }; > module_platform_driver(wiz_driver); > > -- > 2.39.2 -- ~Vinod