diff options
author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2015-07-25 09:54:59 -0400 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2015-09-05 07:19:11 -0400 |
commit | 2e10e74df72ff0f8ea65eb1ee6e39ed8278a91bf (patch) | |
tree | b7b99ef8063252cf6d2c311df30a20bb5839d2be /drivers/rtc | |
parent | 32672c55951b2633bb93ec6f12734cf17e9d3a14 (diff) |
rtc: rx8025: fix transfer mode
The datasheet specifies that transfer mode must be 0 for write and either
0x4 (simplified read) or 0 (standard read). 0x8 is not specified, use
standard mode.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-rx8025.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-rx8025.c b/drivers/rtc/rtc-rx8025.c index 3612362b65ac..771558602409 100644 --- a/drivers/rtc/rtc-rx8025.c +++ b/drivers/rtc/rtc-rx8025.c | |||
@@ -77,7 +77,7 @@ struct rx8025_data { | |||
77 | 77 | ||
78 | static int rx8025_read_reg(struct i2c_client *client, int number, u8 *value) | 78 | static int rx8025_read_reg(struct i2c_client *client, int number, u8 *value) |
79 | { | 79 | { |
80 | int ret = i2c_smbus_read_byte_data(client, (number << 4) | 0x08); | 80 | int ret = i2c_smbus_read_byte_data(client, number << 4); |
81 | 81 | ||
82 | if (ret < 0) { | 82 | if (ret < 0) { |
83 | dev_err(&client->dev, "Unable to read register #%d\n", number); | 83 | dev_err(&client->dev, "Unable to read register #%d\n", number); |
@@ -91,7 +91,7 @@ static int rx8025_read_reg(struct i2c_client *client, int number, u8 *value) | |||
91 | static int rx8025_read_regs(struct i2c_client *client, | 91 | static int rx8025_read_regs(struct i2c_client *client, |
92 | int number, u8 length, u8 *values) | 92 | int number, u8 length, u8 *values) |
93 | { | 93 | { |
94 | int ret = i2c_smbus_read_i2c_block_data(client, (number << 4) | 0x08, | 94 | int ret = i2c_smbus_read_i2c_block_data(client, number << 4, |
95 | length, values); | 95 | length, values); |
96 | 96 | ||
97 | if (ret != length) { | 97 | if (ret != length) { |
@@ -117,7 +117,7 @@ static int rx8025_write_reg(struct i2c_client *client, int number, u8 value) | |||
117 | static int rx8025_write_regs(struct i2c_client *client, | 117 | static int rx8025_write_regs(struct i2c_client *client, |
118 | int number, u8 length, u8 *values) | 118 | int number, u8 length, u8 *values) |
119 | { | 119 | { |
120 | int ret = i2c_smbus_write_i2c_block_data(client, (number << 4) | 0x08, | 120 | int ret = i2c_smbus_write_i2c_block_data(client, number << 4, |
121 | length, values); | 121 | length, values); |
122 | 122 | ||
123 | if (ret) | 123 | if (ret) |