Lines Matching refs:tm
113 static int pm80x_rtc_read_time(struct device *dev, struct rtc_time *tm) in pm80x_rtc_read_time() argument
128 rtc_time_to_tm(ticks, tm); in pm80x_rtc_read_time()
132 static int pm80x_rtc_set_time(struct device *dev, struct rtc_time *tm) in pm80x_rtc_set_time() argument
137 if ((tm->tm_year < 70) || (tm->tm_year > 138)) { in pm80x_rtc_set_time()
140 1900 + tm->tm_year); in pm80x_rtc_set_time()
143 rtc_tm_to_time(tm, &ticks); in pm80x_rtc_set_time()
258 struct rtc_time tm; in pm80x_rtc_probe() local
296 ret = pm80x_rtc_read_time(&pdev->dev, &tm); in pm80x_rtc_probe()
301 if ((tm.tm_year < 70) || (tm.tm_year > 138)) { in pm80x_rtc_probe()
302 tm.tm_year = 70; in pm80x_rtc_probe()
303 tm.tm_mon = 0; in pm80x_rtc_probe()
304 tm.tm_mday = 1; in pm80x_rtc_probe()
305 tm.tm_hour = 0; in pm80x_rtc_probe()
306 tm.tm_min = 0; in pm80x_rtc_probe()
307 tm.tm_sec = 0; in pm80x_rtc_probe()
308 ret = pm80x_rtc_set_time(&pdev->dev, &tm); in pm80x_rtc_probe()
314 rtc_tm_to_time(&tm, &ticks); in pm80x_rtc_probe()