aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-i2c.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2009-05-13 15:48:50 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 17:21:11 -0400
commitc668f32dca105d876e51862a003a302fa61e4ae4 (patch)
tree5a71742ecd4e6a1c48f77977e5e2f6d129ffb566 /drivers/media/video/cx88/cx88-i2c.c
parent1df8e9861cf9fac5737ccb61c7f7fefa77711d40 (diff)
V4L/DVB (11844): ir-kbd-i2c: Switch to the new-style device binding model
Let card drivers probe for IR receiver devices and instantiate them if found. Ultimately it would be better if we could stop probing completely, but I suspect this won't be possible for all card types. There's certainly room for cleanups. For example, some drivers are sharing I2C adapter IDs, so they also had to share the list of I2C addresses being probed for an IR receiver. Now that each driver explicitly says which addresses should be probed, maybe some addresses can be dropped from some drivers. Also, the special cases in saa7134-i2c should probably be handled on a per-board basis. This would be more efficient and less risky than always probing extra addresses on all boards. I'll give it a try later. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx88/cx88-i2c.c')
-rw-r--r--drivers/media/video/cx88/cx88-i2c.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/media/video/cx88/cx88-i2c.c b/drivers/media/video/cx88/cx88-i2c.c
index 996b4ed5a4fc..ee1ca39db06a 100644
--- a/drivers/media/video/cx88/cx88-i2c.c
+++ b/drivers/media/video/cx88/cx88-i2c.c
@@ -180,6 +180,19 @@ int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci)
180 do_i2c_scan(core->name,&core->i2c_client); 180 do_i2c_scan(core->name,&core->i2c_client);
181 } else 181 } else
182 printk("%s: i2c register FAILED\n", core->name); 182 printk("%s: i2c register FAILED\n", core->name);
183
184 /* Instantiate the IR receiver device, if present */
185 if (0 == core->i2c_rc) {
186 struct i2c_board_info info;
187 const unsigned short addr_list[] = {
188 0x18, 0x6b, 0x71,
189 I2C_CLIENT_END
190 };
191
192 memset(&info, 0, sizeof(struct i2c_board_info));
193 strlcpy(info.type, "ir_video", I2C_NAME_SIZE);
194 i2c_new_probed_device(&core->i2c_adap, &info, addr_list);
195 }
183 return core->i2c_rc; 196 return core->i2c_rc;
184} 197}
185 198