rtc: palmas: Clear all interrupt of RTC during init
authorLaxman Dewangan <ldewangan@nvidia.com>
Thu, 14 Feb 2013 09:55:20 +0000 (14:55 +0530)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 20:06:08 +0000 (13:06 -0700)
commit51363a7755feda711605e009debd967df655729d
treefa01a6c8b6af789b5799351d4bc25927fc07d5a5
parent6596ae01c673645388f03bd41a10b1bcb1177f35
rtc: palmas: Clear all interrupt of RTC during init

There is a false wakeup from Palma RTC in suspend state of system.
Following changes are done to fix this issue:
- Clear all intrruprs of RTC during initialization,
- make RTC interrupt as early resume and
- do not enable the interrupt in suspend, as the interrupt get
  enabled when user sets the alarm.

Add debug prints on rtc callbacks for tracing the activity happen with
RTC hardware to catch any false setting/alarm/wakeup.

bug 1227717

(Cherrypicked from commit
0adcd0943ee3fd4982056d879ef3621d14fd4040)

Change-Id: I18a5a0a845dcf036d6ffea8a350f5d32fef83e5d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/200736
Reviewed-on: http://git-master/r/215099
drivers/rtc/rtc-palmas.c