@@ -160,4 +160,10 @@ config ARM_SCMI_TEST_DRIVER
This driver can also be built as a module. If so, the module
will be called scmi_test_driver.
+config ARM_SCMI_TEST_DRIVER_COEXISTENCE
+ bool "Allow Coexistence of SCMI standard drivers and test driver"
+ depends on ARM_SCMI_TEST_DRIVER
+ help
+ This enables coexistence for concurrent SCMI drievrs and testing driver.
+
endmenu
@@ -1782,14 +1782,15 @@ static int scmi_protocol_device_request(const struct scmi_device_id *id_table)
pr_debug("Requesting SCMI device (%s) for protocol %x\n",
id_table->name, id_table->protocol_id);
-#if IS_ENABLED(CONFIG_ARM_SCMI_TEST_DRIVER)
- /* Reject non-testing SCMI drivers */
- if (strncmp(id_table->name, "__scmi_test", strlen("__scmi_test"))) {
- pr_warn("SCMI Test driver loaded. Rejecting '%s'/0x%X\n",
- id_table->name, id_table->protocol_id);
- return -EINVAL;
+ if (IS_ENABLED(CONFIG_ARM_SCMI_TEST_DRIVER) &&
+ !IS_ENABLED(CONFIG_ARM_SCMI_TEST_DRIVER_COEXISTENCE)) {
+ /* Reject non-testing SCMI drivers */
+ if (strncmp(id_table->name, "__scmi_test", strlen("__scmi_test"))) {
+ pr_warn("SCMI Test driver loaded. Rejecting driver: '%s'/0x%X\n",
+ id_table->name, id_table->protocol_id);
+ return -EBUSY;
+ }
}
-#endif
/*
* Search for the matching protocol rdev list and then search
firmware: arm_scmi: Add Kconfig to allow SCMI Testing driver coexistence Signed-off-by: Cristian Marussi <cristian.marussi@arm.com> --- drivers/firmware/arm_scmi/Kconfig | 6 ++++++ drivers/firmware/arm_scmi/driver.c | 15 ++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-)