static void cros_ec_report_events_during_suspend(struct cros_ec_device *ec_dev) { while (ec_dev->mkbp_event_supported && cros_ec_get_next_event(ec_dev, NULL) > 0) blocking_notifier_call_chain(&ec_dev->event_notifier, 1, ec_dev); }
static void cros_ec_lpc_acpi_notify(acpi_handle device, u32 value, void *data) { struct cros_ec_device *ec_dev = data; if (ec_dev->mkbp_event_supported && cros_ec_get_next_event(ec_dev, NULL) > 0) blocking_notifier_call_chain(&ec_dev->event_notifier, 0, ec_dev); }
static irqreturn_t ec_irq_thread(int irq, void *data) { struct cros_ec_device *ec_dev = data; int ret; if (device_may_wakeup(ec_dev->dev)) pm_wakeup_event(ec_dev->dev, 0); ret = cros_ec_get_next_event(ec_dev); if (ret > 0) blocking_notifier_call_chain(&ec_dev->event_notifier, 0, ec_dev); return IRQ_HANDLED; }
static irqreturn_t ec_irq_thread(int irq, void *data) { struct cros_ec_device *ec_dev = data; bool wake_event = true; int ret; ret = cros_ec_get_next_event(ec_dev, &wake_event); /* * Signal only if wake host events or any interrupt if * cros_ec_get_next_event() returned an error (default value for * wake_event is true) */ if (wake_event && device_may_wakeup(ec_dev->dev)) pm_wakeup_event(ec_dev->dev, 0); if (ret > 0) blocking_notifier_call_chain(&ec_dev->event_notifier, 0, ec_dev); return IRQ_HANDLED; }
static void cros_ec_drain_events(struct cros_ec_device *ec_dev) { while (cros_ec_get_next_event(ec_dev) > 0) blocking_notifier_call_chain(&ec_dev->event_notifier, 1, ec_dev); }