31 #include <linux/module.h>
33 #include <linux/slab.h>
34 #include <linux/i2c.h>
55 int g = (o >> 4) & 0xf;
63 if (i < 1 || i > 6 || o < 1 || o > 4 || g < 0 || g > 6 || g % 2 != 0)
66 byte = ((o - 1) << 5);
87 "i2c_smbus_write_byte() failed, ret:%d\n", ret);
95 struct i2c_client *client = v4l2_get_subdevdata(sd);
103 .g_chip_ident = tea6420_g_chip_ident,
107 .s_routing = tea6420_s_routing,
111 .core = &tea6420_core_ops,
112 .audio = &tea6420_audio_ops,
115 static int tea6420_probe(
struct i2c_client *client,
125 v4l_info(client,
"chip found @ 0x%x (%s)\n",
135 for (i = 1; i < 5; i++)
136 err += tea6420_s_routing(sd, 6, i, 0);
138 v4l_dbg(1,
debug, client,
"could not initialize tea6420\n");
144 static int tea6420_remove(
struct i2c_client *client)
146 struct v4l2_subdev *sd = i2c_get_clientdata(client);
164 .probe = tea6420_probe,
165 .remove = tea6420_remove,
166 .id_table = tea6420_id,