1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Support for Intel Camera Imaging ISP subsystem.
4  * Copyright (c) 2010 - 2015, Intel Corporation.
5  */
6 
7 #ifndef _IA_CSS_EVENTQ_H
8 #define _IA_CSS_EVENTQ_H
9 
10 #include "ia_css_queue.h"	/* queue APIs */
11 
12 /**
13  * @brief HOST receives event from SP.
14  *
15  * @param[in]	eventq_handle	eventq_handle.
16  * @param[in]	payload		The event payload.
17  * @return	0		- Successfully dequeue.
18  * @return	-EINVAL		- Invalid argument.
19  * @return	-ENODATA		- Queue is empty.
20  */
21 int ia_css_eventq_recv(
22     ia_css_queue_t *eventq_handle,
23     uint8_t *payload);
24 
25 /**
26  * @brief The Host sends the event to SP.
27  * The caller of this API will be blocked until the event
28  * is sent.
29  *
30  * @param[in]	eventq_handle   eventq_handle.
31  * @param[in]	evt_id		The event ID.
32  * @param[in]	evt_payload_0	The event payload.
33  * @param[in]	evt_payload_1	The event payload.
34  * @param[in]	evt_payload_2	The event payload.
35  * @return	0		- Successfully enqueue.
36  * @return	-EINVAL		- Invalid argument.
37  * @return	-ENOBUFS		- Queue is full.
38  */
39 int ia_css_eventq_send(
40     ia_css_queue_t *eventq_handle,
41     u8 evt_id,
42     u8 evt_payload_0,
43     u8 evt_payload_1,
44     uint8_t evt_payload_2);
45 #endif /* _IA_CSS_EVENTQ_H */
46