Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205106
b: refs/heads/master
c: f1feda7
h: refs/heads/master
v: v3
  • Loading branch information
Francisco Jerez authored and Ben Skeggs committed Jul 26, 2010
1 parent 0200563 commit 074b8a5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 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: e04d8e829d7807e132d8c82c3554b164a803c617
refs/heads/master: f1feda70b5dfdbe6a1069efffec099b430467331
19 changes: 15 additions & 4 deletions trunk/drivers/gpu/drm/nouveau/nouveau_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,23 @@ nouveau_i2c_find(struct drm_device *dev, int index)
bool
nouveau_probe_i2c_addr(struct nouveau_i2c_chan *i2c, int addr)
{
struct i2c_msg msg = {
.addr = addr,
.len = 0,
uint8_t buf[] = { 0 };
struct i2c_msg msgs[] = {
{
.addr = addr,
.flags = 0,
.len = 1,
.buf = buf,
},
{
.addr = addr,
.flags = I2C_M_RD,
.len = 1,
.buf = buf,
}
};

return i2c_transfer(&i2c->adapter, &msg, 1) == 1;
return i2c_transfer(&i2c->adapter, msgs, 2) == 2;
}

int
Expand Down

0 comments on commit 074b8a5

Please sign in to comment.