Merge tag 'powerpc-4.15-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[sfrench/cifs-2.6.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / hive_isp_css_include / host / csi_rx_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 __CSI_RX_PUBLIC_H_INCLUDED__
16 #define __CSI_RX_PUBLIC_H_INCLUDED__
17
18 #ifdef USE_INPUT_SYSTEM_VERSION_2401
19 /*****************************************************
20  *
21  * Native command interface (NCI).
22  *
23  *****************************************************/
24 /**
25  * @brief Get the csi rx frontend state.
26  * Get the state of the csi rx frontend regiester-set.
27  *
28  * @param[in]   id      The global unique ID of the csi rx fe controller.
29  * @param[out]  state   Point to the register-state.
30  */
31 extern void csi_rx_fe_ctrl_get_state(
32                 const csi_rx_frontend_ID_t ID,
33                 csi_rx_fe_ctrl_state_t *state);
34 /**
35  * @brief Dump the csi rx frontend state.
36  * Dump the state of the csi rx frontend regiester-set.
37  *
38  * @param[in]   id      The global unique ID of the csi rx fe controller.
39  * @param[in]   state   Point to the register-state.
40  */
41 extern void csi_rx_fe_ctrl_dump_state(
42                 const csi_rx_frontend_ID_t ID,
43                 csi_rx_fe_ctrl_state_t *state);
44 /**
45  * @brief Get the state of the csi rx fe dlane.
46  * Get the state of the register set per dlane process.
47  *
48  * @param[in]   id                      The global unique ID of the input-buffer controller.
49  * @param[in]   lane            The lane ID.
50  * @param[out]  state           Point to the dlane state.
51  */
52 extern void csi_rx_fe_ctrl_get_dlane_state(
53                 const csi_rx_frontend_ID_t ID,
54                 const uint32_t lane,
55                 csi_rx_fe_ctrl_lane_t *dlane_state);
56 /**
57  * @brief Get the csi rx backend state.
58  * Get the state of the csi rx backend regiester-set.
59  *
60  * @param[in]   id      The global unique ID of the csi rx be controller.
61  * @param[out]  state   Point to the register-state.
62  */
63 extern void csi_rx_be_ctrl_get_state(
64                 const csi_rx_backend_ID_t ID,
65                 csi_rx_be_ctrl_state_t *state);
66 /**
67  * @brief Dump the csi rx backend state.
68  * Dump the state of the csi rx backend regiester-set.
69  *
70  * @param[in]   id      The global unique ID of the csi rx be controller.
71  * @param[in]   state   Point to the register-state.
72  */
73 extern void csi_rx_be_ctrl_dump_state(
74                 const csi_rx_backend_ID_t ID,
75                 csi_rx_be_ctrl_state_t *state);
76 /* end of NCI */
77
78 /*****************************************************
79  *
80  * Device level interface (DLI).
81  *
82  *****************************************************/
83 /**
84  * @brief Load the register value.
85  * Load the value of the register of the csi rx fe.
86  *
87  * @param[in]   ID      The global unique ID for the ibuf-controller instance.
88  * @param[in]   reg     The offet address of the register.
89  *
90  * @return the value of the register.
91  */
92 extern hrt_data csi_rx_fe_ctrl_reg_load(
93         const csi_rx_frontend_ID_t ID,
94         const hrt_address reg);
95 /**
96  * @brief Store a value to the register.
97  * Store a value to the registe of the csi rx fe.
98  *
99  * @param[in]   ID              The global unique ID for the ibuf-controller instance.
100  * @param[in]   reg             The offet address of the register.
101  * @param[in]   value   The value to be stored.
102  *
103  */
104 extern void csi_rx_fe_ctrl_reg_store(
105         const csi_rx_frontend_ID_t ID,
106         const hrt_address reg,
107         const hrt_data value);
108 /**
109  * @brief Load the register value.
110  * Load the value of the register of the csirx be.
111  *
112  * @param[in]   ID      The global unique ID for the ibuf-controller instance.
113  * @param[in]   reg     The offet address of the register.
114  *
115  * @return the value of the register.
116  */
117 extern hrt_data csi_rx_be_ctrl_reg_load(
118         const csi_rx_backend_ID_t ID,
119         const hrt_address reg);
120 /**
121  * @brief Store a value to the register.
122  * Store a value to the registe of the csi rx be.
123  *
124  * @param[in]   ID              The global unique ID for the ibuf-controller instance.
125  * @param[in]   reg             The offet address of the register.
126  * @param[in]   value   The value to be stored.
127  *
128  */
129 extern void csi_rx_be_ctrl_reg_store(
130         const csi_rx_backend_ID_t ID,
131         const hrt_address reg,
132         const hrt_data value);
133 /* end of DLI */
134 #endif /* USE_INPUT_SYSTEM_VERSION_2401 */
135 #endif /* __CSI_RX_PUBLIC_H_INCLUDED__ */