summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-tps6591x.c
AgeCommit message (Collapse)Author
2012-07-26rtc: tps6591x: Prevent wrong date settingPreetham Chandru
This CL handles the following: 1. Prevents setting of wrong date in tps6591x_rtc_set_time(). For example the following case was not handled in rtc driver: if hwclock command wanted to set 31/Dec/1999 then our RTC driver was setting the date to 31/Dec/2099 and later on when hwclock read the date back it was getting a invalid date. Also, the hwclock command can only handle date upto the year 2038. 2. Sets STOP_RTC bit to one when the driver is initialized Bug 1012914 Bug 1017647 Signed-off-by: Preetham Chandru R <pchandru@nvidia.com> Change-Id: If8abfebe3ee6da05498deb38d7247ab265729c0c Reviewed-on: http://git-master/r/117298 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-by: Kiran Adduri <kadduri@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2012-05-22rtc: tps6591x: Limiting years in the 0 - 99 rangeVenu Byravarasu
As RTC can store year in the 0 - 99 range only, handling it accordingly bug 985890 Change-Id: Idcfb29028f482283ae2658579a3283c7d4f230f1 Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-on: http://git-master/r/102798 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2012-05-15rtc: tps6591x: Enable alarm interrupt for RTC_WKALM_SET ioctlPreetham Chandru
RTC_WKALM_SET ioctl should do two things: 1. Set alarm value 2. Enable alarm irq In the current implementation for RTC_WKALM_SET ioctl we are only setting the alarm value but not enabling the alarm irq and hence the system is not waking from lp0 state once the set alarm value expiries. For RTC_WKALM_SET ioctl, alarm->enabled will be set to one from userspace. So based on this condition we can differentiate between RTC_WKALM_SET & RTC_ALM_SET and accordingly enable alarm irq. Bug 978205 Signed-off-by: Preetham Chandru R <pchandru@nvidia.com> Change-Id: Ia35192e691ca116b13093f52873020f67c5c2f8d Reviewed-on: http://git-master/r/101447 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
2012-02-09rtc: tps6591x: Fixing month register program errorVenu Byravarasu
The month field of tm structure managed by kernel, expects a value between 0 to 11. However, TPS6591x RTC month register expects the month range to be between 1 to 12. Hence fixing it. Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com> Change-Id: I054de10dcd58497167c8460fe935325cee3c582f Reviewed-on: http://git-master/r/79930 Tested-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2011-11-30rtc: tps6591x: Clear interrupt when probing deviceBo Yan
Make sure alarm interrupt is cleared during device probing. bug 867362 Original-Change-Id: Iad33c0e0715de2ec68291a57c2a55d1ad1198565 Reviewed-on: http://git-master/r/49302 Reviewed-by: Bo Yan <byan@nvidia.com> Tested-by: Bo Yan <byan@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> Rebase-Id: R5574970052e9a1c1334003e0f03e1d62c7ee5109
2011-11-30rtc: tps6591x: Registering PMU RTC as a wake sourcevenu byravarasu
Without this registration, "wakealarm" node doesnot get created under the sysfs path /sys/class/rtc/rtc0. This is used for setting RTC alarms using sysfs. bug 846920 Original-Change-Id: I287448354612d526f4b96294fef24f5669949130 Reviewed-on: http://git-master/r/44507 Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Tested-by: Venu Byravarasu <vbyravarasu@nvidia.com> Rebase-Id: Rab6c47661fad4fd823fb8bb2c7aa5b8b210f23a7
2011-11-30rtc: tps6591x: enabling backup battery chargingvenu byravarasu
With this change: 1. Enabled backup battery charging 2. Setting RTC default time, if it is not set previously. bug 796507 Original-Change-Id: Idffb99f24718cd8b15f38b6ca8109969ef47be81 Reviewed-on: http://git-master/r/31522 Tested-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-by: Gaurav Sarode <gsarode@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: Narendra Damahe <ndamahe@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Rebase-Id: R6a38294f28a7efb288b89b5d8ad39daae73bd5ca
2011-11-30rtc: tps6591x: setting default date & timevenu byravarasu
Following changes are done: 1. Set default date, if platform data is incorrect. 2. Added an offset to adjust the RTC time to show the correct date in the time stamp. Original-Change-Id: I69d9632a3db4a64b61f68bf84098fd00cb95bed7 Reviewed-on: http://git-master/r/27761 Tested-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Original-Change-Id: I875005353c75567821f0497a4ee47dc087d8e322 Rebase-Id: R98eaf3a015ef7614d7ed8c096f51ad69931ea223
2011-11-30rtc: tps6591x: wake up from suspend on alarmvenu byravarasu
Changes required for waking up system, when RTC alarm is triggered. bug 793949 Original-Change-Id: Idcc536a819e977fe35bafeebdffddf57d5388f21 Reviewed-on: http://git-master/r/27359 Tested-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Original-Change-Id: I68bb747cb965d14af9918ad6086ac2e9888f7136 Rebase-Id: Ra2e528aeb4727392e17ee911d673cc49e9d03068
2011-11-30rtc: RTC driver for tps6591xvenu byravarasu
With this check in native driver for TPS6591x RTC is added to linux kernel. Original-Change-Id: I267cc11b1451b8e2a4117cdff0b808f9f8fcc42a Reviewed-on: http://git-master/r/20754 Tested-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Original-Change-Id: If55c1d1d7ebdedace4f0dea0b19bbda088a6cb1e Rebase-Id: Rdd5b5c4b3c14b247608dffb5ee017051e802e5a1