]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - drivers/media/platform/davinci/ccdc_hw_device.h
selftests: timers: freq-step: fix compile error
[mirror_ubuntu-artful-kernel.git] / drivers / media / platform / davinci / ccdc_hw_device.h
1 /*
2 * Copyright (C) 2008-2009 Texas Instruments Inc
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * ccdc device API
15 */
16 #ifndef _CCDC_HW_DEVICE_H
17 #define _CCDC_HW_DEVICE_H
18
19 #ifdef __KERNEL__
20 #include <linux/videodev2.h>
21 #include <linux/device.h>
22 #include <media/davinci/vpfe_types.h>
23 #include <media/davinci/ccdc_types.h>
24
25 /*
26 * ccdc hw operations
27 */
28 struct ccdc_hw_ops {
29 /* Pointer to initialize function to initialize ccdc device */
30 int (*open) (struct device *dev);
31 /* Pointer to deinitialize function */
32 int (*close) (struct device *dev);
33 /* set ccdc base address */
34 void (*set_ccdc_base)(void *base, int size);
35 /* Pointer to function to enable or disable ccdc */
36 void (*enable) (int en);
37 /* reset sbl. only for 6446 */
38 void (*reset) (void);
39 /* enable output to sdram */
40 void (*enable_out_to_sdram) (int en);
41 /* Pointer to function to set hw parameters */
42 int (*set_hw_if_params) (struct vpfe_hw_if_param *param);
43 /* get interface parameters */
44 int (*get_hw_if_params) (struct vpfe_hw_if_param *param);
45 /*
46 * Pointer to function to set parameters. Used
47 * for implementing VPFE_S_CCDC_PARAMS
48 */
49 int (*set_params) (void *params);
50 /*
51 * Pointer to function to get parameter. Used
52 * for implementing VPFE_G_CCDC_PARAMS
53 */
54 int (*get_params) (void *params);
55 /* Pointer to function to configure ccdc */
56 int (*configure) (void);
57
58 /* Pointer to function to set buffer type */
59 int (*set_buftype) (enum ccdc_buftype buf_type);
60 /* Pointer to function to get buffer type */
61 enum ccdc_buftype (*get_buftype) (void);
62 /* Pointer to function to set frame format */
63 int (*set_frame_format) (enum ccdc_frmfmt frm_fmt);
64 /* Pointer to function to get frame format */
65 enum ccdc_frmfmt (*get_frame_format) (void);
66 /* enumerate hw pix formats */
67 int (*enum_pix)(u32 *hw_pix, int i);
68 /* Pointer to function to set buffer type */
69 u32 (*get_pixel_format) (void);
70 /* Pointer to function to get pixel format. */
71 int (*set_pixel_format) (u32 pixfmt);
72 /* Pointer to function to set image window */
73 int (*set_image_window) (struct v4l2_rect *win);
74 /* Pointer to function to set image window */
75 void (*get_image_window) (struct v4l2_rect *win);
76 /* Pointer to function to get line length */
77 unsigned int (*get_line_length) (void);
78
79 /* Pointer to function to set frame buffer address */
80 void (*setfbaddr) (unsigned long addr);
81 /* Pointer to function to get field id */
82 int (*getfid) (void);
83 };
84
85 struct ccdc_hw_device {
86 /* ccdc device name */
87 char name[32];
88 /* module owner */
89 struct module *owner;
90 /* hw ops */
91 struct ccdc_hw_ops hw_ops;
92 };
93
94 /* Used by CCDC module to register & unregister with vpfe capture driver */
95 int vpfe_register_ccdc_device(struct ccdc_hw_device *dev);
96 void vpfe_unregister_ccdc_device(struct ccdc_hw_device *dev);
97
98 #endif
99 #endif