summaryrefslogtreecommitdiff
path: root/include/linux/workqueue_api.h
diff options
context:
space:
mode:
authorCoia Prant <coiaprant@gmail.com>2026-10-23 15:52:13 +0800
committerJakub Kicinski <kuba@kernel.org>2026-10-28 17:29:38 -0700
commiteea365ed283cb2a7418b277fef87b462418e2283 (patch)
tree79dddd1f874a991a11d7f6eedddbe7b988053de2 /include/linux/workqueue_api.h
parent49d8bbc21244f0c2d2ebf5ee03fb7352ff019ecc (diff)
net: pcs: xpcs-plat: fix clock lifecycle for !CONFIG_PM builds
With CONFIG_PM disabled, pm_runtime_enable() and the runtime resume path are compiled out, so the CSR clock is never prepared/enabled. On platforms that provide a real "csr" clock this makes register access fail. Handle this by preparing/enabling the CSR clock manually in the !PM case and disabling it in the devm cleanup action. The CONFIG_PM path is left unchanged and still relies on runtime PM to gate the clock. Use RUNTIME_PM_OPS() and pm_ptr() for the PM ops as well, so that in !CONFIG_PM builds the runtime callbacks are still referenced and .pm is NULL rather than pointing at an empty ops structure. This also drops the __maybe_unused annotations from the callbacks, which were only needed because SET_RUNTIME_PM_OPS() expands to nothing when CONFIG_PM is disabled. Both changes are no-ops when CONFIG_PM is enabled. The CSR clock is optional (devm_clk_get_optional()), so platforms without a clock keep working in both cases, and clk_prepare_enable() on a NULL clock is a no-op. Because the !PM case is handled in the driver, there is no need to select or depend on PM in Kconfig for all platforms; keep the current Kconfig as-is to preserve compile coverage. Signed-off-by: Coia Prant <coiaprant@gmail.com> Link: https://patch.msgid.link/20261023075214.1793922-4-coiaprant@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/workqueue_api.h')
0 files changed, 0 insertions, 0 deletions