rtc-max77663: add wakeup property in RTC device.
authorhaydend <haydend@nvidia.com>
Mon, 6 Aug 2012 08:26:39 +0000 (16:26 +0800)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 19:31:15 +0000 (12:31 -0700)
commitdb653b0a7ee97cfa2f78d82c75030954f1cd31d4
tree1e464b84f3bfc36d93a9a2e83c08cf990577124d
parent243751c39b8f59481e80ef3e70dc456c3d68c215
rtc-max77663: add wakeup property in RTC device.

Android use ioctl ANDROID_ALARM_SET_RTC on /dev/alarm to change time,
alarm device driver will call RTC interface to set the change into RTC
register.
On K3.4 alarm related code has changed a little bit, in alarmtimer.c
alarmtimer_rtc_add_device used as rtc class add_device callback, in
this function will check if devices can wakeup system or not,
     if (!device_may_wakeup(rtc->dev.parent))
        return -1;
If check is failed, the alarm device will not bind to a RTC device
this will cause our time change not set into RTC register, the change
will lose after system reboot.
Because K3.1 don't has such check, so we need use device_init_wakeup
to add wakeup property on rtc-max77663 in K3.4 to solve the issue.

bug 1026999

Change-Id: If542407d5ee1fcce0718ba4107315a1c4020f653
Signed-off-by: Hayden Du <haydend@nvidia.com>
Reviewed-on: http://git-master/r/121243
Reviewed-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

Rebase-Id: Ra4dff87ff2bee00f2ef4f8e0a3ddceb5dc132d5c
drivers/rtc/rtc-max77663.c