xref: /linux/drivers/staging/media/atomisp/pci/hive_isp_css_include/host/csi_rx_public.h (revision 3fd6c59042dbba50391e30862beac979491145fe)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Support for Intel Camera Imaging ISP subsystem.
4  * Copyright (c) 2015, Intel Corporation.
5  */
6 
7 #ifndef __CSI_RX_PUBLIC_H_INCLUDED__
8 #define __CSI_RX_PUBLIC_H_INCLUDED__
9 
10 /*****************************************************
11  *
12  * Native command interface (NCI).
13  *
14  *****************************************************/
15 /**
16  * @brief Get the csi rx frontend state.
17  * Get the state of the csi rx frontend regiester-set.
18  *
19  * @param[in]	id	The global unique ID of the csi rx fe controller.
20  * @param[out]	state	Point to the register-state.
21  */
22 void csi_rx_fe_ctrl_get_state(
23     const csi_rx_frontend_ID_t ID,
24     csi_rx_fe_ctrl_state_t *state);
25 /**
26  * @brief Dump the csi rx frontend state.
27  * Dump the state of the csi rx frontend regiester-set.
28  *
29  * @param[in]	id	The global unique ID of the csi rx fe controller.
30  * @param[in]	state	Point to the register-state.
31  */
32 void csi_rx_fe_ctrl_dump_state(
33     const csi_rx_frontend_ID_t ID,
34     csi_rx_fe_ctrl_state_t *state);
35 /**
36  * @brief Get the state of the csi rx fe dlane.
37  * Get the state of the register set per dlane process.
38  *
39  * @param[in]	id			The global unique ID of the input-buffer controller.
40  * @param[in]	lane		The lane ID.
41  * @param[out]	state		Point to the dlane state.
42  */
43 void csi_rx_fe_ctrl_get_dlane_state(
44     const csi_rx_frontend_ID_t ID,
45     const u32 lane,
46     csi_rx_fe_ctrl_lane_t *dlane_state);
47 /**
48  * @brief Get the csi rx backend state.
49  * Get the state of the csi rx backend regiester-set.
50  *
51  * @param[in]	id	The global unique ID of the csi rx be controller.
52  * @param[out]	state	Point to the register-state.
53  */
54 void csi_rx_be_ctrl_get_state(
55     const csi_rx_backend_ID_t ID,
56     csi_rx_be_ctrl_state_t *state);
57 /**
58  * @brief Dump the csi rx backend state.
59  * Dump the state of the csi rx backend regiester-set.
60  *
61  * @param[in]	id	The global unique ID of the csi rx be controller.
62  * @param[in]	state	Point to the register-state.
63  */
64 void csi_rx_be_ctrl_dump_state(
65     const csi_rx_backend_ID_t ID,
66     csi_rx_be_ctrl_state_t *state);
67 /* end of NCI */
68 
69 /*****************************************************
70  *
71  * Device level interface (DLI).
72  *
73  *****************************************************/
74 /**
75  * @brief Load the register value.
76  * Load the value of the register of the csi rx fe.
77  *
78  * @param[in]	ID	The global unique ID for the ibuf-controller instance.
79  * @param[in]	reg	The offset address of the register.
80  *
81  * @return the value of the register.
82  */
83 hrt_data csi_rx_fe_ctrl_reg_load(
84     const csi_rx_frontend_ID_t ID,
85     const hrt_address reg);
86 /**
87  * @brief Store a value to the register.
88  * Store a value to the register of the csi rx fe.
89  *
90  * @param[in]	ID		The global unique ID for the ibuf-controller instance.
91  * @param[in]	reg		The offset address of the register.
92  * @param[in]	value	The value to be stored.
93  *
94  */
95 void csi_rx_fe_ctrl_reg_store(
96     const csi_rx_frontend_ID_t ID,
97     const hrt_address reg,
98     const hrt_data value);
99 /**
100  * @brief Load the register value.
101  * Load the value of the register of the csirx be.
102  *
103  * @param[in]	ID	The global unique ID for the ibuf-controller instance.
104  * @param[in]	reg	The offset address of the register.
105  *
106  * @return the value of the register.
107  */
108 hrt_data csi_rx_be_ctrl_reg_load(
109     const csi_rx_backend_ID_t ID,
110     const hrt_address reg);
111 /**
112  * @brief Store a value to the register.
113  * Store a value to the register of the csi rx be.
114  *
115  * @param[in]	ID		The global unique ID for the ibuf-controller instance.
116  * @param[in]	reg		The offset address of the register.
117  * @param[in]	value	The value to be stored.
118  *
119  */
120 void csi_rx_be_ctrl_reg_store(
121     const csi_rx_backend_ID_t ID,
122     const hrt_address reg,
123     const hrt_data value);
124 /* end of DLI */
125 #endif /* __CSI_RX_PUBLIC_H_INCLUDED__ */
126