Lines Matching full:alarm
26 * @saved_alarm: Alarm to restore when interrupts are reenabled
113 /* Read alarm time from RTC. */
122 * The EC host command for getting the alarm is relative (i.e. 5 in cros_ec_rtc_read_alarm()
134 dev_err(dev, "error getting alarm: %d\n", ret); in cros_ec_rtc_read_alarm()
143 /* Set the EC's RTC alarm. */
153 * The EC host command for setting the alarm is relative in cros_ec_rtc_set_alarm()
171 * If the alarm is being disabled, send an alarm in cros_ec_rtc_set_alarm()
177 /* Don't set an alarm in the past. */ in cros_ec_rtc_set_alarm()
186 dev_err(dev, "error setting alarm in %u seconds: %d\n", in cros_ec_rtc_set_alarm()
189 * The EC code returns -EINVAL if the alarm time is too in cros_ec_rtc_set_alarm()
215 /* Restore saved alarm if it's still in the future. */ in cros_ec_rtc_alarm_irq_enable()
224 dev_err(dev, "error restoring alarm: %d\n", ret); in cros_ec_rtc_alarm_irq_enable()
228 /* Disable alarm, saving the old alarm value. */ in cros_ec_rtc_alarm_irq_enable()
232 dev_err(dev, "error saving alarm: %d\n", ret); in cros_ec_rtc_alarm_irq_enable()
239 * If the current EC alarm is already past, we don't want in cros_ec_rtc_alarm_irq_enable()
240 * to set an alarm when we go through the alarm irq enable in cros_ec_rtc_alarm_irq_enable()
252 dev_err(dev, "error disabling alarm: %d\n", ret); in cros_ec_rtc_alarm_irq_enable()
356 * alarm further in the future. If that fails, assume that the RTC in cros_ec_rtc_probe()
357 * connected to the EC can only handle less than 24 hours of alarm in cros_ec_rtc_probe()