Lines Matching full:alarm
25 * @saved_alarm: Alarm to restore when interrupts are reenabled
112 /* Read alarm time from RTC. */
121 * The EC host command for getting the alarm is relative (i.e. 5 in cros_ec_rtc_read_alarm()
133 dev_err(dev, "error getting alarm: %d\n", ret); in cros_ec_rtc_read_alarm()
142 /* Set the EC's RTC alarm. */
152 * The EC host command for setting the alarm is relative in cros_ec_rtc_set_alarm()
170 * If the alarm is being disabled, send an alarm in cros_ec_rtc_set_alarm()
176 /* Don't set an alarm in the past. */ in cros_ec_rtc_set_alarm()
185 dev_err(dev, "error setting alarm in %u seconds: %d\n", in cros_ec_rtc_set_alarm()
188 * The EC code returns -EINVAL if the alarm time is too in cros_ec_rtc_set_alarm()
214 /* Restore saved alarm if it's still in the future. */ in cros_ec_rtc_alarm_irq_enable()
223 dev_err(dev, "error restoring alarm: %d\n", ret); in cros_ec_rtc_alarm_irq_enable()
227 /* Disable alarm, saving the old alarm value. */ in cros_ec_rtc_alarm_irq_enable()
231 dev_err(dev, "error saving alarm: %d\n", ret); in cros_ec_rtc_alarm_irq_enable()
238 * If the current EC alarm is already past, we don't want in cros_ec_rtc_alarm_irq_enable()
239 * to set an alarm when we go through the alarm irq enable in cros_ec_rtc_alarm_irq_enable()
251 dev_err(dev, "error disabling alarm: %d\n", ret); in cros_ec_rtc_alarm_irq_enable()
355 * alarm further in the future. If that fails, assume that the RTC in cros_ec_rtc_probe()
356 * connected to the EC can only handle less than 24 hours of alarm in cros_ec_rtc_probe()