Lines Matching defs:alm
313 static int twl_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm)
326 alm->time.tm_sec = bcd2bin(rtc_data[0]);
327 alm->time.tm_min = bcd2bin(rtc_data[1]);
328 alm->time.tm_hour = bcd2bin(rtc_data[2]);
329 alm->time.tm_mday = bcd2bin(rtc_data[3]);
330 alm->time.tm_mon = bcd2bin(rtc_data[4]) - 1;
331 alm->time.tm_year = bcd2bin(rtc_data[5]) + 100;
335 alm->enabled = 1;
340 static int twl_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm)
349 alarm_data[1] = bin2bcd(alm->time.tm_sec);
350 alarm_data[2] = bin2bcd(alm->time.tm_min);
351 alarm_data[3] = bin2bcd(alm->time.tm_hour);
352 alarm_data[4] = bin2bcd(alm->time.tm_mday);
353 alarm_data[5] = bin2bcd(alm->time.tm_mon + 1);
354 alarm_data[6] = bin2bcd(alm->time.tm_year - 100);
364 if (alm->enabled)