Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH v6 0/2] Add more devm_ functions to fix PM imbalance in spi/atmel-quadspi.c
@ 2025-03-27 19:59 Bence Csókás
  2025-03-27 19:59 ` [PATCH v6 1/2] pm: runtime: Add new devm functions Bence Csókás
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Bence Csókás @ 2025-03-27 19:59 UTC (permalink / raw)
  To: linux-pm, linux-kernel, Csókás, Bence,
	Varshini Rajendran, Tudor Ambarus, Mark Brown, linux-spi,
	linux-arm-kernel
  Cc: Rafael J. Wysocki, Len Brown, Pavel Machek, Greg Kroah-Hartman,
	Danilo Krummrich, Alexander Dahl, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea

The probe() function of the atmel-quadspi driver got quite convoluted,
especially since the addition of SAMA7G5 support, that was forward-ported
from an older vendor kernel. During the port, a bug was introduced, where
the PM get() and put() calls were imbalanced. To alleivate this - and
similar problems in the future - an effort was made to migrate as many
functions as possible, to their devm_ managed counterparts. The few
functions, which did not yet have a devm_ variant, are added in patch 1 of
this series. Patch 2 then uses these APIs to fix the probe() function.

Change in v4:
* the DMA cleanup was split out and will be submitted separately for 6.15

Change in v5:
* rebased to linux-pm/linux-next, will now target 6.15

Change in v6:
* add `devm_pm_runtime_set_active_enabled()`, which is safer

Links to previous versions:
pre-series:
https://lore.kernel.org/linux-kernel/20250114222851.1023194-1-csokas.bence@prolan.hu/
v1:
https://lore.kernel.org/linux-kernel/20250115160244.1102881-1-csokas.bence@prolan.hu/
v2:
https://lore.kernel.org/linux-kernel/20250124085221.766303-8-csokas.bence@prolan.hu/
v3:
https://lore.kernel.org/linux-kernel/20250207124802.165408-1-csokas.bence@prolan.hu/
v4:
https://lore.kernel.org/linux-kernel/20250210111008.248929-1-csokas.bence@prolan.hu/
v5:
https://lore.kernel.org/linux-kernel/20250317093445.361821-1-csokas.bence@prolan.hu

Bence Csókás (2):
  pm: runtime: Add new devm functions
  spi: atmel-quadspi: Fix unbalanced pm_runtime by using devm_ API

 drivers/base/power/runtime.c | 44 ++++++++++++++++++++++++++++++++++++
 drivers/spi/atmel-quadspi.c  | 17 ++++----------
 include/linux/pm_runtime.h   |  4 ++++
 3 files changed, 52 insertions(+), 13 deletions(-)


base-commit: 8f61ea3ebb4de9a4cacff995b6885e91450cb094
-- 
2.49.0



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-05-12 12:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-27 19:59 [PATCH v6 0/2] Add more devm_ functions to fix PM imbalance in spi/atmel-quadspi.c Bence Csókás
2025-03-27 19:59 ` [PATCH v6 1/2] pm: runtime: Add new devm functions Bence Csókás
2025-04-09 17:43   ` Rafael J. Wysocki
2025-04-14 13:56     ` Csókás Bence
2025-04-14 14:10       ` Mark Brown
2025-04-28  8:44     ` Csókás Bence
2025-04-29 11:08       ` Rafael J. Wysocki
2025-05-05 19:02         ` Csókás Bence
2025-05-09 17:52           ` [GIT TAG] Power management (runtime PM) change for 6.16 Rafael J. Wysocki
2025-05-09 17:54           ` [PATCH v6 1/2] pm: runtime: Add new devm functions Rafael J. Wysocki
2025-03-27 19:59 ` [PATCH v6 2/2] spi: atmel-quadspi: Fix unbalanced pm_runtime by using devm_ API Bence Csókás
2025-05-12 12:09 ` [PATCH v6 0/2] Add more devm_ functions to fix PM imbalance in spi/atmel-quadspi.c Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox