summaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet/wacom_sys.c
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2013-10-15 23:33:00 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-10-15 23:49:24 -0700
commit6e2a6e8063e7b5d53ef1687286468791dd143f96 (patch)
tree0d8f58e172d541dd7a23fbb58e5b1205c02ba755 /drivers/input/tablet/wacom_sys.c
parent0a6ad06c43315ce0e5115d5ce51b04464245dde8 (diff)
downloadlinux-6e2a6e8063e7b5d53ef1687286468791dd143f96.tar.gz
linux-6e2a6e8063e7b5d53ef1687286468791dd143f96.tar.bz2
linux-6e2a6e8063e7b5d53ef1687286468791dd143f96.zip
Input: wacom - export battery scope
This will stop UPower from detecting the tablet as a power supply, and using its battery status to hibernate or switch off the machine. https://bugs.freedesktop.org/show_bug.cgi?id=70321 Signed-off-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/tablet/wacom_sys.c')
-rw-r--r--drivers/input/tablet/wacom_sys.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 79b69ea47f74..e53416a4d7f3 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -1031,6 +1031,7 @@ static void wacom_destroy_leds(struct wacom *wacom)
}
static enum power_supply_property wacom_battery_props[] = {
+ POWER_SUPPLY_PROP_SCOPE,
POWER_SUPPLY_PROP_CAPACITY
};
@@ -1042,6 +1043,9 @@ static int wacom_battery_get_property(struct power_supply *psy,
int ret = 0;
switch (psp) {
+ case POWER_SUPPLY_PROP_SCOPE:
+ val->intval = POWER_SUPPLY_SCOPE_DEVICE;
+ break;
case POWER_SUPPLY_PROP_CAPACITY:
val->intval =
wacom->wacom_wac.battery_capacity * 100 / 31;