linux-stable/drivers/platform/chrome/cros_ec.h
Lalith Rajendran 47ea0ddb1f platform/chrome: cros_ec_lpc: Separate host command and irq disable
Both cros host command and irq disable were moved to suspend
prepare stage from late suspend recently. This is causing EC
to report MKBP event timeouts during suspend stress testing.
When the MKBP event timeouts happen during suspend, subsequent
wakeup of AP by EC using MKBP doesn't happen properly. Move the
irq disabling part back to late suspend stage which is a general
suggestion from the suspend kernel documentaiton to do irq
disable as late as possible.

Fixes: 4b9abbc132 ("platform/chrome: cros_ec_lpc: Move host command to prepare/complete")
Signed-off-by: Lalith Rajendran <lalithkraj@chromium.org>
Link: https://lore.kernel.org/r/20231027160221.v4.1.I1725c3ed27eb7cd9836904e49e8bfa9fb0200a97@changeid
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
2023-10-28 11:13:25 +08:00

27 lines
759 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* ChromeOS Embedded Controller core interface.
*
* Copyright (C) 2020 Google LLC
*/
#ifndef __CROS_EC_H
#define __CROS_EC_H
#include <linux/interrupt.h>
struct cros_ec_device;
int cros_ec_register(struct cros_ec_device *ec_dev);
void cros_ec_unregister(struct cros_ec_device *ec_dev);
int cros_ec_suspend(struct cros_ec_device *ec_dev);
int cros_ec_suspend_late(struct cros_ec_device *ec_dev);
int cros_ec_suspend_prepare(struct cros_ec_device *ec_dev);
int cros_ec_resume(struct cros_ec_device *ec_dev);
int cros_ec_resume_early(struct cros_ec_device *ec_dev);
void cros_ec_resume_complete(struct cros_ec_device *ec_dev);
irqreturn_t cros_ec_irq_thread(int irq, void *data);
#endif /* __CROS_EC_H */