summaryrefslogtreecommitdiffstats
path: root/include/linux/soc
diff options
context:
space:
mode:
authorHector Martin <marcan@marcan.st>2022-09-14 09:34:31 +0100
committerArnd Bergmann <arnd@arndb.de>2022-09-17 19:53:29 +0200
commitf5a5e83379b537f6252526bb4d285b771f6f0b89 (patch)
treee77a4a4e75c28e77ce5134eaaf6ea78b59165148 /include/linux/soc
parent387969b7ab014ca71582473a4950fa711efe204b (diff)
downloadlinux-f5a5e83379b537f6252526bb4d285b771f6f0b89.tar.bz2
soc: apple: rtkit: Add apple_rtkit_poll
This allows a client to receive messages in atomic context, by polling. Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Sven Peter <sven@svenpeter.dev> Reviewed-by: Eric Curtin <ecurtin@redhat.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/linux/soc')
-rw-r--r--include/linux/soc/apple/rtkit.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/soc/apple/rtkit.h b/include/linux/soc/apple/rtkit.h
index 88eb832eac7b..c9cabb679cd1 100644
--- a/include/linux/soc/apple/rtkit.h
+++ b/include/linux/soc/apple/rtkit.h
@@ -152,4 +152,16 @@ int apple_rtkit_send_message(struct apple_rtkit *rtk, u8 ep, u64 message,
int apple_rtkit_send_message_wait(struct apple_rtkit *rtk, u8 ep, u64 message,
unsigned long timeout, bool atomic);
+/*
+ * Process incoming messages in atomic context.
+ * This only guarantees that messages arrive as far as the recv_message_early
+ * callback; drivers expecting to handle incoming messages synchronously
+ * by calling this function must do it that way.
+ * Will return 1 if some data was processed, 0 if none was, or a
+ * negative error code on failure.
+ *
+ * @rtk: RTKit reference
+ */
+int apple_rtkit_poll(struct apple_rtkit *rtk);
+
#endif /* _LINUX_APPLE_RTKIT_H_ */