23 #include <linux/module.h>
24 #include <linux/types.h>
25 #include <linux/slab.h>
27 #include <asm/uaccess.h>
28 #include <linux/i2c.h>
29 #include <linux/videodev2.h>
84 v4l2_err(sd,
"Invalid input %d.\n", input);
87 cs53l32a_write(sd, 0x01, 0x01 + (input << 4));
97 cs53l32a_write(sd, 0x03, ctrl->
val ? 0xf0 : 0x30);
100 cs53l32a_write(sd, 0x04, (
u8)ctrl->
val);
101 cs53l32a_write(sd, 0x05, (
u8)ctrl->
val);
115 static int cs53l32a_log_status(
struct v4l2_subdev *sd)
118 u8 v = cs53l32a_read(sd, 0x01);
120 v4l2_info(sd,
"Input: %d\n", (v >> 4) & 3);
128 .s_ctrl = cs53l32a_s_ctrl,
132 .log_status = cs53l32a_log_status,
133 .g_chip_ident = cs53l32a_g_chip_ident,
144 .s_routing = cs53l32a_s_routing,
148 .core = &cs53l32a_core_ops,
149 .audio = &cs53l32a_audio_ops,
175 v4l_info(client,
"chip found @ 0x%x (%s)\n",
184 for (i = 1; i <= 7; i++) {
185 u8 v = cs53l32a_read(sd, i);
196 if (state->
hdl.error) {
197 int err = state->
hdl.error;
206 cs53l32a_write(sd, 0x01, 0x21);
207 cs53l32a_write(sd, 0x02, 0x29);
208 cs53l32a_write(sd, 0x03, 0x30);
209 cs53l32a_write(sd, 0x04, 0x00);
210 cs53l32a_write(sd, 0x05, 0x00);
211 cs53l32a_write(sd, 0x06, 0x00);
212 cs53l32a_write(sd, 0x07, 0x00);
216 for (i = 1; i <= 7; i++) {
217 u8 v = cs53l32a_read(sd, i);
224 static int cs53l32a_remove(
struct i2c_client *client)
226 struct v4l2_subdev *sd = i2c_get_clientdata(client);
246 .probe = cs53l32a_probe,
247 .remove = cs53l32a_remove,
248 .id_table = cs53l32a_id,