xref: /OK3568_Linux_fs/kernel/drivers/media/i2c/techpoint/techpoint_dev.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * Techpoint Dev Driver
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * Copyright (C) 2023 Rockchip Electronics Co., Ltd.
6*4882a593Smuzhiyun  */
7*4882a593Smuzhiyun 
8*4882a593Smuzhiyun #ifndef _TECHPOINT_DEV_H
9*4882a593Smuzhiyun #define _TECHPOINT_DEV_H
10*4882a593Smuzhiyun 
11*4882a593Smuzhiyun #include "techpoint_common.h"
12*4882a593Smuzhiyun 
13*4882a593Smuzhiyun struct regval {
14*4882a593Smuzhiyun 	u8 addr;
15*4882a593Smuzhiyun 	u8 val;
16*4882a593Smuzhiyun };
17*4882a593Smuzhiyun 
18*4882a593Smuzhiyun int techpoint_write_reg(struct i2c_client *client, u8 reg, u8 val);
19*4882a593Smuzhiyun int techpoint_read_reg(struct i2c_client *client, u8 reg, u8 *val);
20*4882a593Smuzhiyun int techpoint_write_array(struct i2c_client *client,
21*4882a593Smuzhiyun 			  const struct regval *regs, int size);
22*4882a593Smuzhiyun 
23*4882a593Smuzhiyun void __techpoint_get_vc_fmt_inf(struct techpoint *techpoint,
24*4882a593Smuzhiyun 				struct rkmodule_vc_fmt_info *inf);
25*4882a593Smuzhiyun void techpoint_get_vc_fmt_inf(struct techpoint *techpoint,
26*4882a593Smuzhiyun 			      struct rkmodule_vc_fmt_info *inf);
27*4882a593Smuzhiyun void techpoint_get_vc_hotplug_inf(struct techpoint *techpoint,
28*4882a593Smuzhiyun 				  struct rkmodule_vc_hotplug_info *inf);
29*4882a593Smuzhiyun void techpoint_set_quick_stream(struct techpoint *techpoint, u32 stream);
30*4882a593Smuzhiyun 
31*4882a593Smuzhiyun int techpoint_initialize_devices(struct techpoint *techpoint);
32*4882a593Smuzhiyun int techpoint_start_video_stream(struct techpoint *techpoint);
33*4882a593Smuzhiyun int techpoint_stop_video_stream(struct techpoint *techpoint);
34*4882a593Smuzhiyun 
35*4882a593Smuzhiyun #endif // _TECHPOINT_DEV_H
36