firmware: arm_scmi: Check for notification support
authorCristian Marussi <cristian.marussi@arm.com>
Mon, 12 Feb 2024 12:32:23 +0000 (12:32 +0000)
committerSudeep Holla <sudeep.holla@arm.com>
Tue, 20 Feb 2024 06:35:55 +0000 (06:35 +0000)
commit8733e86a80f5a7abb7b4b6ca3f417b32c3eb68e3
treeccfe7fc97fd5c5a0d629c75bf206fab2591abf6c
parent961745b2c42eb562a6b4433dc5f8fbd974ce4137
firmware: arm_scmi: Check for notification support

When registering protocol events, use the optional .is_notify_supported
callback provided by the protocol to check if that specific notification
type is available for that particular resource on the running system,
marking it as unsupported otherwise.

Then, when a notification enable request is received, return an error if
it was previously marked as unsuppported, so avoiding to send a needless
notification enable command and check the returned value for failure.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-2-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/notify.c
drivers/firmware/arm_scmi/notify.h