aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLad, Prabhakar <prabhakar.lad@ti.com>2013-02-18 05:56:41 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-21 13:04:47 -0400
commit88da0183eb2b72048099b4e0ecae1705f5309c94 (patch)
tree6b442cd29abcd416df54a69985b6924d12cafd21
parent18ace0e27395423b40352ff24c7792f4c0313e24 (diff)
[media] media: ths7353: add support for ths7353 video amplifier
The patch adds support for THS7353 video amplifier. The the THS7353 amplifier is very much similar to the existing THS7303 video amplifier driver. This patch appropriately makes changes to the existing ths7303 driver and adds support for the THS7353. This patch also adds V4L2_IDENT_THS7353 for the THS7353 chip and appropriate changes to Kconfig file for building. Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Martin Bugge <marbugge@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/i2c/Kconfig6
-rw-r--r--drivers/media/i2c/ths7303.c351
-rw-r--r--include/media/ths7303.h42
-rw-r--r--include/media/v4l2-chip-ident.h3
4 files changed, 340 insertions, 62 deletions
diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
index 7b771baa2212..ec07ceb41c9c 100644
--- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig
@@ -550,10 +550,10 @@ config VIDEO_UPD64083
550comment "Miscelaneous helper chips" 550comment "Miscelaneous helper chips"
551 551
552config VIDEO_THS7303 552config VIDEO_THS7303
553 tristate "THS7303 Video Amplifier" 553 tristate "THS7303/53 Video Amplifier"
554 depends on I2C 554 depends on VIDEO_V4L2 && I2C
555 help 555 help
556 Support for TI THS7303 video amplifier 556 Support for TI THS7303/53 video amplifier
557 557
558 To compile this driver as a module, choose M here: the 558 To compile this driver as a module, choose M here: the
559 module will be called ths7303. 559 module will be called ths7303.
diff --git a/drivers/media/i2c/ths7303.c b/drivers/media/i2c/ths7303.c
index e747524ba6ed..3ca60c7cd95f 100644
--- a/drivers/media/i2c/ths7303.c
+++ b/drivers/media/i2c/ths7303.c
@@ -1,7 +1,15 @@
1/* 1/*
2 * ths7303- THS7303 Video Amplifier driver 2 * ths7303/53- THS7303/53 Video Amplifier driver
3 * 3 *
4 * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/ 4 * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
5 * Copyright 2013 Cisco Systems, Inc. and/or its affiliates.
6 *
7 * Author: Chaithrika U S <chaithrika@ti.com>
8 *
9 * Contributors:
10 * Hans Verkuil <hans.verkuil@cisco.com>
11 * Lad, Prabhakar <prabhakar.lad@ti.com>
12 * Martin Bugge <marbugge@cisco.com>
5 * 13 *
6 * This program is free software; you can redistribute it and/or 14 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as 15 * modify it under the terms of the GNU General Public License as
@@ -13,25 +21,27 @@
13 * GNU General Public License for more details. 21 * GNU General Public License for more details.
14 */ 22 */
15 23
16#include <linux/kernel.h>
17#include <linux/init.h>
18#include <linux/ctype.h>
19#include <linux/slab.h>
20#include <linux/i2c.h> 24#include <linux/i2c.h>
21#include <linux/device.h>
22#include <linux/delay.h>
23#include <linux/module.h> 25#include <linux/module.h>
24#include <linux/uaccess.h> 26#include <linux/slab.h>
25#include <linux/videodev2.h>
26 27
27#include <media/v4l2-device.h> 28#include <media/ths7303.h>
28#include <media/v4l2-subdev.h>
29#include <media/v4l2-chip-ident.h> 29#include <media/v4l2-chip-ident.h>
30#include <media/v4l2-device.h>
30 31
31#define THS7303_CHANNEL_1 1 32#define THS7303_CHANNEL_1 1
32#define THS7303_CHANNEL_2 2 33#define THS7303_CHANNEL_2 2
33#define THS7303_CHANNEL_3 3 34#define THS7303_CHANNEL_3 3
34 35
36struct ths7303_state {
37 struct v4l2_subdev sd;
38 struct ths7303_platform_data pdata;
39 struct v4l2_bt_timings bt;
40 int std_id;
41 int stream_on;
42 int driver_data;
43};
44
35enum ths7303_filter_mode { 45enum ths7303_filter_mode {
36 THS7303_FILTER_MODE_480I_576I, 46 THS7303_FILTER_MODE_480I_576I,
37 THS7303_FILTER_MODE_480P_576P, 47 THS7303_FILTER_MODE_480P_576P,
@@ -48,64 +58,84 @@ static int debug;
48module_param(debug, int, 0644); 58module_param(debug, int, 0644);
49MODULE_PARM_DESC(debug, "Debug level 0-1"); 59MODULE_PARM_DESC(debug, "Debug level 0-1");
50 60
61static inline struct ths7303_state *to_state(struct v4l2_subdev *sd)
62{
63 return container_of(sd, struct ths7303_state, sd);
64}
65
66static int ths7303_read(struct v4l2_subdev *sd, u8 reg)
67{
68 struct i2c_client *client = v4l2_get_subdevdata(sd);
69
70 return i2c_smbus_read_byte_data(client, reg);
71}
72
73static int ths7303_write(struct v4l2_subdev *sd, u8 reg, u8 val)
74{
75 struct i2c_client *client = v4l2_get_subdevdata(sd);
76 int ret;
77 int i;
78
79 for (i = 0; i < 3; i++) {
80 ret = i2c_smbus_write_byte_data(client, reg, val);
81 if (ret == 0)
82 return 0;
83 }
84 return ret;
85}
86
51/* following function is used to set ths7303 */ 87/* following function is used to set ths7303 */
52int ths7303_setval(struct v4l2_subdev *sd, enum ths7303_filter_mode mode) 88int ths7303_setval(struct v4l2_subdev *sd, enum ths7303_filter_mode mode)
53{ 89{
54 u8 input_bias_chroma = 3;
55 u8 input_bias_luma = 3;
56 int disable = 0;
57 int err = 0;
58 u8 val = 0;
59 u8 temp;
60
61 struct i2c_client *client = v4l2_get_subdevdata(sd); 90 struct i2c_client *client = v4l2_get_subdevdata(sd);
91 struct ths7303_state *state = to_state(sd);
92 struct ths7303_platform_data *pdata = &state->pdata;
93 u8 val, sel = 0;
94 int err, disable = 0;
62 95
63 if (!client) 96 if (!client)
64 return -EINVAL; 97 return -EINVAL;
65 98
66 switch (mode) { 99 switch (mode) {
67 case THS7303_FILTER_MODE_1080P: 100 case THS7303_FILTER_MODE_1080P:
68 val = (3 << 6); 101 sel = 0x3; /*1080p and SXGA/UXGA */
69 val |= (3 << 3);
70 break; 102 break;
71 case THS7303_FILTER_MODE_720P_1080I: 103 case THS7303_FILTER_MODE_720P_1080I:
72 val = (2 << 6); 104 sel = 0x2; /*720p, 1080i and SVGA/XGA */
73 val |= (2 << 3);
74 break; 105 break;
75 case THS7303_FILTER_MODE_480P_576P: 106 case THS7303_FILTER_MODE_480P_576P:
76 val = (1 << 6); 107 sel = 0x1; /* EDTV 480p/576p and VGA */
77 val |= (1 << 3);
78 break; 108 break;
79 case THS7303_FILTER_MODE_480I_576I: 109 case THS7303_FILTER_MODE_480I_576I:
110 sel = 0x0; /* SDTV, S-Video, 480i/576i */
80 break; 111 break;
81 case THS7303_FILTER_MODE_DISABLE:
82 pr_info("mode disabled\n");
83 /* disable all channels */
84 disable = 1;
85 default: 112 default:
86 /* disable all channels */ 113 /* disable all channels */
87 disable = 1; 114 disable = 1;
88 } 115 }
89 /* Setup channel 2 - Luma - Green */ 116
90 temp = val; 117 val = (sel << 6) | (sel << 3);
91 if (!disable) 118 if (!disable)
92 val |= input_bias_luma; 119 val |= (pdata->ch_1 & 0x27);
93 err = i2c_smbus_write_byte_data(client, THS7303_CHANNEL_2, val); 120 err = ths7303_write(sd, THS7303_CHANNEL_1, val);
94 if (err) 121 if (err)
95 goto out; 122 goto out;
96 123
97 /* setup two chroma channels */ 124 val = (sel << 6) | (sel << 3);
98 if (!disable) 125 if (!disable)
99 temp |= input_bias_chroma; 126 val |= (pdata->ch_2 & 0x27);
100 127 err = ths7303_write(sd, THS7303_CHANNEL_2, val);
101 err = i2c_smbus_write_byte_data(client, THS7303_CHANNEL_1, temp);
102 if (err) 128 if (err)
103 goto out; 129 goto out;
104 130
105 err = i2c_smbus_write_byte_data(client, THS7303_CHANNEL_3, temp); 131 val = (sel << 6) | (sel << 3);
132 if (!disable)
133 val |= (pdata->ch_3 & 0x27);
134 err = ths7303_write(sd, THS7303_CHANNEL_3, val);
106 if (err) 135 if (err)
107 goto out; 136 goto out;
108 return err; 137
138 return 0;
109out: 139out:
110 pr_info("write byte data failed\n"); 140 pr_info("write byte data failed\n");
111 return err; 141 return err;
@@ -113,49 +143,209 @@ out:
113 143
114static int ths7303_s_std_output(struct v4l2_subdev *sd, v4l2_std_id norm) 144static int ths7303_s_std_output(struct v4l2_subdev *sd, v4l2_std_id norm)
115{ 145{
116 if (norm & (V4L2_STD_ALL & ~V4L2_STD_SECAM)) 146 struct ths7303_state *state = to_state(sd);
147
148 if (norm & (V4L2_STD_ALL & ~V4L2_STD_SECAM)) {
149 state->std_id = 1;
150 state->bt.pixelclock = 0;
117 return ths7303_setval(sd, THS7303_FILTER_MODE_480I_576I); 151 return ths7303_setval(sd, THS7303_FILTER_MODE_480I_576I);
118 else 152 }
119 return ths7303_setval(sd, THS7303_FILTER_MODE_DISABLE); 153
154 return ths7303_setval(sd, THS7303_FILTER_MODE_DISABLE);
120} 155}
121 156
122/* for setting filter for HD output */ 157static int ths7303_config(struct v4l2_subdev *sd)
123static int ths7303_s_dv_timings(struct v4l2_subdev *sd,
124 struct v4l2_dv_timings *dv_timings)
125{ 158{
126 u32 height = dv_timings->bt.height; 159 struct ths7303_state *state = to_state(sd);
127 int interlaced = dv_timings->bt.interlaced; 160 int res;
128 int res = 0; 161
162 if (!state->stream_on) {
163 ths7303_write(sd, THS7303_CHANNEL_1,
164 (ths7303_read(sd, THS7303_CHANNEL_1) & 0xf8) |
165 0x00);
166 ths7303_write(sd, THS7303_CHANNEL_2,
167 (ths7303_read(sd, THS7303_CHANNEL_2) & 0xf8) |
168 0x00);
169 ths7303_write(sd, THS7303_CHANNEL_3,
170 (ths7303_read(sd, THS7303_CHANNEL_3) & 0xf8) |
171 0x00);
172 return 0;
173 }
129 174
130 if (height == 1080 && !interlaced) 175 if (state->bt.pixelclock > 120000000)
131 res = ths7303_setval(sd, THS7303_FILTER_MODE_1080P); 176 res = ths7303_setval(sd, THS7303_FILTER_MODE_1080P);
132 else if ((height == 720 && !interlaced) || 177 else if (state->bt.pixelclock > 70000000)
133 (height == 1080 && interlaced))
134 res = ths7303_setval(sd, THS7303_FILTER_MODE_720P_1080I); 178 res = ths7303_setval(sd, THS7303_FILTER_MODE_720P_1080I);
135 else if ((height == 480 || height == 576) && !interlaced) 179 else if (state->bt.pixelclock > 20000000)
136 res = ths7303_setval(sd, THS7303_FILTER_MODE_480P_576P); 180 res = ths7303_setval(sd, THS7303_FILTER_MODE_480P_576P);
181 else if (state->std_id)
182 res = ths7303_setval(sd, THS7303_FILTER_MODE_480I_576I);
137 else 183 else
138 /* disable all channels */ 184 /* disable all channels */
139 res = ths7303_setval(sd, THS7303_FILTER_MODE_DISABLE); 185 res = ths7303_setval(sd, THS7303_FILTER_MODE_DISABLE);
140 186
141 return res; 187 return res;
188
189}
190
191static int ths7303_s_stream(struct v4l2_subdev *sd, int enable)
192{
193 struct ths7303_state *state = to_state(sd);
194
195 state->stream_on = enable;
196
197 return ths7303_config(sd);
198}
199
200/* for setting filter for HD output */
201static int ths7303_s_dv_timings(struct v4l2_subdev *sd,
202 struct v4l2_dv_timings *dv_timings)
203{
204 struct ths7303_state *state = to_state(sd);
205
206 if (!dv_timings || dv_timings->type != V4L2_DV_BT_656_1120)
207 return -EINVAL;
208
209 state->bt = dv_timings->bt;
210 state->std_id = 0;
211
212 return ths7303_config(sd);
142} 213}
143 214
144static int ths7303_g_chip_ident(struct v4l2_subdev *sd, 215static int ths7303_g_chip_ident(struct v4l2_subdev *sd,
145 struct v4l2_dbg_chip_ident *chip) 216 struct v4l2_dbg_chip_ident *chip)
146{ 217{
147 struct i2c_client *client = v4l2_get_subdevdata(sd); 218 struct i2c_client *client = v4l2_get_subdevdata(sd);
219 struct ths7303_state *state = to_state(sd);
148 220
149 return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_THS7303, 0); 221 return v4l2_chip_ident_i2c_client(client, chip, state->driver_data, 0);
150} 222}
151 223
152static const struct v4l2_subdev_video_ops ths7303_video_ops = { 224static const struct v4l2_subdev_video_ops ths7303_video_ops = {
225 .s_stream = ths7303_s_stream,
153 .s_std_output = ths7303_s_std_output, 226 .s_std_output = ths7303_s_std_output,
154 .s_dv_timings = ths7303_s_dv_timings, 227 .s_dv_timings = ths7303_s_dv_timings,
155}; 228};
156 229
230#ifdef CONFIG_VIDEO_ADV_DEBUG
231
232static int ths7303_g_register(struct v4l2_subdev *sd,
233 struct v4l2_dbg_register *reg)
234{
235 struct i2c_client *client = v4l2_get_subdevdata(sd);
236
237 if (!v4l2_chip_match_i2c_client(client, &reg->match))
238 return -EINVAL;
239 if (!capable(CAP_SYS_ADMIN))
240 return -EPERM;
241
242 reg->size = 1;
243 reg->val = ths7303_read(sd, reg->reg);
244 return 0;
245}
246
247static int ths7303_s_register(struct v4l2_subdev *sd,
248 struct v4l2_dbg_register *reg)
249{
250 struct i2c_client *client = v4l2_get_subdevdata(sd);
251
252 if (!v4l2_chip_match_i2c_client(client, &reg->match))
253 return -EINVAL;
254 if (!capable(CAP_SYS_ADMIN))
255 return -EPERM;
256
257 ths7303_write(sd, reg->reg, reg->val);
258 return 0;
259}
260#endif
261
262static const char * const stc_lpf_sel_txt[4] = {
263 "500-kHz Filter",
264 "2.5-MHz Filter",
265 "5-MHz Filter",
266 "5-MHz Filter",
267};
268
269static const char * const in_mux_sel_txt[2] = {
270 "Input A Select",
271 "Input B Select",
272};
273
274static const char * const lpf_freq_sel_txt[4] = {
275 "9-MHz LPF",
276 "16-MHz LPF",
277 "35-MHz LPF",
278 "Bypass LPF",
279};
280
281static const char * const in_bias_sel_dis_cont_txt[8] = {
282 "Disable Channel",
283 "Mute Function - No Output",
284 "DC Bias Select",
285 "DC Bias + 250 mV Offset Select",
286 "AC Bias Select",
287 "Sync Tip Clamp with low bias",
288 "Sync Tip Clamp with mid bias",
289 "Sync Tip Clamp with high bias",
290};
291
292static void ths7303_log_channel_status(struct v4l2_subdev *sd, u8 reg)
293{
294 u8 val = ths7303_read(sd, reg);
295
296 if ((val & 0x7) == 0) {
297 v4l2_info(sd, "Channel %d Off\n", reg);
298 return;
299 }
300
301 v4l2_info(sd, "Channel %d On\n", reg);
302 v4l2_info(sd, " value 0x%x\n", val);
303 v4l2_info(sd, " %s\n", stc_lpf_sel_txt[(val >> 6) & 0x3]);
304 v4l2_info(sd, " %s\n", in_mux_sel_txt[(val >> 5) & 0x1]);
305 v4l2_info(sd, " %s\n", lpf_freq_sel_txt[(val >> 3) & 0x3]);
306 v4l2_info(sd, " %s\n", in_bias_sel_dis_cont_txt[(val >> 0) & 0x7]);
307}
308
309static int ths7303_log_status(struct v4l2_subdev *sd)
310{
311 struct ths7303_state *state = to_state(sd);
312
313 v4l2_info(sd, "stream %s\n", state->stream_on ? "On" : "Off");
314
315 if (state->bt.pixelclock) {
316 struct v4l2_bt_timings *bt = bt = &state->bt;
317 u32 frame_width, frame_height;
318
319 frame_width = bt->width + bt->hfrontporch +
320 bt->hsync + bt->hbackporch;
321 frame_height = bt->height + bt->vfrontporch +
322 bt->vsync + bt->vbackporch;
323 v4l2_info(sd,
324 "timings: %dx%d%s%d (%dx%d). Pix freq. = %d Hz. Polarities = 0x%x\n",
325 bt->width, bt->height, bt->interlaced ? "i" : "p",
326 (frame_height * frame_width) > 0 ?
327 (int)bt->pixelclock /
328 (frame_height * frame_width) : 0,
329 frame_width, frame_height,
330 (int)bt->pixelclock, bt->polarities);
331 } else {
332 v4l2_info(sd, "no timings set\n");
333 }
334
335 ths7303_log_channel_status(sd, THS7303_CHANNEL_1);
336 ths7303_log_channel_status(sd, THS7303_CHANNEL_2);
337 ths7303_log_channel_status(sd, THS7303_CHANNEL_3);
338
339 return 0;
340}
341
157static const struct v4l2_subdev_core_ops ths7303_core_ops = { 342static const struct v4l2_subdev_core_ops ths7303_core_ops = {
158 .g_chip_ident = ths7303_g_chip_ident, 343 .g_chip_ident = ths7303_g_chip_ident,
344 .log_status = ths7303_log_status,
345#ifdef CONFIG_VIDEO_ADV_DEBUG
346 .g_register = ths7303_g_register,
347 .s_register = ths7303_s_register,
348#endif
159}; 349};
160 350
161static const struct v4l2_subdev_ops ths7303_ops = { 351static const struct v4l2_subdev_ops ths7303_ops = {
@@ -163,11 +353,38 @@ static const struct v4l2_subdev_ops ths7303_ops = {
163 .video = &ths7303_video_ops, 353 .video = &ths7303_video_ops,
164}; 354};
165 355
356static int ths7303_setup(struct v4l2_subdev *sd)
357{
358 struct ths7303_state *state = to_state(sd);
359 struct ths7303_platform_data *pdata = &state->pdata;
360 int ret;
361 u8 mask;
362
363 state->stream_on = pdata->init_enable;
364
365 mask = state->stream_on ? 0xff : 0xf8;
366
367 ret = ths7303_write(sd, THS7303_CHANNEL_1, pdata->ch_1 & mask);
368 if (ret)
369 return ret;
370
371 ret = ths7303_write(sd, THS7303_CHANNEL_2, pdata->ch_2 & mask);
372 if (ret)
373 return ret;
374
375 ret = ths7303_write(sd, THS7303_CHANNEL_3, pdata->ch_3 & mask);
376 if (ret)
377 return ret;
378
379 return 0;
380}
381
166static int ths7303_probe(struct i2c_client *client, 382static int ths7303_probe(struct i2c_client *client,
167 const struct i2c_device_id *id) 383 const struct i2c_device_id *id)
168{ 384{
385 struct ths7303_platform_data *pdata = client->dev.platform_data;
386 struct ths7303_state *state;
169 struct v4l2_subdev *sd; 387 struct v4l2_subdev *sd;
170 v4l2_std_id std_id = V4L2_STD_NTSC;
171 388
172 if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) 389 if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
173 return -ENODEV; 390 return -ENODEV;
@@ -175,13 +392,28 @@ static int ths7303_probe(struct i2c_client *client,
175 v4l_info(client, "chip found @ 0x%x (%s)\n", 392 v4l_info(client, "chip found @ 0x%x (%s)\n",
176 client->addr << 1, client->adapter->name); 393 client->addr << 1, client->adapter->name);
177 394
178 sd = devm_kzalloc(&client->dev, sizeof(struct v4l2_subdev), GFP_KERNEL); 395 state = devm_kzalloc(&client->dev, sizeof(struct ths7303_state),
179 if (sd == NULL) 396 GFP_KERNEL);
397 if (!state)
180 return -ENOMEM; 398 return -ENOMEM;
181 399
400 if (!pdata)
401 v4l_warn(client, "No platform data, using default data!\n");
402 else
403 state->pdata = *pdata;
404
405 sd = &state->sd;
182 v4l2_i2c_subdev_init(sd, client, &ths7303_ops); 406 v4l2_i2c_subdev_init(sd, client, &ths7303_ops);
183 407
184 return ths7303_s_std_output(sd, std_id); 408 /* store the driver data to differntiate the chip */
409 state->driver_data = (int)id->driver_data;
410
411 if (ths7303_setup(sd) < 0) {
412 v4l_err(client, "init failed\n");
413 return -EIO;
414 }
415
416 return 0;
185} 417}
186 418
187static int ths7303_remove(struct i2c_client *client) 419static int ths7303_remove(struct i2c_client *client)
@@ -194,7 +426,8 @@ static int ths7303_remove(struct i2c_client *client)
194} 426}
195 427
196static const struct i2c_device_id ths7303_id[] = { 428static const struct i2c_device_id ths7303_id[] = {
197 {"ths7303", 0}, 429 {"ths7303", V4L2_IDENT_THS7303},
430 {"ths7353", V4L2_IDENT_THS7353},
198 {}, 431 {},
199}; 432};
200 433
@@ -203,7 +436,7 @@ MODULE_DEVICE_TABLE(i2c, ths7303_id);
203static struct i2c_driver ths7303_driver = { 436static struct i2c_driver ths7303_driver = {
204 .driver = { 437 .driver = {
205 .owner = THIS_MODULE, 438 .owner = THIS_MODULE,
206 .name = "ths7303", 439 .name = "ths73x3",
207 }, 440 },
208 .probe = ths7303_probe, 441 .probe = ths7303_probe,
209 .remove = ths7303_remove, 442 .remove = ths7303_remove,
diff --git a/include/media/ths7303.h b/include/media/ths7303.h
new file mode 100644
index 000000000000..980ec51d574d
--- /dev/null
+++ b/include/media/ths7303.h
@@ -0,0 +1,42 @@
1/*
2 * Copyright (C) 2013 Texas Instruments Inc
3 *
4 * Copyright 2013 Cisco Systems, Inc. and/or its affiliates.
5 *
6 * Contributors:
7 * Hans Verkuil <hans.verkuil@cisco.com>
8 * Lad, Prabhakar <prabhakar.lad@ti.com>
9 * Martin Bugge <marbugge@cisco.com>
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation version 2.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24
25#ifndef THS7353_H
26#define THS7353_H
27
28/**
29 * struct ths7303_platform_data - Platform dependent data
30 * @ch_1: Bias value for channel one.
31 * @ch_2: Bias value for channel two.
32 * @ch_3: Bias value for channel three.
33 * @init_enable: initalize on init.
34 */
35struct ths7303_platform_data {
36 u8 ch_1;
37 u8 ch_2;
38 u8 ch_3;
39 u8 init_enable;
40};
41
42#endif
diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h
index b5996f959a31..c259b36bf1e9 100644
--- a/include/media/v4l2-chip-ident.h
+++ b/include/media/v4l2-chip-ident.h
@@ -188,6 +188,9 @@ enum {
188 /* module adv7343: just ident 7343 */ 188 /* module adv7343: just ident 7343 */
189 V4L2_IDENT_ADV7343 = 7343, 189 V4L2_IDENT_ADV7343 = 7343,
190 190
191 /* module ths7353: just ident 7353 */
192 V4L2_IDENT_THS7353 = 7353,
193
191 /* module adv7393: just ident 7393 */ 194 /* module adv7393: just ident 7393 */
192 V4L2_IDENT_ADV7393 = 7393, 195 V4L2_IDENT_ADV7393 = 7393,
193 196