[PATCH v2 0/2] pmdomain: imx: build the SCU power domain driver as a module

Zhipeng.wang_1@oss.nxp.com posted 2 patches 2 days, 20 hours ago
There is a newer version of this series
drivers/of/base.c             | 1 +
drivers/pmdomain/imx/Kconfig  | 2 +-
drivers/pmdomain/imx/scu-pd.c | 8 +++++++-
3 files changed, 9 insertions(+), 2 deletions(-)
[PATCH v2 0/2] pmdomain: imx: build the SCU power domain driver as a module
Posted by Zhipeng.wang_1@oss.nxp.com 2 days, 20 hours ago
From: Zhipeng Wang <zhipeng.wang_1@nxp.com>

This series makes the i.MX SCU power domain driver buildable as a
loadable module, which is required for Android devices using the
Generic Kernel Image (GKI) where SoC-specific drivers must be modules.

Patch 1 exports of_stdout (which the driver references to find the
console's power domain) from the OF core with EXPORT_SYMBOL_GPL().

Patch 2 converts CONFIG_IMX_SCU_PD from bool to tristate and adds
MODULE_DEVICE_TABLE() for autoloading. Only module_init() is provided
without module_exit(), since the provider cannot be safely removed at
runtime.

Because of the cross-subsystem dependency (patch 1 touches drivers/of,
patch 2 touches drivers/pmdomain), I would suggest taking the whole
series through one tree.

Changes in v2:
- Drop module_platform_driver() which provides module_exit() and could
  lead to use-after-free on module unload. Use module_init() only, so
  the module cannot be unloaded. (Sashiko bot)

Zhipeng Wang (2):
  of: export of_stdout symbol
  pmdomain: imx: scu-pd: allow building as a module

 drivers/of/base.c             | 1 +
 drivers/pmdomain/imx/Kconfig  | 2 +-
 drivers/pmdomain/imx/scu-pd.c | 8 +++++++-
 3 files changed, 9 insertions(+), 2 deletions(-)

-- 
2.34.1