Lines Matching full:alarm
26 * @saved_alarm: Alarm to restore when interrupts are reenabled
107 /* Read alarm time from RTC. */
116 * The EC host command for getting the alarm is relative (i.e. 5 in cros_ec_rtc_read_alarm()
128 dev_err(dev, "error getting alarm: %d\n", ret); in cros_ec_rtc_read_alarm()
137 /* Set the EC's RTC alarm. */
147 * The EC host command for setting the alarm is relative in cros_ec_rtc_set_alarm()
165 * If the alarm is being disabled, send an alarm in cros_ec_rtc_set_alarm()
171 /* Don't set an alarm in the past. */ in cros_ec_rtc_set_alarm()
180 dev_err(dev, "error setting alarm in %u seconds: %d\n", in cros_ec_rtc_set_alarm()
183 * The EC code returns -EINVAL if the alarm time is too in cros_ec_rtc_set_alarm()
209 /* Restore saved alarm if it's still in the future. */ in cros_ec_rtc_alarm_irq_enable()
218 dev_err(dev, "error restoring alarm: %d\n", ret); in cros_ec_rtc_alarm_irq_enable()
222 /* Disable alarm, saving the old alarm value. */ in cros_ec_rtc_alarm_irq_enable()
226 dev_err(dev, "error saving alarm: %d\n", ret); in cros_ec_rtc_alarm_irq_enable()
233 * If the current EC alarm is already past, we don't want in cros_ec_rtc_alarm_irq_enable()
234 * to set an alarm when we go through the alarm irq enable in cros_ec_rtc_alarm_irq_enable()
246 dev_err(dev, "error disabling alarm: %d\n", ret); in cros_ec_rtc_alarm_irq_enable()
350 * alarm further in the future. If that fails, assume that the RTC in cros_ec_rtc_probe()
351 * connected to the EC can only handle less than 24 hours of alarm in cros_ec_rtc_probe()