summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/internal.h
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2015-02-06 08:57:59 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-02-06 15:48:09 +0100
commit9887d22add48f24ca3a7605c89b0a21ed337f185 (patch)
treea3fe78560798f5c8e121401125d0cea4c2990d9a /drivers/acpi/internal.h
parentad479e7f47ca09c3f3190603ead4d01cf8fe6fa8 (diff)
downloadop-kernel-dev-9887d22add48f24ca3a7605c89b0a21ed337f185.zip
op-kernel-dev-9887d22add48f24ca3a7605c89b0a21ed337f185.tar.gz
ACPI / EC: Add command flushing support.
This patch implements the EC command flushing support. During the grace period indicated by EC_FLAGS_STARTED and EC_FLAGS_STOPPED, all submitted EC command transactions can be completed and new submissions are prevented before suspending so that the EC hardware can be ensured to be in the idle state when the system is resumed. There is a good indicator for flush support: All acpi_ec_submit_request() is invoked after checking driver state with acpi_ec_started() except the first one. This means all code paths can be flushed as fast as possible by discarding the requests occurred after the flush operation. The reference increased for such kind of code path is wrapped by acpi_ec_submit_flushable_request(). Signed-off-by: Lv Zheng <lv.zheng@intel.com> Tested-by: Ortwin Glück <odi@odi.ch> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/internal.h')
-rw-r--r--drivers/acpi/internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h
index dc42078..7dc69d8 100644
--- a/drivers/acpi/internal.h
+++ b/drivers/acpi/internal.h
@@ -122,6 +122,7 @@ struct acpi_ec {
unsigned long data_addr;
unsigned long global_lock;
unsigned long flags;
+ unsigned long reference_count;
struct mutex mutex;
wait_queue_head_t wait;
struct list_head list;
OpenPOWER on IntegriCloud