Skip to content

Commit

Permalink
rtc-isl12022: properly handle military hour format
Browse files Browse the repository at this point in the history
Mask out PM flag when reading the hour, always set MIL bit when
writing the hour.

Signed-off-by: Roman Fietze <roman.fietze@telemotive.de>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Roman Fietze authored and Linus Torvalds committed Aug 11, 2010
1 parent c03675f commit 6d23b25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-isl12022.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ static int isl12022_set_datetime(struct i2c_client *client, struct rtc_time *tm)
/* hours, minutes and seconds */
buf[ISL12022_REG_SC] = bin2bcd(tm->tm_sec);
buf[ISL12022_REG_MN] = bin2bcd(tm->tm_min);
buf[ISL12022_REG_HR] = bin2bcd(tm->tm_hour);
buf[ISL12022_REG_HR] = bin2bcd(tm->tm_hour) | ISL12022_HR_MIL;

buf[ISL12022_REG_DT] = bin2bcd(tm->tm_mday);

Expand Down

0 comments on commit 6d23b25

Please sign in to comment.