Lines Matching refs:cros_ec

28 	struct cros_ec_device *cros_ec;  member
34 static int cros_ec_rtc_get(struct cros_ec_device *cros_ec, u32 command, in cros_ec_rtc_get() argument
47 ret = cros_ec_cmd_xfer_status(cros_ec, &msg.msg); in cros_ec_rtc_get()
56 static int cros_ec_rtc_set(struct cros_ec_device *cros_ec, u32 command, in cros_ec_rtc_set() argument
70 ret = cros_ec_cmd_xfer_status(cros_ec, &msg.msg); in cros_ec_rtc_set()
80 struct cros_ec_device *cros_ec = cros_ec_rtc->cros_ec; in cros_ec_rtc_read_time() local
84 ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_VALUE, &time); in cros_ec_rtc_read_time()
99 struct cros_ec_device *cros_ec = cros_ec_rtc->cros_ec; in cros_ec_rtc_set_time() local
103 ret = cros_ec_rtc_set(cros_ec, EC_CMD_RTC_SET_VALUE, (u32)time); in cros_ec_rtc_set_time()
116 struct cros_ec_device *cros_ec = cros_ec_rtc->cros_ec; in cros_ec_rtc_read_alarm() local
125 ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_VALUE, &current_time); in cros_ec_rtc_read_alarm()
131 ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_ALARM, &alarm_offset); in cros_ec_rtc_read_alarm()
146 struct cros_ec_device *cros_ec = cros_ec_rtc->cros_ec; in cros_ec_rtc_set_alarm() local
157 ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_VALUE, &current_time); in cros_ec_rtc_set_alarm()
183 ret = cros_ec_rtc_set(cros_ec, EC_CMD_RTC_SET_ALARM, alarm_offset); in cros_ec_rtc_set_alarm()
203 struct cros_ec_device *cros_ec = cros_ec_rtc->cros_ec; in cros_ec_rtc_alarm_irq_enable() local
207 ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_VALUE, &current_time); in cros_ec_rtc_alarm_irq_enable()
220 ret = cros_ec_rtc_set(cros_ec, EC_CMD_RTC_SET_ALARM, in cros_ec_rtc_alarm_irq_enable()
228 ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_ALARM, in cros_ec_rtc_alarm_irq_enable()
248 ret = cros_ec_rtc_set(cros_ec, EC_CMD_RTC_SET_ALARM, in cros_ec_rtc_alarm_irq_enable()
265 struct cros_ec_device *cros_ec; in cros_ec_rtc_event() local
270 cros_ec = cros_ec_rtc->cros_ec; in cros_ec_rtc_event()
272 host_event = cros_ec_get_host_event(cros_ec); in cros_ec_rtc_event()
296 return enable_irq_wake(cros_ec_rtc->cros_ec->irq); in cros_ec_rtc_suspend()
307 return disable_irq_wake(cros_ec_rtc->cros_ec->irq); in cros_ec_rtc_resume()
319 struct cros_ec_device *cros_ec = ec_dev->ec_dev; in cros_ec_rtc_probe() local
330 cros_ec_rtc->cros_ec = cros_ec; in cros_ec_rtc_probe()
359 ret = cros_ec_rtc_set(cros_ec, EC_CMD_RTC_SET_ALARM, SECS_PER_DAY * 2); in cros_ec_rtc_probe()
363 (void)cros_ec_rtc_set(cros_ec, EC_CMD_RTC_SET_ALARM, in cros_ec_rtc_probe()
372 ret = blocking_notifier_chain_register(&cros_ec->event_notifier, in cros_ec_rtc_probe()
389 &cros_ec_rtc->cros_ec->event_notifier, in cros_ec_rtc_remove()