1 /* SPDX-License-Identifier: GPL-2.0 */
3 #ifndef _FIRMWARE_XLNX_EVENT_MANAGER_H_
4 #define _FIRMWARE_XLNX_EVENT_MANAGER_H_
6 #include <linux/firmware/xlnx-zynqmp.h>
8 #define CB_MAX_PAYLOAD_SIZE (4U) /*In payload maximum 32bytes */
10 /************************** Exported Function *****************************/
12 typedef void (*event_cb_func_t)(const u32 *payload, void *data);
14 #if IS_REACHABLE(CONFIG_XLNX_EVENT_MANAGER)
15 int xlnx_register_event(const enum pm_api_cb_id cb_type, const u32 node_id,
16 const u32 event, const bool wake,
17 event_cb_func_t cb_fun, void *data);
19 int xlnx_unregister_event(const enum pm_api_cb_id cb_type, const u32 node_id,
20 const u32 event, event_cb_func_t cb_fun, void *data);
22 static inline int xlnx_register_event(const enum pm_api_cb_id cb_type, const u32 node_id,
23 const u32 event, const bool wake,
24 event_cb_func_t cb_fun, void *data)
29 static inline int xlnx_unregister_event(const enum pm_api_cb_id cb_type, const u32 node_id,
30 const u32 event, event_cb_func_t cb_fun, void *data)
36 #endif /* _FIRMWARE_XLNX_EVENT_MANAGER_H_ */