imx.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] firmware: imx: Add stub functions for MISC/CPU/LMM APIs
@ 2025-08-25  7:00 Peng Fan
  2025-08-25  7:00 ` [PATCH v2 1/3] firmware: imx: Add stub functions for SCMI MISC API Peng Fan
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Peng Fan @ 2025-08-25  7:00 UTC (permalink / raw)
  To: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Arnd Bergmann, Sudeep Holla, Cristian Marussi
  Cc: imx, linux-arm-kernel, linux-kernel, Peng Fan

To ensure successful builds when CONFIG_IMX_SCMI_[MISC,CPU,LMM]_DRV are not
enabled, this patchset adds static inline stub implementations:

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.

The initial support for SCMI MISC API was to use CONFIG_IMX_SCMI_MISC_EXT
to guard the API. But this is wrong. There was an commit [1] that tried to
address build issue for MISC API, but the better fix should use
CONFIG_IMX_SCMI_MISC_DRV to guard the APIs. Because when user driver
reference the APIs, but CONFIG_IMX_SCMI_MISC_DRV is not defined, there
will be link error.

This patchset is to fix the issues for all the three drivers.

I add Fixes tag to the patchset, so I not delay the sending until RC1.

[1] 540c830212ed ("firmware: imx: remove duplicate scmi_imx_misc_ctrl_get()")

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
Changes in v2:
- Add R-b from Cristian
- Update commit log in patch 1 per Arnd
- Link to v1: https://lore.kernel.org/r/20250807-imx9-sm-v1-0-3489e41a6fda@nxp.com

---
Peng Fan (3):
      firmware: imx: Add stub functions for SCMI MISC API
      firmware: imx: Add stub functions for SCMI LMM API
      firmware: imx: Add stub functions for SCMI CPU API

 include/linux/firmware/imx/sm.h | 47 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
---
base-commit: 706168a6b4c3560b7930a2b00899f4e6e8520b22
change-id: 20250807-imx9-sm-bea018f06042

Best regards,
-- 
Peng Fan <peng.fan@nxp.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-09-02 13:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-25  7:00 [PATCH v2 0/3] firmware: imx: Add stub functions for MISC/CPU/LMM APIs Peng Fan
2025-08-25  7:00 ` [PATCH v2 1/3] firmware: imx: Add stub functions for SCMI MISC API Peng Fan
2025-08-25  7:00 ` [PATCH v2 2/3] firmware: imx: Add stub functions for SCMI LMM API Peng Fan
2025-08-25  7:00 ` [PATCH v2 3/3] firmware: imx: Add stub functions for SCMI CPU API Peng Fan
2025-09-02 13:01 ` [PATCH v2 0/3] firmware: imx: Add stub functions for MISC/CPU/LMM APIs Peng Fan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).