struct rtc_device *rtc;
int irq;
bool irq_en;
- unsigned long long epoch_start;
+ time64_t epoch_start;
};
static inline struct device *to_tps6586x_dev(struct device *dev)
struct tps6586x_rtc *rtc = dev_get_drvdata(dev);
struct device *tps_dev = to_tps6586x_dev(dev);
unsigned long long ticks = 0;
- unsigned long seconds;
+ time64_t seconds;
u8 buff[6];
int ret;
int i;
struct tps6586x_rtc *rtc = dev_get_drvdata(dev);
struct device *tps_dev = to_tps6586x_dev(dev);
unsigned long long ticks;
- unsigned long seconds;
+ time64_t seconds;
u8 buff[5];
int ret;
- rtc_tm_to_time(tm, &seconds);
+ seconds = rtc_tm_to_time64(tm);
if (seconds < rtc->epoch_start) {
dev_err(dev, "requested time unsupported\n");
return -EINVAL;
{
struct tps6586x_rtc *rtc = dev_get_drvdata(dev);
struct device *tps_dev = to_tps6586x_dev(dev);
- unsigned long seconds;
+ time64_t seconds;
unsigned long ticks;
unsigned long rtc_current_time;
unsigned long long rticks = 0;
int ret;
int i;
- rtc_tm_to_time(&alrm->time, &seconds);
+ seconds = rtc_tm_to_time64(&alrm->time);
if (alrm->enabled && (seconds < rtc->epoch_start)) {
dev_err(dev, "can't set alarm to requested time\n");
struct tps6586x_rtc *rtc = dev_get_drvdata(dev);
struct device *tps_dev = to_tps6586x_dev(dev);
unsigned long ticks;
- unsigned long seconds;
+ time64_t seconds;
u8 buff[3];
int ret;
seconds = ticks >> 10;
seconds += rtc->epoch_start;
- rtc_time_to_tm(seconds, &alrm->time);
+ rtc_time64_to_tm(seconds, &alrm->time);
return 0;
}
rtc->irq = platform_get_irq(pdev, 0);
/* Set epoch start as 00:00:00:01:01:2009 */
- rtc->epoch_start = mktime(2009, 1, 1, 0, 0, 0);
+ rtc->epoch_start = mktime64(2009, 1, 1, 0, 0, 0);
/* 1 kHz tick mode, enable tick counting */
ret = tps6586x_update(tps_dev, RTC_CTRL,