summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-input.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-20 21:11:42 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-20 21:11:42 -0700
commitd464c92b5234227c1698862a1906827e2e398ae0 (patch)
tree85bfa3a222fd04ab6bee19d0143426c7080553d4 /drivers/hid/hid-input.c
parent3b59bf081622b6446db77ad06c93fe23677bc533 (diff)
parent4a247a4119ee932e06e985e0a95a13c3eed4715b (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID updates from Jiri Kosina: "It contains HID driver updates all over the place -- a lot of new hardware support especially in the multitouch area, including generic handling of all multitouch devices by the hid-multitiouch driver automatically." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (42 commits) HID: multitouch: add PID for Fructel product HID: wacom: Add reporting of wheel for Intuos4 WL HID: wacom: Replace __set_bit with input_set_capability HID: tivo: add support for BT-version (0x1200) HID: wacom: Reset stylus buttons - Intuos4 WL HID: multitouch: detect serial protocol HID: handle all multitouch devices through hid-multitouch HID: multitouch: fix handling of buggy reports descriptors for Dell ST2220T HID: make it possible to force hid-core claim the device HID: multitouch: add support for eGalax 0x722a HID: usbhid: add quirk no_get for quanta 3008 devices HID: multitouch: add more eGalax devices HID: multitouch: add new PID from Ideacom HID: multitouch: add support for Atmel maXTouch 03eb:2118 HID: waltop: Add support for tablet with PID 0038 HID: waltop: Replace original rdescs with links HID: uclogic: Replace original rdescs with links HID: wacom: Add pad buttons reporting on Intuos4 WL HID: wacom: report distance for Intuos4 WL HID: kye: Add support for 3 tablets ...
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r--drivers/hid/hid-input.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 627850a54d34..002781c5a616 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -279,7 +279,8 @@ static enum power_supply_property hidinput_battery_props[] = {
POWER_SUPPLY_PROP_ONLINE,
POWER_SUPPLY_PROP_CAPACITY,
POWER_SUPPLY_PROP_MODEL_NAME,
- POWER_SUPPLY_PROP_STATUS
+ POWER_SUPPLY_PROP_STATUS,
+ POWER_SUPPLY_PROP_SCOPE,
};
#define HID_BATTERY_QUIRK_PERCENT (1 << 0) /* always reports percent */
@@ -344,6 +345,10 @@ static int hidinput_get_battery_property(struct power_supply *psy,
val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
break;
+ case POWER_SUPPLY_PROP_SCOPE:
+ val->intval = POWER_SUPPLY_SCOPE_DEVICE;
+ break;
+
default:
ret = -EINVAL;
break;
@@ -403,6 +408,8 @@ static bool hidinput_setup_battery(struct hid_device *dev, unsigned report_type,
battery->name = NULL;
}
+ power_supply_powers(battery, &dev->dev);
+
out:
return true;
}