mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
rtc-isl12022: properly handle military hour format
Mask out PM flag when reading the hour, always set MIL bit when writing the hour. Signed-off-by: Roman Fietze <[email protected]> Acked-by: Wan ZongShun <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
c03675f05f
commit
6d23b2582f
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue