GNU Linux-libre 4.14.254-gnu1
[releases.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / runtime / eventq / interface / ia_css_eventq.h
1 #ifndef ISP2401
2 /*
3  * Support for Intel Camera Imaging ISP subsystem.
4  * Copyright (c) 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 #else
16 /**
17 Support for Intel Camera Imaging ISP subsystem.
18 Copyright (c) 2010 - 2015, Intel Corporation.
19
20 This program is free software; you can redistribute it and/or modify it
21 under the terms and conditions of the GNU General Public License,
22 version 2, as published by the Free Software Foundation.
23
24 This program is distributed in the hope it will be useful, but WITHOUT
25 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
26 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
27 more details.
28 */
29 #endif
30
31 #ifndef _IA_CSS_EVENTQ_H
32 #define _IA_CSS_EVENTQ_H
33
34 #include "ia_css_queue.h"       /* queue APIs */
35
36 /**
37  * @brief HOST receives event from SP.
38  *
39  * @param[in]   eventq_handle   eventq_handle.
40  * @param[in]   payload         The event payload.
41  * @return      0               - Successfully dequeue.
42  * @return      EINVAL          - Invalid argument.
43  * @return      ENODATA         - Queue is empty.
44  */
45 int ia_css_eventq_recv(
46                 ia_css_queue_t *eventq_handle,
47                 uint8_t *payload);
48
49 /**
50  * @brief The Host sends the event to SP.
51  * The caller of this API will be blocked until the event
52  * is sent.
53  *
54  * @param[in]   eventq_handle   eventq_handle.
55  * @param[in]   evt_id          The event ID.
56  * @param[in]   evt_payload_0   The event payload.
57  * @param[in]   evt_payload_1   The event payload.
58  * @param[in]   evt_payload_2   The event payload.
59  * @return      0               - Successfully enqueue.
60  * @return      EINVAL          - Invalid argument.
61  * @return      ENOBUFS         - Queue is full.
62  */
63 int ia_css_eventq_send(
64                 ia_css_queue_t *eventq_handle,
65                 uint8_t evt_id,
66                 uint8_t evt_payload_0,
67                 uint8_t evt_payload_1,
68                 uint8_t evt_payload_2);
69 #endif /* _IA_CSS_EVENTQ_H */