• Jason Gerecke's avatar
    HID: wacom: Add ability to provide explicit battery status info · 16e45989
    Jason Gerecke authored
    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: default avatarJason Gerecke <jason.gerecke@wacom.com>
    Reviewed-by: default avatarPing Cheng <ping.cheng@wacom.com>
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
    16e45989
wacom_wac.h 10.7 KB