linux-stable/drivers/firmware/arm_scmi
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
..
transports firmware: arm_scmi: Calculate virtio PDU max size dynamically 2024-10-28 14:51:10 +00:00
vendors/imx firmware: arm_scmi: Fix i.MX build dependency 2024-12-03 15:47:11 +00:00
base.c firmware: arm_scmi: Replace comma with the semicolon 2024-08-28 17:16:25 +01:00
bus.c firmware: arm_scmi: Fix slab-use-after-free in scmi_bus_notifier() 2024-10-22 09:53:51 +01:00
clock.c firmware: arm_scmi: Fix trivial whitespace/coding style issues 2024-08-28 17:16:25 +01:00
common.h Arm SCMI updates for v6.13 2024-11-12 15:56:51 +01:00
driver.c Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
Kconfig firmware: arm_scmi: Add initial support for i.MX BBM protocol 2024-08-28 21:54:03 +01:00
Makefile firmware: arm_scmi: Add initial support for i.MX BBM protocol 2024-08-28 21:54:03 +01:00
msg.c firmware: arm_scmi: Remove legacy transport-layer code 2024-08-16 10:26:58 +01:00
notify.c firmware: arm_scmi: Simplify scmi_devm_notifier_unregister 2024-03-26 11:33:33 +00:00
notify.h firmware: arm_scmi: Check for notification support 2024-02-20 06:35:55 +00:00
perf.c firmware: arm_scmi: Report duplicate opps as firmware bugs 2024-11-12 19:45:25 +01:00
pinctrl.c firmware: arm_scmi: Fix trivial whitespace/coding style issues 2024-08-28 17:16:25 +01:00
power.c firmware: arm_scmi: Update various protocols versions 2024-08-16 10:26:58 +01:00
powercap.c firmware: arm_scmi: Fix wrong fastchannel initialization 2024-03-25 10:14:28 +00:00
protocols.h move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
raw_mode.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
raw_mode.h firmware: arm_scmi: Add per-channel raw injection support 2023-01-20 11:41:37 +00:00
reset.c firmware: arm_scmi: Update various protocols versions 2024-08-16 10:26:58 +01:00
scmi_power_control.c firmware: arm_scmi: Add support for system suspend in power control driver 2024-06-14 09:48:35 +01:00
sensors.c firmware: arm_scmi: Update various protocols versions 2024-08-16 10:26:58 +01:00
shmem.c firmware: arm_scmi: Account for SHMEM memory overhead 2024-10-28 14:51:10 +00:00
system.c firmware: arm_scmi: Update various protocols versions 2024-08-16 10:26:58 +01:00
voltage.c firmware: arm_scmi: Update various protocols versions 2024-08-16 10:26:58 +01:00