Hi Ethan, On Fri, Sep 11, 2015 at 1:12 PM, Ge, Ethan <ethan.ge@xxxxxxxxx> wrote: > Hi, > > In file drivers/hid/hid-input.c, function hidinput_setup_battery() will return during connect a BLE mouse because of filed->usage->hid != HID_DC_BATTERYSTRENGTH. And BLE(ATT) HID doesn't register wakeup source in Linux kernel. > > It will cause BLE HID mouse can't wake DUT from S3. Issue can be reproduced by IBUFFALO BSMBB09DS / Dell WM615 mouse / Microsoft arc touch, these all are BLE mouse. > > static bool hidinput_setup_battery(struct hid_device *dev, unsigned report_type, struct hid_field *field) > { > struct power_supply_desc *psy_desc = NULL; > struct power_supply_config psy_cfg = { .drv_data = dev, }; > unsigned quirks; > s32 min, max; > > if (field->usage->hid != HID_DC_BATTERYSTRENGTH) > return false; /* no match */ But this is checked in case the device does not support battery strength support, I thought any input device would register a wakeup source regardless. -- Luiz Augusto von Dentz -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html