• Lv Zheng's avatar
    ACPI / EC: Add command flushing support. · 9887d22a
    Lv Zheng authored
    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: default avatarLv Zheng <lv.zheng@intel.com>
    Tested-by: default avatarOrtwin Glück <odi@odi.ch>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    9887d22a
internal.h 6.85 KB