Lines Matching full:cros_ec
23 * @cros_ec: Pointer to EC device
29 struct cros_ec_device *cros_ec; member
35 static int cros_ec_rtc_get(struct cros_ec_device *cros_ec, u32 command, in cros_ec_rtc_get() argument
48 ret = cros_ec_cmd_xfer_status(cros_ec, &msg.msg); in cros_ec_rtc_get()
57 static int cros_ec_rtc_set(struct cros_ec_device *cros_ec, u32 command, in cros_ec_rtc_set() argument
71 ret = cros_ec_cmd_xfer_status(cros_ec, &msg.msg); in cros_ec_rtc_set()
81 struct cros_ec_device *cros_ec = cros_ec_rtc->cros_ec; in cros_ec_rtc_read_time() local
85 ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_VALUE, &time); in cros_ec_rtc_read_time()
100 struct cros_ec_device *cros_ec = cros_ec_rtc->cros_ec; in cros_ec_rtc_set_time() local
104 ret = cros_ec_rtc_set(cros_ec, EC_CMD_RTC_SET_VALUE, (u32)time); in cros_ec_rtc_set_time()
117 struct cros_ec_device *cros_ec = cros_ec_rtc->cros_ec; in cros_ec_rtc_read_alarm() local
126 ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_VALUE, ¤t_time); in cros_ec_rtc_read_alarm()
132 ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_ALARM, &alarm_offset); in cros_ec_rtc_read_alarm()
147 struct cros_ec_device *cros_ec = cros_ec_rtc->cros_ec; in cros_ec_rtc_set_alarm() local
158 ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_VALUE, ¤t_time); in cros_ec_rtc_set_alarm()
184 ret = cros_ec_rtc_set(cros_ec, EC_CMD_RTC_SET_ALARM, alarm_offset); in cros_ec_rtc_set_alarm()
204 struct cros_ec_device *cros_ec = cros_ec_rtc->cros_ec; in cros_ec_rtc_alarm_irq_enable() local
208 ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_VALUE, ¤t_time); in cros_ec_rtc_alarm_irq_enable()
221 ret = cros_ec_rtc_set(cros_ec, EC_CMD_RTC_SET_ALARM, in cros_ec_rtc_alarm_irq_enable()
229 ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_ALARM, in cros_ec_rtc_alarm_irq_enable()
249 ret = cros_ec_rtc_set(cros_ec, EC_CMD_RTC_SET_ALARM, in cros_ec_rtc_alarm_irq_enable()
266 struct cros_ec_device *cros_ec; in cros_ec_rtc_event() local
271 cros_ec = cros_ec_rtc->cros_ec; in cros_ec_rtc_event()
273 host_event = cros_ec_get_host_event(cros_ec); in cros_ec_rtc_event()
297 return enable_irq_wake(cros_ec_rtc->cros_ec->irq); in cros_ec_rtc_suspend()
308 return disable_irq_wake(cros_ec_rtc->cros_ec->irq); in cros_ec_rtc_resume()
320 struct cros_ec_device *cros_ec = ec_dev->ec_dev; in cros_ec_rtc_probe() local
331 cros_ec_rtc->cros_ec = cros_ec; in cros_ec_rtc_probe()
360 ret = cros_ec_rtc_set(cros_ec, EC_CMD_RTC_SET_ALARM, SECS_PER_DAY * 2); in cros_ec_rtc_probe()
364 (void)cros_ec_rtc_set(cros_ec, EC_CMD_RTC_SET_ALARM, in cros_ec_rtc_probe()
373 ret = blocking_notifier_chain_register(&cros_ec->event_notifier, in cros_ec_rtc_probe()
390 &cros_ec_rtc->cros_ec->event_notifier, in cros_ec_rtc_remove()