@@ -55,6 +55,20 @@ static int scmi_protocol_device_request(const struct scmi_device_id *id_table)
unsigned int id = 0;
struct list_head *head, *phead = NULL;
struct scmi_requested_dev *rdev;
+ const char * const *allowlist = id_table->machine_allowlist;
+ const char * const *blocklist = id_table->machine_blocklist;
+
+ if (blocklist && of_machine_compatible_match(blocklist)) {
+ pr_debug("block SCMI device (%s) for protocol %x\n",
+ id_table->name, id_table->protocol_id);
+ return 0;
+ }
+
+ if (allowlist && !of_machine_compatible_match(allowlist)) {
+ pr_debug("block SCMI device (%s) for protocol %x\n",
+ id_table->name, id_table->protocol_id);
+ return 0;
+ }
pr_debug("Requesting SCMI device (%s) for protocol %x\n",
id_table->name, id_table->protocol_id);
@@ -950,6 +950,9 @@ struct scmi_device {
struct scmi_device_id {
u8 protocol_id;
const char *name;
+ /* Optional */
+ const char * const *machine_blocklist;
+ const char * const *machine_allowlist;
};
struct scmi_driver {