• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  * This program is free software; you can redistribute it and/or modify it
7  * under the terms and conditions of the GNU General Public License,
8  * version 2, as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13  * more details.
14  */
15 
16 #ifndef _IA_CSS_EVENTQ_H
17 #define _IA_CSS_EVENTQ_H
18 
19 #include "ia_css_queue.h"	/* queue APIs */
20 
21 /**
22  * @brief HOST receives event from SP.
23  *
24  * @param[in]	eventq_handle	eventq_handle.
25  * @param[in]	payload		The event payload.
26  * @return	0		- Successfully dequeue.
27  * @return	-EINVAL		- Invalid argument.
28  * @return	-ENODATA		- Queue is empty.
29  */
30 int ia_css_eventq_recv(
31     ia_css_queue_t *eventq_handle,
32     uint8_t *payload);
33 
34 /**
35  * @brief The Host sends the event to SP.
36  * The caller of this API will be blocked until the event
37  * is sent.
38  *
39  * @param[in]	eventq_handle   eventq_handle.
40  * @param[in]	evt_id		The event ID.
41  * @param[in]	evt_payload_0	The event payload.
42  * @param[in]	evt_payload_1	The event payload.
43  * @param[in]	evt_payload_2	The event payload.
44  * @return	0		- Successfully enqueue.
45  * @return	-EINVAL		- Invalid argument.
46  * @return	-ENOBUFS		- Queue is full.
47  */
48 int ia_css_eventq_send(
49     ia_css_queue_t *eventq_handle,
50     u8 evt_id,
51     u8 evt_payload_0,
52     u8 evt_payload_1,
53     uint8_t evt_payload_2);
54 #endif /* _IA_CSS_EVENTQ_H */
55