参考链接
https://www.360doc.cn/article/71858349_1119199262.html
修改驱动drivers/mfd/rk808.c
static void rk817_shutdown_prepare(void)
{ int ret; struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client); /* close int when power off */ regmap_update_bits(rk808->regmap, RK817_INT_STS_MSK_REG0,
- 0xff, 0xff);
+ 0xff, 0x9f); regmap_update_bits(rk808->regmap, RK817_INT_STS_MSK_REG1, 0xff, 0xff); regmap_update_bits(rk808->regmap, RK817_INT_STS_MSK_REG2, 0xff, 0xff); regmap_update_bits(rk808->regmap, RK817_RTC_INT_REG,
- (0x3 << 2), (0x0 << 2));
+ (0x3 << 2), (0x3 << 2));
测试验证
echo +60 > /sys/class/rtc/rtc0/wakealarm 去设置60秒后开机
然后echo freeze > /sys/power/state等待开机
RTC唤醒时间是从执行echo +60 > /sys/class/rtc/rtc0/wakealarm 起算