• J
    HID: wacom: Add ability to provide explicit battery status info · 16e45989
    Jason Gerecke 提交于
    At the moment, our driver relies on 'wacom_battery_get_property()' to
    determine the most likely battery state (e.g charging, discharging, or
    full) based on the information available. It is not always possible
    for the function to properly determine this, however. For instance,
    whenever an AES pen leaves proximity the battery state becomes
    indeterminite. This commit adds the ability to provide it with explict
    state information if desired. Whenever explicit state is not required
    (the majority of circumstances), WACOM_POWER_SUPPLY_STATUS_AUTO can
    be used in its place.
    
    Three uses of explicit battery status are added: two wireless disconnect
    paths and the AES case mentioned above.
    Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
    Reviewed-by: NPing Cheng <ping.cheng@wacom.com>
    Signed-off-by: NJiri Kosina <jkosina@suse.cz>
    16e45989
wacom_wac.c 139.3 KB