From: Lokesh Vutla Date: Thu, 16 Apr 2015 19:46:00 +0000 (-0700) Subject: drivers/rtc/rtc-omap.c: unlock and lock rtc registers before and after register writes X-Git-Tag: omap-for-v4.1/fixes-rc1~115^2~77 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c28bd07c20776cc04aecf04ba5be53fa5fa6dd2;p=pandora-kernel.git drivers/rtc/rtc-omap.c: unlock and lock rtc registers before and after register writes RTC module contains a kicker mechanism to prevent any spurious writes from changing the register values. This mechanism requires two MMR writes to the KICK0 and KICK1 registers with exact data values before the kicker lock mechanism is released. Currently the driver release the lock in the probe and leaves it enabled until the rtc driver removal. This eliminates the idea of preventing spurious writes when RTC driver is loaded. So implement rtc lock and unlock functions before and after register writes. This is as advised by Paul to implement lock and unlock functions in the driver and not to unlock and leave it in probe. The same discussion can be seen here: http://www.mail-archive.com/linux-omap%40vger.kernel.org/msg111588.html Signed-off-by: Lokesh Vutla Acked-by: Alexandre Belloni Cc: Alessandro Zummo Cc: Paul Walmsley Cc: Tero Kristo Cc: Sekhar Nori Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed