linux-next/drivers/firmware/imx
Arnd Bergmann 514b2262ad firmware: arm_scmi: Fix i.MX build dependency
The newly added SCMI vendor driver references functions in the
protocol driver but needs a Kconfig dependency to ensure it can link,
essentially the Kconfig dependency needs to be reversed to match the
link time dependency:

  |  arm-linux-gnueabi-ld: sound/soc/fsl/fsl_mqs.o: in function `fsl_mqs_sm_write':
  |  	fsl_mqs.c:(.text+0x1aa): undefined reference to `scmi_imx_misc_ctrl_set'
  |  arm-linux-gnueabi-ld: sound/soc/fsl/fsl_mqs.o: in function `fsl_mqs_sm_read':
  |  	fsl_mqs.c:(.text+0x1ee): undefined reference to `scmi_imx_misc_ctrl_get'

This however only works after changing the dependency in the SND_SOC_FSL_MQS
driver as well, which uses 'select IMX_SCMI_MISC_DRV' to turn on a
driver it depends on. This is generally a bad idea, so the best solution
is to change that into a dependency.

To allow the ASoC driver to keep building with the SCMI support, this
needs to be an optional dependency that enforces the link-time
dependency if IMX_SCMI_MISC_DRV is a loadable module but not
depend on it if that is disabled.

Fixes: 61c9f03e22 ("firmware: arm_scmi: Add initial support for i.MX MISC protocol")
Fixes: 101c902359 ("ASoC: fsl_mqs: Support accessing registers by scmi interface")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Message-Id: <20241115230555.2435004-1-arnd@kernel.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-12-03 15:47:11 +00:00
..
imx-dsp.c firmware: Switch back to struct platform_driver::remove() 2024-11-12 12:55:56 +01:00
imx-scu-irq.c ARM: SoC cleanups for 6.6 2023-08-30 16:49:40 -07:00
imx-scu-soc.c firmware: imx: scu: use soc name for soc_id 2023-08-11 22:13:58 +08:00
imx-scu.c ARM: SoC cleanups for 6.6 2023-08-30 16:49:40 -07:00
Kconfig firmware: arm_scmi: Fix i.MX build dependency 2024-12-03 15:47:11 +00:00
Makefile firmware: imx: Add i.MX95 MISC driver 2024-08-28 21:54:21 +01:00
misc.c firmware: imx: Align imx_sc_msg_req_cpu_start to 4 2020-02-24 15:27:48 +08:00
rm.c firmware: imx: add get resource owner api 2022-02-12 14:07:36 +08:00
sm-misc.c firmware: imx: Add i.MX95 MISC driver 2024-08-28 21:54:21 +01:00