1
2
3
4
5
6
7 #ifndef _CCDC_HW_DEVICE_H
8 #define _CCDC_HW_DEVICE_H
9
10 #ifdef __KERNEL__
11 #include <linux/videodev2.h>
12 #include <linux/device.h>
13 #include <media/davinci/vpfe_types.h>
14 #include <media/davinci/ccdc_types.h>
15
16
17
18
19 struct ccdc_hw_ops {
20
21 int (*open) (struct device *dev);
22
23 int (*close) (struct device *dev);
24
25 void (*set_ccdc_base)(void *base, int size);
26
27 void (*enable) (int en);
28
29 void (*reset) (void);
30
31 void (*enable_out_to_sdram) (int en);
32
33 int (*set_hw_if_params) (struct vpfe_hw_if_param *param);
34
35 int (*get_hw_if_params) (struct vpfe_hw_if_param *param);
36
37 int (*configure) (void);
38
39
40 int (*set_buftype) (enum ccdc_buftype buf_type);
41
42 enum ccdc_buftype (*get_buftype) (void);
43
44 int (*set_frame_format) (enum ccdc_frmfmt frm_fmt);
45
46 enum ccdc_frmfmt (*get_frame_format) (void);
47
48 int (*enum_pix)(u32 *hw_pix, int i);
49
50 u32 (*get_pixel_format) (void);
51
52 int (*set_pixel_format) (u32 pixfmt);
53
54 int (*set_image_window) (struct v4l2_rect *win);
55
56 void (*get_image_window) (struct v4l2_rect *win);
57
58 unsigned int (*get_line_length) (void);
59
60
61 void (*setfbaddr) (unsigned long addr);
62
63 int (*getfid) (void);
64 };
65
66 struct ccdc_hw_device {
67
68 char name[32];
69
70 struct module *owner;
71
72 struct ccdc_hw_ops hw_ops;
73 };
74
75
76 int vpfe_register_ccdc_device(const struct ccdc_hw_device *dev);
77 void vpfe_unregister_ccdc_device(const struct ccdc_hw_device *dev);
78
79 #endif
80 #endif