mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
mfd: cros_ec: Prevent data transfer while device is suspended
The cros_ec driver is still active while the device is suspended. Besides that, it also tries to transfer data even after the I2C host had been suspended. This patch uses a simple flag to prevent this. Signed-off-by: Joseph Lo <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Signed-off-by: Lee Jones <[email protected]>
This commit is contained in:
parent
0f1747692c
commit
a9eb186e13
3 changed files with 9 additions and 0 deletions
|
|
@ -165,6 +165,7 @@ int cros_ec_suspend(struct cros_ec_device *ec_dev)
|
|||
|
||||
disable_irq(ec_dev->irq);
|
||||
ec_dev->was_wake_device = ec_dev->wake_enabled;
|
||||
ec_dev->suspended = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -179,6 +180,7 @@ static void cros_ec_drain_events(struct cros_ec_device *ec_dev)
|
|||
|
||||
int cros_ec_resume(struct cros_ec_device *ec_dev)
|
||||
{
|
||||
ec_dev->suspended = false;
|
||||
enable_irq(ec_dev->irq);
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue