summaryrefslogtreecommitdiff
path: root/include/linux/platform_device.h
diff options
context:
space:
mode:
authorJerome Brunet <jbrunet@baylibre.com>2026-10-14 09:13:12 +0200
committerJerome Brunet <jbrunet@baylibre.com>2026-10-14 09:13:12 +0200
commit93bc904ba423a897ded2e35fbbfb5bcbac27133f (patch)
tree142f51badea6086f9544a3cde280e59f46391139 /include/linux/platform_device.h
parentcee9395acd8043be0644b25c34bfa86623f2b935 (diff)
parent5c32769895e75914e03031b3483775dabcfac264 (diff)
Merge tag 'qcom-clk-for-7.4-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into clk-qcom
Qualcomm clock updates for v7.4 (second attempt) Add new clock support for Eliza, Kuno, MSM8952, Nord, Hawi, Maili, and IPQ5210. Rework common probe and CX power-domain handling. Add generic subsystem-init helpers and clean up the initcall setup. - Add camera, camera BIST, GPU, and video clock controllers for Eliza, and complete the Milos camera and video power-domain bindings. - Add Nord camera and video clocks, video AXI and QUSB2 PHY resets, EMAC interconnect clocks, and the corrected GCC GPLL enable offset. - Add Hawi camera and GPU clock controllers, extend them for Maili, and correct the camera Rivian PLL configuration. - Add global and RPMh clock controllers for Kuno. - Add the MSM8952 global clock controller and RPM clock binding. - Extend the IPQ common PLL driver with all IPQ5210 networking clock outputs, divider flags, and safe bounds handling. - Add IPQ9650 NoC clock management through the interconnect framework, add 24 MHz USB UTMI rates for three IPQ SoCs, and correct IPQ5018 and IPQ5424 clock and reset handling. - Add QCS8300 TSCSS clocks and resets, SM7250 RPMh clocks, and Glymur LNBB clocks. - Model GCC CX power-domain dependencies and runtime PM across the affected application, compute, and modem platforms. - Move always-on clock and GCC initialization into common Qualcomm probe handling across 47 camera, display, GPU, video, audio, and global clock controller drivers. - Add generic subsys_driver and subsys_platform_driver helpers, then convert the Qualcomm and Renesas clock drivers to use them. - Fix shared RCG initialization, status error propagation, and cleanup after failed rate changes. - Correct clock and reset register offsets for SM6115, QCS615, MSM8996, SDM660, and IPQ5424. - Correct APQ8064 PLL15 setup, MSM8939 Venus GDSC flags, SM8450 display clock ops, Glymur clock IDs and UFS mux ops, X1E80100 USB4 polling, and Lucid Ole PLL status handling. - Split out the X1E80100 TCSR binding and use the clk_ref helper, merge SM7150 into the SM6375 GCC binding, sort the Nord Kconfig entries, and migrate the SM8450 display controller to common driver data. - Add Abel Vesa as a reviewer for Qualcomm clock drivers.
Diffstat (limited to 'include/linux/platform_device.h')
-rw-r--r--include/linux/platform_device.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
index 3d5bbcbae730..3bd0f1f0d870 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -344,6 +344,19 @@ static inline void platform_set_drvdata(struct platform_device *pdev,
#define builtin_platform_driver(__platform_driver) \
builtin_driver(__platform_driver, platform_driver_register)
+/*
+ * subsys_platform_driver() - Helper macro for drivers that don't do anything
+ * special in module init/exit but need to register earlier, at
+ * subsys_initcall level, when built in. This eliminates a lot of
+ * boilerplate. Each driver may only use this macro once, and calling it
+ * replaces module_init() and module_exit(). This is meant to be a parallel
+ * of module_platform_driver() above, but with the init call promoted to
+ * subsys_initcall() so built-in providers are available earlier during boot.
+ */
+#define subsys_platform_driver(__platform_driver) \
+ subsys_driver(__platform_driver, platform_driver_register, \
+ platform_driver_unregister)
+
/* module_platform_driver_probe() - Helper macro for drivers that don't do
* anything special in module init/exit. This eliminates a lot of
* boilerplate. Each module may only use this macro once, and
@@ -376,6 +389,23 @@ static int __init __platform_driver##_init(void) \
} \
device_initcall(__platform_driver##_init); \
+/*
+ * subsys_platform_driver_probe() - Helper macro for drivers that don't do
+ * anything special in device init and have no exit, but need to register
+ * earlier, at subsys_initcall level. This eliminates some boilerplate. Each
+ * driver may only use this macro once, and using it replaces subsys_initcall.
+ * This is meant to be a parallel of builtin_platform_driver_probe above, but
+ * with the init call promoted to subsys_initcall so the provider is available
+ * earlier during boot.
+ */
+#define subsys_platform_driver_probe(__platform_driver, __platform_probe) \
+static int __init __platform_driver##_init(void) \
+{ \
+ return platform_driver_probe(&(__platform_driver), \
+ __platform_probe); \
+} \
+subsys_initcall(__platform_driver##_init) \
+
#define platform_create_bundle(driver, probe, res, n_res, data, size) \
__platform_create_bundle(driver, probe, res, n_res, data, size, THIS_MODULE, KBUILD_MODNAME)
extern struct platform_device *__platform_create_bundle(