Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346911
b: refs/heads/master
c: 24e491c
h: refs/heads/master
i:
  346909: 282a27a
  346907: b8dcf87
  346903: 33ed6cc
  346895: 9a2b551
  346879: ecedc39
v: v3
  • Loading branch information
Shubhrajyoti D authored and Dmitry Torokhov committed Oct 11, 2012
1 parent 35fe82e commit 830aa00
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 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: 9493d974b0f1f34903adfb529a510d4d768493dc
refs/heads/master: 24e491c21b4e214a980a5daf2a5bc80e8c410ce6
19 changes: 16 additions & 3 deletions trunk/drivers/input/joystick/as5011.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ static int as5011_i2c_write(struct i2c_client *client,
{
uint8_t data[2] = { aregaddr, avalue };
struct i2c_msg msg = {
client->addr, I2C_M_IGNORE_NAK, 2, (uint8_t *)data
.addr = client->addr,
.flags = I2C_M_IGNORE_NAK,
.len = 2,
.buf = (uint8_t *)data
};
int error;

Expand All @@ -98,8 +101,18 @@ static int as5011_i2c_read(struct i2c_client *client,
{
uint8_t data[2] = { aregaddr };
struct i2c_msg msg_set[2] = {
{ client->addr, I2C_M_REV_DIR_ADDR, 1, (uint8_t *)data },
{ client->addr, I2C_M_RD | I2C_M_NOSTART, 1, (uint8_t *)data }
{
.addr = client->addr,
.flags = I2C_M_REV_DIR_ADDR,
.len = 1,
.buf = (uint8_t *)data
},
{
.addr = client->addr,
.flags = I2C_M_RD | I2C_M_NOSTART,
.len = 1,
.buf = (uint8_t *)data
}
};
int error;

Expand Down

0 comments on commit 830aa00

Please sign in to comment.