• L
    ACPI / battery: Accelerate battery resume callback · 9e50bc14
    Lan Tianyu 提交于
    Most time of battery resume callback is spent on executing AML code
    _BTP, _BIF and _BIF to get battery info, status and set alarm. These
    AML methods may access EC operation regions several times and consumes
    time.
    
    These operations are not necessary during devices resume and can run
    during POST_SUSPEND/HIBERNATION event when all processes are thawed.
    
    This also can avoid removing and adding battery sysfs nodes every system
    resume even if the battery unit is not actually changed. The original code
    updates sysfs nodes without check and this seems not reasonable.
    Signed-off-by: NLan Tianyu <tianyu.lan@intel.com>
    Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
    9e50bc14
battery.c 35.3 KB