rtc: tps6591x: Prevent wrong date setting
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>