Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199987
b: refs/heads/master
c: 806b07c
h: refs/heads/master
i:
  199985: 5dd53d7
  199983: 23967b2
v: v3
  • Loading branch information
Jean Delvare authored and Mauro Carvalho Chehab committed Jun 1, 2010
1 parent 2b07233 commit ddf8666
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f137f9d0009067289a2fa6c4da9b82084cdd257e
refs/heads/master: 806b07c29b711aaf90c81d2a19711607769f8246
12 changes: 11 additions & 1 deletion trunk/drivers/media/video/cx23885/cx23885-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,17 @@ int cx23885_i2c_register(struct cx23885_i2c *bus)

memset(&info, 0, sizeof(struct i2c_board_info));
strlcpy(info.type, "ir_video", I2C_NAME_SIZE);
i2c_new_probed_device(&bus->i2c_adap, &info, addr_list);
/*
* We can't call i2c_new_probed_device() because it uses
* quick writes for probing and the IR receiver device only
* replies to reads.
*/
if (i2c_smbus_xfer(&bus->i2c_adap, addr_list[0], 0,
I2C_SMBUS_READ, 0, I2C_SMBUS_QUICK,
NULL) >= 0) {
info.addr = addr_list[0];
i2c_new_device(&bus->i2c_adap, &info);
}
}

return bus->i2c_rc;
Expand Down
16 changes: 15 additions & 1 deletion trunk/drivers/media/video/cx88/cx88-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,24 @@ int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci)
0x18, 0x6b, 0x71,
I2C_CLIENT_END
};
const unsigned short *addrp;

memset(&info, 0, sizeof(struct i2c_board_info));
strlcpy(info.type, "ir_video", I2C_NAME_SIZE);
i2c_new_probed_device(&core->i2c_adap, &info, addr_list);
/*
* We can't call i2c_new_probed_device() because it uses
* quick writes for probing and at least some R receiver
* devices only reply to reads.
*/
for (addrp = addr_list; *addrp != I2C_CLIENT_END; addrp++) {
if (i2c_smbus_xfer(&core->i2c_adap, *addrp, 0,
I2C_SMBUS_READ, 0,
I2C_SMBUS_QUICK, NULL) >= 0) {
info.addr = *addrp;
i2c_new_device(&core->i2c_adap, &info);
break;
}
}
}
return core->i2c_rc;
}
Expand Down

0 comments on commit ddf8666

Please sign in to comment.