mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
rtc: s5m: use shorter time of register update
Set the time needed for updating alarm and time registers to 0.45 ms. The default is 7.32 ms which is too long and leads to warnings when setting alarm or time: s5m-rtc: waiting for UDR update, reached max number of retries Signed-off-by: Krzysztof Kozlowski <[email protected]> Cc: Kyungmin Park <[email protected]> Cc: Lee Jones <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Sangbeom Kim <[email protected]> Cc: Samuel Ortiz <[email protected]> Cc: Marek Szyprowski <[email protected]> Cc: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
fe787a5b22
commit
0c5f5d9af3
2 changed files with 17 additions and 0 deletions
|
|
@ -519,6 +519,13 @@ static int s5m8767_rtc_init_reg(struct s5m_rtc_info *info)
|
|||
u8 data[2];
|
||||
int ret;
|
||||
|
||||
/* UDR update time. Default of 7.32 ms is too long. */
|
||||
ret = regmap_update_bits(info->regmap, S5M_RTC_UDR_CON,
|
||||
S5M_RTC_UDR_T_MASK, S5M_RTC_UDR_T_450_US);
|
||||
if (ret < 0)
|
||||
dev_err(info->dev, "%s: fail to change UDR time: %d\n",
|
||||
__func__, ret);
|
||||
|
||||
/* Set RTC control register : Binary mode, 24hour mode */
|
||||
data[0] = (1 << BCD_EN_SHIFT) | (1 << MODEL24_SHIFT);
|
||||
data[1] = (0 << BCD_EN_SHIFT) | (1 << MODEL24_SHIFT);
|
||||
|
|
|
|||
Loading…
Reference in a new issue