Lines Matching refs:rtc_tm

56 static int da9055_read_alarm(struct da9055 *da9055, struct rtc_time *rtc_tm)  in da9055_read_alarm()  argument
67 rtc_tm->tm_year = (v[4] & DA9055_RTC_ALM_YEAR) + 100; in da9055_read_alarm()
68 rtc_tm->tm_mon = (v[3] & DA9055_RTC_ALM_MONTH) - 1; in da9055_read_alarm()
69 rtc_tm->tm_mday = v[2] & DA9055_RTC_ALM_DAY; in da9055_read_alarm()
70 rtc_tm->tm_hour = v[1] & DA9055_RTC_ALM_HOUR; in da9055_read_alarm()
71 rtc_tm->tm_min = v[0] & DA9055_RTC_ALM_MIN; in da9055_read_alarm()
72 rtc_tm->tm_sec = 0; in da9055_read_alarm()
74 return rtc_valid_tm(rtc_tm); in da9055_read_alarm()
77 static int da9055_set_alarm(struct da9055 *da9055, struct rtc_time *rtc_tm) in da9055_set_alarm() argument
82 rtc_tm->tm_year -= 100; in da9055_set_alarm()
83 rtc_tm->tm_mon += 1; in da9055_set_alarm()
86 DA9055_RTC_ALM_MIN, rtc_tm->tm_min); in da9055_set_alarm()
92 v[0] = rtc_tm->tm_hour; in da9055_set_alarm()
93 v[1] = rtc_tm->tm_mday; in da9055_set_alarm()
100 DA9055_RTC_ALM_MONTH, rtc_tm->tm_mon); in da9055_set_alarm()
105 DA9055_RTC_ALM_YEAR, rtc_tm->tm_year); in da9055_set_alarm()
125 static int da9055_rtc_read_time(struct device *dev, struct rtc_time *rtc_tm) in da9055_rtc_read_time() argument
149 rtc_tm->tm_year = (v[5] & DA9055_RTC_YEAR) + 100; in da9055_rtc_read_time()
150 rtc_tm->tm_mon = (v[4] & DA9055_RTC_MONTH) - 1; in da9055_rtc_read_time()
151 rtc_tm->tm_mday = v[3] & DA9055_RTC_DAY; in da9055_rtc_read_time()
152 rtc_tm->tm_hour = v[2] & DA9055_RTC_HOUR; in da9055_rtc_read_time()
153 rtc_tm->tm_min = v[1] & DA9055_RTC_MIN; in da9055_rtc_read_time()
154 rtc_tm->tm_sec = v[0] & DA9055_RTC_SEC; in da9055_rtc_read_time()