Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9c28bd07 authored by Lokesh Vutla's avatar Lokesh Vutla Committed by Linus Torvalds
Browse files

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: default avatarLokesh Vutla <lokeshvutla@ti.com>
Acked-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tero Kristo <t-kristo@ti.com>
Cc: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 202fe4c2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment