16 #include <linux/kernel.h>
18 #include <linux/ctype.h>
19 #include <linux/slab.h>
20 #include <linux/i2c.h>
21 #include <linux/device.h>
23 #include <linux/module.h>
25 #include <linux/videodev2.h>
31 #define THS7303_CHANNEL_1 1
32 #define THS7303_CHANNEL_2 2
33 #define THS7303_CHANNEL_3 3
54 u8 input_bias_chroma = 3;
55 u8 input_bias_luma = 3;
92 val |= input_bias_luma;
99 temp |= input_bias_chroma;
110 pr_info(
"write byte data failed\n");
123 static int ths7303_s_dv_timings(
struct v4l2_subdev *sd,
130 if (height == 1080 && !interlaced)
132 else if ((height == 720 && !interlaced) ||
133 (height == 1080 && interlaced))
135 else if ((height == 480 || height == 576) && !interlaced)
144 static int ths7303_g_chip_ident(
struct v4l2_subdev *sd,
153 .s_std_output = ths7303_s_std_output,
154 .s_dv_timings = ths7303_s_dv_timings,
158 .g_chip_ident = ths7303_g_chip_ident,
162 .core = &ths7303_core_ops,
163 .video = &ths7303_video_ops,
175 v4l_info(client,
"chip found @ 0x%x (%s)\n",
184 return ths7303_s_std_output(sd, std_id);
187 static int ths7303_remove(
struct i2c_client *client)
189 struct v4l2_subdev *sd = i2c_get_clientdata(client);
209 .probe = ths7303_probe,
210 .remove = ths7303_remove,
211 .id_table = ths7303_id,