]> Gentwo Git Trees - linux/.git/commit
firmware: imx: Add stub functions for SCMI MISC API
authorPeng Fan <peng.fan@nxp.com>
Mon, 25 Aug 2025 07:00:30 +0000 (15:00 +0800)
committerShawn Guo <shawnguo@kernel.org>
Thu, 11 Sep 2025 01:59:07 +0000 (09:59 +0800)
commitb2461e20fa9ac18b1305bba5bc7e22ebf644ea01
tree2539c4b1e6a0c5926da977ae95981ee1b2ef2a49
parent37e5caa5571b5a60b0c835a0bc09ab1e53f57bfe
firmware: imx: Add stub functions for SCMI MISC API

To ensure successful builds when CONFIG_IMX_SCMI_MISC_DRV is not enabled,
this patch adds static inline stub implementations for the following
functions:

  - scmi_imx_misc_ctrl_get()
  - scmi_imx_misc_ctrl_set()

These stubs return -EOPNOTSUPP to indicate that the functionality is not
supported in the current configuration. This avoids potential build or
link errors in code that conditionally calls these functions based on
feature availability.

This patch also drops the changes in commit 540c830212ed ("firmware: imx:
remove duplicate scmi_imx_misc_ctrl_get()").

The original change aimed to simplify the handling of optional features by
removing conditional stubs. However, the use of conditional stubs is
necessary when CONFIG_IMX_SCMI_MISC_DRV is n, while consumer driver is
set to y.

This is not a matter of preserving legacy patterns, but rather to ensure
that there is no link error whether for module or built-in.

Fixes: 0b4f8a68b292 ("firmware: imx: Add i.MX95 MISC driver")
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
include/linux/firmware/imx/sm.h