]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / EC: Add command flushing support.
authorLv Zheng <lv.zheng@intel.com>
Fri, 6 Feb 2015 00:57:59 +0000 (08:57 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 6 Feb 2015 14:48:09 +0000 (15:48 +0100)
commit10fd3dedc206faa250b0cca03ce821e1c76f82e0
treea3fe78560798f5c8e121401125d0cea4c2990d9a
parentd454b1e91badda2318173d11a5aa7188a82f858d
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>
drivers/acpi/ec.c
drivers/acpi/internal.h