Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330119
b: refs/heads/master
c: 2bfc37d
h: refs/heads/master
i:
  330117: 91010db
  330115: 7ebcad6
  330111: 9f7a0a2
v: v3
  • Loading branch information
Shubhrajyoti D authored and Linus Torvalds committed Oct 5, 2012
1 parent c9930ce commit 9ac4cdc
Show file tree
Hide file tree
Showing 2 changed files with 23 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: 1ee8c0ca2a6aef9af4b78f860cc690f33fc8f287
refs/heads/master: 2bfc37dffa844e5b28a240feec5e2fa8ec2ea8ba
26 changes: 22 additions & 4 deletions trunk/drivers/rtc/rtc-ds1672.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,17 @@ static int ds1672_get_datetime(struct i2c_client *client, struct rtc_time *tm)
unsigned char buf[4];

struct i2c_msg msgs[] = {
{client->addr, 0, 1, &addr}, /* setup read ptr */
{client->addr, I2C_M_RD, 4, buf}, /* read date */
{/* setup read ptr */
.addr = client->addr,
.len = 1,
.buf = &addr
},
{/* read date */
.addr = client->addr,
.flags = I2C_M_RD,
.len = 4,
.buf = buf
},
};

/* read date registers */
Expand Down Expand Up @@ -99,8 +108,17 @@ static int ds1672_get_control(struct i2c_client *client, u8 *status)
unsigned char addr = DS1672_REG_CONTROL;

struct i2c_msg msgs[] = {
{client->addr, 0, 1, &addr}, /* setup read ptr */
{client->addr, I2C_M_RD, 1, status}, /* read control */
{/* setup read ptr */
.addr = client->addr,
.len = 1,
.buf = &addr
},
{/* read control */
.addr = client->addr,
.flags = I2C_M_RD,
.len = 1,
.buf = status
},
};

/* read control register */
Expand Down

0 comments on commit 9ac4cdc

Please sign in to comment.