]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blob - drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/fifo_monitor_public.h
staging/atomisp: Add support for the Intel IPU v2
[mirror_ubuntu-hirsute-kernel.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / hive_isp_css_include / host / fifo_monitor_public.h
1 /*
2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 */
14
15 #ifndef __FIFO_MONITOR_PUBLIC_H_INCLUDED__
16 #define __FIFO_MONITOR_PUBLIC_H_INCLUDED__
17
18 #include "system_types.h"
19
20 typedef struct fifo_channel_state_s fifo_channel_state_t;
21 typedef struct fifo_switch_state_s fifo_switch_state_t;
22 typedef struct fifo_monitor_state_s fifo_monitor_state_t;
23
24 /*! Set a fifo switch multiplex
25
26 \param ID[in] FIFO_MONITOR identifier
27 \param switch_id[in] fifo switch identifier
28 \param sel[in] fifo switch selector
29
30 \return none, fifo_switch[switch_id].sel = sel
31 */
32 STORAGE_CLASS_FIFO_MONITOR_H void fifo_switch_set(
33 const fifo_monitor_ID_t ID,
34 const fifo_switch_t switch_id,
35 const hrt_data sel);
36
37 /*! Get a fifo switch multiplex
38
39 \param ID[in] FIFO_MONITOR identifier
40 \param switch_id[in] fifo switch identifier
41
42 \return fifo_switch[switch_id].sel
43 */
44 STORAGE_CLASS_FIFO_MONITOR_H hrt_data fifo_switch_get(
45 const fifo_monitor_ID_t ID,
46 const fifo_switch_t switch_id);
47
48 /*! Read the state of FIFO_MONITOR[ID]
49
50 \param ID[in] FIFO_MONITOR identifier
51 \param state[out] fifo monitor state structure
52
53 \return none, state = FIFO_MONITOR[ID].state
54 */
55 extern void fifo_monitor_get_state(
56 const fifo_monitor_ID_t ID,
57 fifo_monitor_state_t *state);
58
59 /*! Read the state of a fifo channel
60
61 \param ID[in] FIFO_MONITOR identifier
62 \param channel_id[in] fifo channel identifier
63 \param state[out] fifo channel state structure
64
65 \return none, state = fifo_channel[channel_id].state
66 */
67 extern void fifo_channel_get_state(
68 const fifo_monitor_ID_t ID,
69 const fifo_channel_t channel_id,
70 fifo_channel_state_t *state);
71
72 /*! Read the state of a fifo switch
73
74 \param ID[in] FIFO_MONITOR identifier
75 \param switch_id[in] fifo switch identifier
76 \param state[out] fifo switch state structure
77
78 \return none, state = fifo_switch[switch_id].state
79 */
80 extern void fifo_switch_get_state(
81 const fifo_monitor_ID_t ID,
82 const fifo_switch_t switch_id,
83 fifo_switch_state_t *state);
84
85 /*! Write to a control register of FIFO_MONITOR[ID]
86
87 \param ID[in] FIFO_MONITOR identifier
88 \param reg[in] register index
89 \param value[in] The data to be written
90
91 \return none, FIFO_MONITOR[ID].ctrl[reg] = value
92 */
93 STORAGE_CLASS_FIFO_MONITOR_H void fifo_monitor_reg_store(
94 const fifo_monitor_ID_t ID,
95 const unsigned int reg,
96 const hrt_data value);
97
98 /*! Read from a control register of FIFO_MONITOR[ID]
99
100 \param ID[in] FIFO_MONITOR identifier
101 \param reg[in] register index
102 \param value[in] The data to be written
103
104 \return FIFO_MONITOR[ID].ctrl[reg]
105 */
106 STORAGE_CLASS_FIFO_MONITOR_H hrt_data fifo_monitor_reg_load(
107 const fifo_monitor_ID_t ID,
108 const unsigned int reg);
109
110 #endif /* __FIFO_MONITOR_PUBLIC_H_INCLUDED__ */