From 9c28bd07c20776cc04aecf04ba5be53fa5fa6dd2 Mon Sep 17 00:00:00 2001 From: Lokesh Vutla Date: Thu, 16 Apr 2015 12:46:00 -0700 Subject: [PATCH] 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-format-patch failed