summaryrefslogtreecommitdiff
path: root/include/linux/device
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/device
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/device')
-rw-r--r--include/linux/device/driver.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/linux/device/driver.h b/include/linux/device/driver.h
index 768a1334c0a1..29fbc01ef06f 100644
--- a/include/linux/device/driver.h
+++ b/include/linux/device/driver.h
@@ -297,4 +297,35 @@ static int __init __driver##_init(void) \
} \
device_initcall(__driver##_init);
+/**
+ * subsys_driver() - Helper macro for drivers that don't do anything special
+ * in init/exit but have 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 the init/exit boilerplate.
+ *
+ * @__driver: driver name
+ * @__register: register function for this driver type
+ * @__unregister: unregister function for this driver type
+ * @...: Additional arguments to be passed to __register and __unregister.
+ *
+ * This is meant to be a direct parallel of module_driver() above, but with
+ * the init call promoted to subsys_initcall() for built-in drivers so they
+ * are available earlier during boot. When built as a module subsys_initcall()
+ * collapses to module_init() and the normal module init/exit paths are used.
+ *
+ * Use this macro to construct bus specific macros for registering drivers,
+ * and do not use it on its own.
+ */
+#define subsys_driver(__driver, __register, __unregister, ...) \
+static int __init __driver##_init(void) \
+{ \
+ return __register(&(__driver), ##__VA_ARGS__); \
+} \
+subsys_initcall(__driver##_init) \
+static void __exit __driver##_exit(void) \
+{ \
+ __unregister(&(__driver), ##__VA_ARGS__); \
+} \
+module_exit(__driver##_exit)
+
#endif /* _DEVICE_DRIVER_H_ */