Lines Matching refs:tm
109 static int pm860x_rtc_read_time(struct device *dev, struct rtc_time *tm) in pm860x_rtc_read_time() argument
127 rtc_time_to_tm(ticks, tm); in pm860x_rtc_read_time()
132 static int pm860x_rtc_set_time(struct device *dev, struct rtc_time *tm) in pm860x_rtc_set_time() argument
138 if ((tm->tm_year < 70) || (tm->tm_year > 138)) { in pm860x_rtc_set_time()
141 1900 + tm->tm_year); in pm860x_rtc_set_time()
144 rtc_tm_to_time(tm, &ticks); in pm860x_rtc_set_time()
316 struct rtc_time tm; in pm860x_rtc_probe() local
352 ret = pm860x_rtc_read_time(&pdev->dev, &tm); in pm860x_rtc_probe()
357 if ((tm.tm_year < 70) || (tm.tm_year > 138)) { in pm860x_rtc_probe()
358 tm.tm_year = 70; in pm860x_rtc_probe()
359 tm.tm_mon = 0; in pm860x_rtc_probe()
360 tm.tm_mday = 1; in pm860x_rtc_probe()
361 tm.tm_hour = 0; in pm860x_rtc_probe()
362 tm.tm_min = 0; in pm860x_rtc_probe()
363 tm.tm_sec = 0; in pm860x_rtc_probe()
364 ret = pm860x_rtc_set_time(&pdev->dev, &tm); in pm860x_rtc_probe()
370 rtc_tm_to_time(&tm, &ticks); in pm860x_rtc_probe()