1 /* SPDX-License-Identifier: GPL-2.0 */
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 
16 #ifndef __PIXELGEN_PUBLIC_H_INCLUDED__
17 #define __PIXELGEN_PUBLIC_H_INCLUDED__
18 
19 #ifdef ISP2401
20 /*****************************************************
21  *
22  * Native command interface (NCI).
23  *
24  *****************************************************/
25 /**
26  * @brief Get the pixelgen state.
27  * Get the state of the pixelgen regiester-set.
28  *
29  * @param[in]	id	The global unique ID of the pixelgen controller.
30  * @param[out]	state	Point to the register-state.
31  */
32 STORAGE_CLASS_PIXELGEN_H void pixelgen_ctrl_get_state(
33     const pixelgen_ID_t ID,
34     pixelgen_ctrl_state_t *state);
35 /**
36  * @brief Dump the pixelgen state.
37  * Dump the state of the pixelgen regiester-set.
38  *
39  * @param[in]	id	The global unique ID of the pixelgen controller.
40  * @param[in]	state	Point to the register-state.
41  */
42 STORAGE_CLASS_PIXELGEN_H void pixelgen_ctrl_dump_state(
43     const pixelgen_ID_t ID,
44     pixelgen_ctrl_state_t *state);
45 /* end of NCI */
46 
47 /*****************************************************
48  *
49  * Device level interface (DLI).
50  *
51  *****************************************************/
52 /**
53  * @brief Load the register value.
54  * Load the value of the register of the pixelgen
55  *
56  * @param[in]	ID	The global unique ID for the pixelgen instance.
57  * @param[in]	reg	The offset address of the register.
58  *
59  * @return the value of the register.
60  */
61 STORAGE_CLASS_PIXELGEN_H hrt_data pixelgen_ctrl_reg_load(
62     const pixelgen_ID_t ID,
63     const hrt_address reg);
64 /**
65  * @brief Store a value to the register.
66  * Store a value to the registe of the pixelgen
67  *
68  * @param[in]	ID		The global unique ID for the pixelgen.
69  * @param[in]	reg		The offset address of the register.
70  * @param[in]	value	The value to be stored.
71  *
72  */
73 STORAGE_CLASS_PIXELGEN_H void pixelgen_ctrl_reg_store(
74     const pixelgen_ID_t ID,
75     const hrt_address reg,
76     const hrt_data value);
77 /* end of DLI */
78 
79 #endif /* ISP2401 */
80 #endif /* __PIXELGEN_PUBLIC_H_INCLUDED__ */
81