diff options
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-hym8563.c | 3 | ||||
-rw-r--r-- | drivers/rtc/rtc-pcf8523.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-hym8563.c b/drivers/rtc/rtc-hym8563.c index bd628a6f981d..e5f13c4310fe 100644 --- a/drivers/rtc/rtc-hym8563.c +++ b/drivers/rtc/rtc-hym8563.c | |||
@@ -569,6 +569,9 @@ static int hym8563_probe(struct i2c_client *client, | |||
569 | if (IS_ERR(hym8563->rtc)) | 569 | if (IS_ERR(hym8563->rtc)) |
570 | return PTR_ERR(hym8563->rtc); | 570 | return PTR_ERR(hym8563->rtc); |
571 | 571 | ||
572 | /* the hym8563 alarm only supports a minute accuracy */ | ||
573 | hym8563->rtc->uie_unsupported = 1; | ||
574 | |||
572 | #ifdef CONFIG_COMMON_CLK | 575 | #ifdef CONFIG_COMMON_CLK |
573 | hym8563_clkout_register_clk(hym8563); | 576 | hym8563_clkout_register_clk(hym8563); |
574 | #endif | 577 | #endif |
diff --git a/drivers/rtc/rtc-pcf8523.c b/drivers/rtc/rtc-pcf8523.c index 5c8f8226c848..4cdb64be061b 100644 --- a/drivers/rtc/rtc-pcf8523.c +++ b/drivers/rtc/rtc-pcf8523.c | |||
@@ -206,7 +206,7 @@ static int pcf8523_rtc_read_time(struct device *dev, struct rtc_time *tm) | |||
206 | tm->tm_hour = bcd2bin(regs[2] & 0x3f); | 206 | tm->tm_hour = bcd2bin(regs[2] & 0x3f); |
207 | tm->tm_mday = bcd2bin(regs[3] & 0x3f); | 207 | tm->tm_mday = bcd2bin(regs[3] & 0x3f); |
208 | tm->tm_wday = regs[4] & 0x7; | 208 | tm->tm_wday = regs[4] & 0x7; |
209 | tm->tm_mon = bcd2bin(regs[5] & 0x1f); | 209 | tm->tm_mon = bcd2bin(regs[5] & 0x1f) - 1; |
210 | tm->tm_year = bcd2bin(regs[6]) + 100; | 210 | tm->tm_year = bcd2bin(regs[6]) + 100; |
211 | 211 | ||
212 | return rtc_valid_tm(tm); | 212 | return rtc_valid_tm(tm); |
@@ -229,7 +229,7 @@ static int pcf8523_rtc_set_time(struct device *dev, struct rtc_time *tm) | |||
229 | regs[3] = bin2bcd(tm->tm_hour); | 229 | regs[3] = bin2bcd(tm->tm_hour); |
230 | regs[4] = bin2bcd(tm->tm_mday); | 230 | regs[4] = bin2bcd(tm->tm_mday); |
231 | regs[5] = tm->tm_wday; | 231 | regs[5] = tm->tm_wday; |
232 | regs[6] = bin2bcd(tm->tm_mon); | 232 | regs[6] = bin2bcd(tm->tm_mon + 1); |
233 | regs[7] = bin2bcd(tm->tm_year - 100); | 233 | regs[7] = bin2bcd(tm->tm_year - 100); |
234 | 234 | ||
235 | msg.addr = client->addr; | 235 | msg.addr = client->addr; |