Thread (17 messages) 17 messages, 3 authors, 2019-08-23

Re: [PATCH v2 2/4] rtc: Add support for the MediaTek MT2712 RTC

From: Alexandre Belloni <alexandre.belloni@bootlin.com>
Date: 2019-08-22 12:46:35
Also in: linux-devicetree, linux-mediatek, linux-rtc, lkml

On 22/08/2019 20:34:14+0800, Ran Bi wrote:
quoted
quoted
+	/* RTC need POWERKEY1/2 match, then goto normal work mode */
+	mt2712_writel(rtc, MT2712_POWERKEY1, MT2712_POWERKEY1_KEY);
+	mt2712_writel(rtc, MT2712_POWERKEY2, MT2712_POWERKEY2_KEY);
This should be written when setting the time after power was lost.
I suppose we can move this into mt2712_rtc_read_time function's "if
(p1 != MT2712_POWERKEY1_KEY || p2 != MT2712_POWERKEY2_KEY)" condition
which will be added at next patch. We need additional flag to mark this
condition or another if condition in mt2712_rtc_set_time fucntion if we
put these code in mt2712_rtc_set_time function.
It is fine to test both in read_time and in set_time.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help