firmware: arm_scmi: Avoid notifier registration for unsupported events
authorCristian Marussi <cristian.marussi@arm.com>
Mon, 7 Jul 2025 14:42:20 +0000 (15:42 +0100)
committerSudeep Holla <sudeep.holla@arm.com>
Tue, 8 Jul 2025 15:13:55 +0000 (16:13 +0100)
commitb5daf93b809d13a194f8a8eeacfab1cfa241bbc3
treee37257a66801abac3f6ea80e7d21c79db9c411d9
parent9a0658d3991e6c82df87584b253454842f22f965
firmware: arm_scmi: Avoid notifier registration for unsupported events

Some platforms may be configured to not support notification events from
certain sources. This scenario is already handled gracefully by avoiding
any attempt to send a notification enable request for those sources, as
such requests would inevitably fail.

However, in a more extreme case, a platform might not support even a
single source for a given event type. In this situation, allowing
notifier registration is meaningless. Attempting to register a notifier
would serve no purpose and only result in unnecessary overhead.

To address this, we now detect such conditions during the protocol
initialization. When identified, we flag the unsupported event types and
reject any subsequent notifier registration attempts for them with
-ENOTSUPP. This early rejection avoids redundant processing and
simplifies runtime logic.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Message-Id: <20250707144220.485365-1-cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/notify.c