LF-10339-4 rtc: bbnsm: enable the rtc by default

Enable the rtc by default even no valid time
is set to make sure the rtc read time & alarm
function can work.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
This commit is contained in:
Jacky Bai 2023-03-15 15:55:22 +08:00 committed by Dong Aisheng
parent 4fb6e9e5d2
commit 2e66e643a1

View File

@ -189,6 +189,9 @@ static int bbnsm_rtc_probe(struct platform_device *pdev)
/* clear all the pending events */
regmap_write(bbnsm->regmap, BBNSM_EVENTS, 0x7A);
/* Enable the Real-Time counter */
regmap_update_bits(bbnsm->regmap, BBNSM_CTRL, RTC_EN_MSK, RTC_EN);
device_init_wakeup(&pdev->dev, true);
dev_pm_set_wake_irq(&pdev->dev, bbnsm->irq);