Message ID | 20240205-cdns-qspi-pm-fix-v2-1-2e7bbad49a46@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-52860-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp927525dyb; Mon, 5 Feb 2024 06:59:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IEcPS1ysjPa5Me8TAV4Yg8T2CzqAwqSoKThUolG6ZyTTxu85BlG8QfjHtYuFxoW+8Xx4exW X-Received: by 2002:a0c:f1d1:0:b0:68c:8294:ad86 with SMTP id u17-20020a0cf1d1000000b0068c8294ad86mr5903979qvl.33.1707145160640; Mon, 05 Feb 2024 06:59:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707145160; cv=pass; d=google.com; s=arc-20160816; b=pUoFmMjuRH28IvBkZi07z7REaLSL4yE4fD77GF+SvriBZ9yvpA7heAYlmhNiGLKi70 t3Ru3FsqrlhAx8/cxsY6ZXa9jCysKYajZm4N6OiyDTC1XD5qBq9E9EZ3YJSSkN6mZvNj PcTveAiU4OUv7jU/jyBP11BHhx4ZrRbSGivJQuCbTq4dSb3zGZqyYhSPHbgOsMvuq66O 5Quor043V+ypuKCLfA8gq90SmrVC1sJ9nQxQEhnI/6V+VHE2gHberuHAOQaQ6zrb+yMd +9494eCb4Tr/02MPeHxLJt1/zLfaOqll3qOJ0h82xvgecTJhAb0vQoxN9Q6Imzo4ntYc bxMg== 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=ntIK1ht2V349W+UW4Kgf9LtLhGBVrs1jWnKGiUHScxQ=; fh=D4PXiy3SkASSIJfPSYfGGaKHd/CNSFKRZayCCRDIB6o=; b=D48EnWIyHSA46DD1fLCOpRkOqLLSzNDY92KR0SVZXhLvIN9ferWo+Mt8isOK3swqFI ZXb6NaxePXo1CArUPaT4nAfpnCmDD4Fu7twa5UbAvO0vAk46axzZATJgdQSH52w8UWth qaDP+ZFRqa3++ZrmpEAyE7LyT7ZPu/Q/uUVJHBKYAYg2kg6LNQ3Tfn+OBMXHudP5hfk1 eJ9CjR3eaimglCQxl04/rfyuXLDSJBNK7fvM/EVT+ADY1J+GpNsVIVLJGc/lEvNH0Ieq D0+lQKEtqx6Nuy2syqOj08xFDvXqt1oqDOsBUDjLgk7qf+AqjaS+j0HDj3STzWYukjdt 6IkA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=IhfWuC8q; 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-52860-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52860-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com X-Forwarded-Encrypted: i=1; AJvYcCUHQQqolvRIZTlwMTQf0IcR7xsIg3F/bI/Yjtrr7ZW2ViF/S3xeWGLgoVlmgnW4AhkEBBp3U9MFw6lEM17I9IBGl/URRg== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id fb14-20020ad44f0e000000b0067f82a7080bsi76667qvb.114.2024.02.05.06.59.20 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 06:59:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52860-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=IhfWuC8q; 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-52860-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52860-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 6C1ED1C22855 for <ouuuleilei@gmail.com>; Mon, 5 Feb 2024 14:59:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A66673FB14; Mon, 5 Feb 2024 14:57:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="IhfWuC8q" Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (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 952DE2D057; Mon, 5 Feb 2024 14:57:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.200 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707145060; cv=none; b=qXJUT26VLg0UB3YW/CSJ+2hQVDdOZz/wVurkB93XLCe+oFrTYpA48+P+f0RRycM/KIp03dKrMHyiMo57SGTIVyiqPE+PjOL7w3lo0olMZpFt0Up3tLEE7czt7kg8WzANdXAhegem1JuhPImC17MIDhKcvVN/DXSTe9AtAKxfmxU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707145060; c=relaxed/simple; bh=m2XZhlLpN5aSeXbQFhpV8z4QLndJRWw0770SYgQStq8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=vFx/QnHJ7TjFZ/2YDCfUkBFsh5QrTgJLH72+n+xfUXgwjr8kf57Ldtg7Kh2ecQTe9bLR69KfNByMBwPIarMQGsLYh2kdo7ZzowbIeabwu62vgulkGe6raWudhVTN5NB/44f2sxO1FFWKTSxPL7O/UkPHpss+Usx1PkPfs6nH/6I= 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=IhfWuC8q; arc=none smtp.client-ip=217.70.183.200 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 94ED420009; Mon, 5 Feb 2024 14:57:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1707145051; 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=ntIK1ht2V349W+UW4Kgf9LtLhGBVrs1jWnKGiUHScxQ=; b=IhfWuC8q4u6WUe40Tu3HdIb9eC+23NaBw2fa8E8ZkR95N4i6/92BYQnv16mbFY+POXRE7a HM9r2xsQYeyZtgcWioLVLSKdTXGVqsz6nhffaj3k4ASSg19LH6R0QqqP8CE8/d0nxXfCai rsnhsoL0Jlm8O/odgSbs4SgTLdr9FrjqYo2KlIIFsElR9fo73b/Q3kuR6cNXkacj4enVut 2cVxm8P/5hkg6iBxM+G6Q0EdpKd8L6VQRR8/OtyeUgjQEwpqRyxH47TdmYgXke8+1QMD+6 cXelRmn2HOHknzS3GkbUT3Il/uOOCFaWL1mLYNpXuw3w3bgndfgRmB57ENbr8w== From: =?utf-8?q?Th=C3=A9o_Lebrun?= <theo.lebrun@bootlin.com> Date: Mon, 05 Feb 2024 15:57:29 +0100 Subject: [PATCH v2 1/4] spi: cadence-qspi: put runtime in runtime PM hooks names 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: <20240205-cdns-qspi-pm-fix-v2-1-2e7bbad49a46@bootlin.com> References: <20240205-cdns-qspi-pm-fix-v2-0-2e7bbad49a46@bootlin.com> In-Reply-To: <20240205-cdns-qspi-pm-fix-v2-0-2e7bbad49a46@bootlin.com> To: Mark Brown <broonie@kernel.org>, Apurva Nandan <a-nandan@ti.com>, Dhruva Gole <d-gole@ti.com> Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Gregory CLEMENT <gregory.clement@bootlin.com>, Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>, Thomas Petazzoni <thomas.petazzoni@bootlin.com>, Tawfik Bayouk <tawfik.bayouk@mobileye.com>, =?utf-8?q?Th=C3=A9o_Lebrun?= <theo.lebrun@bootlin.com> X-Mailer: b4 0.12.4 X-GND-Sasl: theo.lebrun@bootlin.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790071443500748456 X-GMAIL-MSGID: 1790071443500748456 |
Series |
spi: cadence-qspi: Fix runtime PM and system-wide suspend
|
|
Commit Message
Théo Lebrun
Feb. 5, 2024, 2:57 p.m. UTC
Follow kernel naming convention with regards to power-management
callback function names.
The convention in the kernel is:
- prefix_suspend means the system-wide suspend callback;
- prefix_runtime_suspend means the runtime PM suspend callback.
The same applies to resume callbacks.
Fixes: 0578a6dbfe75 ("spi: spi-cadence-quadspi: add runtime pm support")
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
---
drivers/spi/spi-cadence-quadspi.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Comments
On Feb 05, 2024 at 15:57:29 +0100, Théo Lebrun wrote: > Follow kernel naming convention with regards to power-management > callback function names. > > The convention in the kernel is: > - prefix_suspend means the system-wide suspend callback; > - prefix_runtime_suspend means the runtime PM suspend callback. > The same applies to resume callbacks. > > Fixes: 0578a6dbfe75 ("spi: spi-cadence-quadspi: add runtime pm support") Not sure if it's a bug as such since there's no functional change other than renaming. > Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com> > --- > drivers/spi/spi-cadence-quadspi.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c > index 74647dfcb86c..720b28d2980c 100644 > --- a/drivers/spi/spi-cadence-quadspi.c > +++ b/drivers/spi/spi-cadence-quadspi.c > @@ -1927,7 +1927,7 @@ static void cqspi_remove(struct platform_device *pdev) > pm_runtime_disable(&pdev->dev); > } > > -static int cqspi_suspend(struct device *dev) > +static int cqspi_runtime_suspend(struct device *dev) > { > struct cqspi_st *cqspi = dev_get_drvdata(dev); > struct spi_controller *host = dev_get_drvdata(dev); > @@ -1941,7 +1941,7 @@ static int cqspi_suspend(struct device *dev) > return ret; > } > > -static int cqspi_resume(struct device *dev) > +static int cqspi_runtime_resume(struct device *dev) > { > struct cqspi_st *cqspi = dev_get_drvdata(dev); > struct spi_controller *host = dev_get_drvdata(dev); > @@ -1956,8 +1956,8 @@ static int cqspi_resume(struct device *dev) > return spi_controller_resume(host); > } > > -static DEFINE_RUNTIME_DEV_PM_OPS(cqspi_dev_pm_ops, cqspi_suspend, > - cqspi_resume, NULL); > +static DEFINE_RUNTIME_DEV_PM_OPS(cqspi_dev_pm_ops, cqspi_runtime_suspend, > + cqspi_runtime_resume, NULL); > No objections as such, Reviewed-by: Dhruva Gole <d-gole@ti.com>
Hello, On Wed Feb 7, 2024 at 9:33 AM CET, Dhruva Gole wrote: > On Feb 05, 2024 at 15:57:29 +0100, Théo Lebrun wrote: > > Follow kernel naming convention with regards to power-management > > callback function names. > > > > The convention in the kernel is: > > - prefix_suspend means the system-wide suspend callback; > > - prefix_runtime_suspend means the runtime PM suspend callback. > > The same applies to resume callbacks. > > > > Fixes: 0578a6dbfe75 ("spi: spi-cadence-quadspi: add runtime pm support") > > Not sure if it's a bug as such since there's no functional change other > than renaming. I see where you come from. I'll fix it when/if there is a second revision. [...] > No objections as such, > Reviewed-by: Dhruva Gole <d-gole@ti.com> Thanks! -- Théo Lebrun, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index 74647dfcb86c..720b28d2980c 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -1927,7 +1927,7 @@ static void cqspi_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); } -static int cqspi_suspend(struct device *dev) +static int cqspi_runtime_suspend(struct device *dev) { struct cqspi_st *cqspi = dev_get_drvdata(dev); struct spi_controller *host = dev_get_drvdata(dev); @@ -1941,7 +1941,7 @@ static int cqspi_suspend(struct device *dev) return ret; } -static int cqspi_resume(struct device *dev) +static int cqspi_runtime_resume(struct device *dev) { struct cqspi_st *cqspi = dev_get_drvdata(dev); struct spi_controller *host = dev_get_drvdata(dev); @@ -1956,8 +1956,8 @@ static int cqspi_resume(struct device *dev) return spi_controller_resume(host); } -static DEFINE_RUNTIME_DEV_PM_OPS(cqspi_dev_pm_ops, cqspi_suspend, - cqspi_resume, NULL); +static DEFINE_RUNTIME_DEV_PM_OPS(cqspi_dev_pm_ops, cqspi_runtime_suspend, + cqspi_runtime_resume, NULL); static const struct cqspi_driver_platdata cdns_qspi = { .quirks = CQSPI_DISABLE_DAC_MODE,