1 From ecf53d3104b6b73b1b32a9a5b39af2f258d74f8d Mon Sep 17 00:00:00 2001
2 From: Sergio Aguirre <saaguirre@ti.com>
3 Date: Thu, 15 Jul 2010 15:47:23 -0500
4 Subject: [PATCH 55/75] omap3beagle: camera: Change MT9T111 references to new MT9T112 driver
6 Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
8 arch/arm/mach-omap2/board-omap3beagle-camera.c | 52 ++++++++++++------------
9 arch/arm/mach-omap2/board-omap3beagle.c | 12 +++---
10 2 files changed, 32 insertions(+), 32 deletions(-)
12 diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c
13 index 2e49158..0b4dff7 100644
14 --- a/arch/arm/mach-omap2/board-omap3beagle-camera.c
15 +++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c
16 @@ -203,29 +203,29 @@ struct mt9v113_platform_data mt9v113_pdata = {
18 #endif /* #ifdef CONFIG_VIDEO_MT9V113 */
20 -#if defined(CONFIG_VIDEO_MT9T111) || defined(CONFIG_VIDEO_MT9T111_MODULE)
21 -#include <media/mt9t111.h>
22 +#if defined(CONFIG_VIDEO_MT9T112) || defined(CONFIG_VIDEO_MT9T112_MODULE)
23 +#include <media/mt9t112.h>
25 -#define ISP_MT9T111_MCLK 216000000
26 +#define ISP_MT9T112_MCLK 216000000
28 /* Arbitrary memory handling limit */
29 -#define MT9T111_BIGGEST_FRAME_BYTE_SIZE PAGE_ALIGN((2048 * 2) * 1536 * 4)
30 +#define MT9T112_BIGGEST_FRAME_BYTE_SIZE PAGE_ALIGN((2048 * 2) * 1536 * 4)
32 -static struct isp_interface_config mt9t111_if_config = {
33 +static struct isp_interface_config mt9t112_if_config = {
34 .ccdc_par_ser = ISP_PARLL,
35 .dataline_shift = 0x2,
36 .hsvs_syncdetect = ISPCTRL_SYNC_DETECT_VSRISE,
40 - .cam_mclk = ISP_MT9T111_MCLK,
41 + .cam_mclk = ISP_MT9T112_MCLK,
42 .wenlog = ISPCCDC_CFG_WENLOG_AND,
44 .u.par.par_bridge = 0x3,
45 .u.par.par_clk_pol = 0x0,
48 -static struct v4l2_ifparm mt9t111_ifparm_s = {
49 +static struct v4l2_ifparm mt9t112_ifparm_s = {
50 .if_type = V4L2_IF_TYPE_RAW,
53 @@ -235,47 +235,47 @@ static struct v4l2_ifparm mt9t111_ifparm_s = {
55 .nobt_hs_inv = 0, /* active high */
56 .nobt_vs_inv = 0, /* active high */
57 - .clock_min = MT9T111_CLK_MIN,
58 - .clock_max = MT9T111_CLK_MAX,
59 + .clock_min = MT9T112_CLK_MIN,
60 + .clock_max = MT9T112_CLK_MAX,
66 - * @brief mt9t111_ifparm - Returns the mt9t111 interface parameters
67 + * @brief mt9t112_ifparm - Returns the mt9t112 interface parameters
69 * @param p - pointer to v4l2_ifparm structure
71 * @return result of operation - 0 is success
73 -static int mt9t111_ifparm(struct v4l2_ifparm *p)
74 +static int mt9t112_ifparm(struct v4l2_ifparm *p)
79 - *p = mt9t111_ifparm_s;
80 + *p = mt9t112_ifparm_s;
84 #if defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE)
85 -static struct omap34xxcam_hw_config mt9t111_hwc = {
86 +static struct omap34xxcam_hw_config mt9t112_hwc = {
89 .dev_type = OMAP34XXCAM_SLAVE_SENSOR,
90 .u.sensor.sensor_isp = 0,
91 - .u.sensor.capture_mem = MT9T111_BIGGEST_FRAME_BYTE_SIZE,
92 + .u.sensor.capture_mem = MT9T112_BIGGEST_FRAME_BYTE_SIZE,
93 .u.sensor.ival_default = { 1, 10 },
98 - * @brief mt9t111_set_prv_data - Returns mt9t111 omap34xx driver private data
99 + * @brief mt9t112_set_prv_data - Returns mt9t112 omap34xx driver private data
101 * @param priv - pointer to omap34xxcam_hw_config structure
103 * @return result of operation - 0 is success
105 -static int mt9t111_set_prv_data(void *priv)
106 +static int mt9t112_set_prv_data(void *priv)
108 #if defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE)
109 struct omap34xxcam_hw_config *hwc = priv;
110 @@ -283,7 +283,7 @@ static int mt9t111_set_prv_data(void *priv)
114 - *hwc = mt9t111_hwc;
115 + *hwc = mt9t112_hwc;
119 @@ -291,13 +291,13 @@ static int mt9t111_set_prv_data(void *priv)
123 - * @brief mt9t111_power_set - Power-on or power-off TVP5146 device
124 + * @brief mt9t112_power_set - Power-on or power-off TVP5146 device
126 * @param power - enum, Power on/off, resume/standby
128 * @return result of operation - 0 is success
130 -static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power)
131 +static int mt9t112_power_set(struct v4l2_int_device *s, enum v4l2_power power)
133 struct omap34xxcam_videodev *vdev = s->u.slave->master->priv;
135 @@ -314,7 +314,7 @@ static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power)
138 #if defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE)
139 - isp_configure_interface(vdev->cam->isp, &mt9t111_if_config);
140 + isp_configure_interface(vdev->cam->isp, &mt9t112_if_config);
143 /* Set RESET_BAR to 0 */
144 @@ -331,7 +331,7 @@ static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power)
148 - isp_set_xclk(vdev->cam->isp, MT9T111_CLK_MIN, CAM_USE_XCLKA);
149 + isp_set_xclk(vdev->cam->isp, MT9T112_CLK_MIN, CAM_USE_XCLKA);
152 * Wait at least 70 CLK cycles (w/EXTCLK = 6MHz, or CLK_MIN):
153 @@ -359,14 +359,14 @@ static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power)
157 -struct mt9t111_platform_data mt9t111_pdata = {
158 +struct mt9t112_platform_data mt9t112_pdata = {
159 .master = "omap34xxcam",
160 - .power_set = mt9t111_power_set,
161 - .priv_data_set = mt9t111_set_prv_data,
162 - .ifparm = mt9t111_ifparm,
163 + .power_set = mt9t112_power_set,
164 + .priv_data_set = mt9t112_set_prv_data,
165 + .ifparm = mt9t112_ifparm,
168 -#endif /* #ifdef CONFIG_VIDEO_MT9T111 */
169 +#endif /* #ifdef CONFIG_VIDEO_MT9T112 */
171 static int beagle_cam_probe(struct platform_device *pdev)
173 diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
174 index 239bd44..f93616b 100644
175 --- a/arch/arm/mach-omap2/board-omap3beagle.c
176 +++ b/arch/arm/mach-omap2/board-omap3beagle.c
177 @@ -77,10 +77,10 @@ static struct omap_opp * _omap37x_l3_rate_table = NULL;
178 extern struct mt9v113_platform_data mt9v113_pdata;
181 -#if defined(CONFIG_VIDEO_MT9T111) || defined(CONFIG_VIDEO_MT9T111_MODULE)
182 +#if defined(CONFIG_VIDEO_MT9T112) || defined(CONFIG_VIDEO_MT9T112_MODULE)
183 #include <media/v4l2-int-device.h>
184 -#include <media/mt9t111.h>
185 -extern struct mt9t111_platform_data mt9t111_pdata;
186 +#include <media/mt9t112.h>
187 +extern struct mt9t112_platform_data mt9t112_pdata;
190 #define GPMC_CS0_BASE 0x60
191 @@ -602,10 +602,10 @@ static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {
192 .platform_data = &mt9v113_pdata,
195 -#if defined(CONFIG_VIDEO_MT9T111) || defined(CONFIG_VIDEO_MT9T111_MODULE)
196 +#if defined(CONFIG_VIDEO_MT9T112) || defined(CONFIG_VIDEO_MT9T112_MODULE)
198 - I2C_BOARD_INFO("mt9t111", MT9T111_I2C_ADDR),
199 - .platform_data = &mt9t111_pdata,
200 + I2C_BOARD_INFO("mt9t112", MT9T112_I2C_ADDR),
201 + .platform_data = &mt9t112_pdata,