hidpp 139 drivers/hid/hid-logitech-dj.c struct hid_device *hidpp; hidpp 551 drivers/hid/hid-logitech-dj.c if (djrcv_dev->hidpp && hidpp 552 drivers/hid/hid-logitech-dj.c hid_compare_device_paths(hdev, djrcv_dev->hidpp, sep)) { hidpp 580 drivers/hid/hid-logitech-dj.c if (djrcv_dev->hidpp == hdev) hidpp 581 drivers/hid/hid-logitech-dj.c djrcv_dev->hidpp = NULL; hidpp 623 drivers/hid/hid-logitech-dj.c djrcv_dev->hidpp = hdev; hidpp 647 drivers/hid/hid-logitech-dj.c hid_err(djrcv_dev->hidpp, "%s: can't destroy a NULL device\n", hidpp 656 drivers/hid/hid-logitech-dj.c struct hid_device *djrcv_hdev = djrcv_dev->hidpp; hidpp 797 drivers/hid/hid-logitech-dj.c hid_err(djrcv_dev->hidpp, "%s: logi_dj_recv_query_paired_devices error: %d\n", hidpp 1088 drivers/hid/hid-logitech-dj.c struct hid_device *hdev = djrcv_dev->hidpp; hidpp 1127 drivers/hid/hid-logitech-dj.c retval = hid_hw_raw_request(djrcv_dev->hidpp, hidpp 1162 drivers/hid/hid-logitech-dj.c struct hid_device *hdev = djrcv_dev->hidpp; hidpp 1266 drivers/hid/hid-logitech-dj.c return hid_hw_raw_request(djrcv_dev->hidpp, reportnum, buf, hidpp 1294 drivers/hid/hid-logitech-dj.c ret = hid_hw_raw_request(djrcv_dev->hidpp, out_buf[0], out_buf, hidpp 1767 drivers/hid/hid-logitech-dj.c if (!djrcv_dev || djrcv_dev->hidpp != hdev) hidpp 214 drivers/hid/hid-logitech-hidpp.c struct hidpp_device *hidpp = hid_get_drvdata(hdev); hidpp 225 drivers/hid/hid-logitech-hidpp.c fields_count = hidpp->very_long_report_length; hidpp 237 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_FORCE_OUTPUT_REPORTS) { hidpp 256 drivers/hid/hid-logitech-hidpp.c static int hidpp_send_message_sync(struct hidpp_device *hidpp, hidpp 262 drivers/hid/hid-logitech-hidpp.c mutex_lock(&hidpp->send_mutex); hidpp 264 drivers/hid/hid-logitech-hidpp.c hidpp->send_receive_buf = response; hidpp 265 drivers/hid/hid-logitech-hidpp.c hidpp->answer_available = false; hidpp 273 drivers/hid/hid-logitech-hidpp.c ret = __hidpp_send_report(hidpp->hid_dev, message); hidpp 281 drivers/hid/hid-logitech-hidpp.c if (!wait_event_timeout(hidpp->wait, hidpp->answer_available, hidpp 304 drivers/hid/hid-logitech-hidpp.c mutex_unlock(&hidpp->send_mutex); hidpp 309 drivers/hid/hid-logitech-hidpp.c static int hidpp_send_fap_command_sync(struct hidpp_device *hidpp, hidpp 331 drivers/hid/hid-logitech-hidpp.c ret = hidpp_send_message_sync(hidpp, message, response); hidpp 375 drivers/hid/hid-logitech-hidpp.c struct hidpp_device *hidpp = container_of(work, struct hidpp_device, hidpp 377 drivers/hid/hid-logitech-hidpp.c hidpp_connect_event(hidpp); hidpp 620 drivers/hid/hid-logitech-hidpp.c static int hidpp10_query_battery_status(struct hidpp_device *hidpp) hidpp 625 drivers/hid/hid-logitech-hidpp.c ret = hidpp_send_rap_command_sync(hidpp, hidpp 633 drivers/hid/hid-logitech-hidpp.c hidpp->battery.level = hidpp 636 drivers/hid/hid-logitech-hidpp.c hidpp->battery.status = status; hidpp 638 drivers/hid/hid-logitech-hidpp.c hidpp->battery.online = status == POWER_SUPPLY_STATUS_DISCHARGING || hidpp 672 drivers/hid/hid-logitech-hidpp.c static int hidpp10_query_battery_mileage(struct hidpp_device *hidpp) hidpp 677 drivers/hid/hid-logitech-hidpp.c ret = hidpp_send_rap_command_sync(hidpp, hidpp 685 drivers/hid/hid-logitech-hidpp.c hidpp->battery.capacity = response.rap.params[0]; hidpp 687 drivers/hid/hid-logitech-hidpp.c hidpp->battery.status = status; hidpp 689 drivers/hid/hid-logitech-hidpp.c hidpp->battery.online = status == POWER_SUPPLY_STATUS_DISCHARGING || hidpp 695 drivers/hid/hid-logitech-hidpp.c static int hidpp10_battery_event(struct hidpp_device *hidpp, u8 *data, int size) hidpp 706 drivers/hid/hid-logitech-hidpp.c capacity = hidpp->battery.capacity; hidpp 712 drivers/hid/hid-logitech-hidpp.c level = hidpp->battery.level; hidpp 719 drivers/hid/hid-logitech-hidpp.c changed = capacity != hidpp->battery.capacity || hidpp 720 drivers/hid/hid-logitech-hidpp.c level != hidpp->battery.level || hidpp 721 drivers/hid/hid-logitech-hidpp.c status != hidpp->battery.status; hidpp 724 drivers/hid/hid-logitech-hidpp.c hidpp->battery.online = status == POWER_SUPPLY_STATUS_DISCHARGING || hidpp 728 drivers/hid/hid-logitech-hidpp.c hidpp->battery.level = level; hidpp 729 drivers/hid/hid-logitech-hidpp.c hidpp->battery.status = status; hidpp 730 drivers/hid/hid-logitech-hidpp.c if (hidpp->battery.ps) hidpp 731 drivers/hid/hid-logitech-hidpp.c power_supply_changed(hidpp->battery.ps); hidpp 777 drivers/hid/hid-logitech-hidpp.c static int hidpp_unifying_get_serial(struct hidpp_device *hidpp, u32 *serial) hidpp 783 drivers/hid/hid-logitech-hidpp.c ret = hidpp_send_rap_command_sync(hidpp, hidpp 799 drivers/hid/hid-logitech-hidpp.c static int hidpp_unifying_init(struct hidpp_device *hidpp) hidpp 801 drivers/hid/hid-logitech-hidpp.c struct hid_device *hdev = hidpp->hid_dev; hidpp 806 drivers/hid/hid-logitech-hidpp.c ret = hidpp_unifying_get_serial(hidpp, &serial); hidpp 814 drivers/hid/hid-logitech-hidpp.c name = hidpp_unifying_get_name(hidpp); hidpp 835 drivers/hid/hid-logitech-hidpp.c static int hidpp_root_get_feature(struct hidpp_device *hidpp, u16 feature, hidpp 842 drivers/hid/hid-logitech-hidpp.c ret = hidpp_send_fap_command_sync(hidpp, hidpp 858 drivers/hid/hid-logitech-hidpp.c static int hidpp_root_get_protocol_version(struct hidpp_device *hidpp) hidpp 865 drivers/hid/hid-logitech-hidpp.c ret = hidpp_send_rap_command_sync(hidpp, hidpp 872 drivers/hid/hid-logitech-hidpp.c hidpp->protocol_major = 1; hidpp 873 drivers/hid/hid-logitech-hidpp.c hidpp->protocol_minor = 0; hidpp 882 drivers/hid/hid-logitech-hidpp.c hid_err(hidpp->hid_dev, "%s: received protocol error 0x%02x\n", hidpp 890 drivers/hid/hid-logitech-hidpp.c hid_err(hidpp->hid_dev, "%s: ping mismatch 0x%02x != 0x%02x\n", hidpp 895 drivers/hid/hid-logitech-hidpp.c hidpp->protocol_major = response.rap.params[0]; hidpp 896 drivers/hid/hid-logitech-hidpp.c hidpp->protocol_minor = response.rap.params[1]; hidpp 899 drivers/hid/hid-logitech-hidpp.c hid_info(hidpp->hid_dev, "HID++ %u.%u device connected.\n", hidpp 900 drivers/hid/hid-logitech-hidpp.c hidpp->protocol_major, hidpp->protocol_minor); hidpp 914 drivers/hid/hid-logitech-hidpp.c static int hidpp_devicenametype_get_count(struct hidpp_device *hidpp, hidpp 920 drivers/hid/hid-logitech-hidpp.c ret = hidpp_send_fap_command_sync(hidpp, feature_index, hidpp 924 drivers/hid/hid-logitech-hidpp.c hid_err(hidpp->hid_dev, "%s: received protocol error 0x%02x\n", hidpp 936 drivers/hid/hid-logitech-hidpp.c static int hidpp_devicenametype_get_device_name(struct hidpp_device *hidpp, hidpp 943 drivers/hid/hid-logitech-hidpp.c ret = hidpp_send_fap_command_sync(hidpp, feature_index, hidpp 948 drivers/hid/hid-logitech-hidpp.c hid_err(hidpp->hid_dev, "%s: received protocol error 0x%02x\n", hidpp 957 drivers/hid/hid-logitech-hidpp.c count = hidpp->very_long_report_length - 4; hidpp 978 drivers/hid/hid-logitech-hidpp.c static char *hidpp_get_device_name(struct hidpp_device *hidpp) hidpp 987 drivers/hid/hid-logitech-hidpp.c ret = hidpp_root_get_feature(hidpp, HIDPP_PAGE_GET_DEVICE_NAME_TYPE, hidpp 992 drivers/hid/hid-logitech-hidpp.c ret = hidpp_devicenametype_get_count(hidpp, feature_index, hidpp 1002 drivers/hid/hid-logitech-hidpp.c ret = hidpp_devicenametype_get_device_name(hidpp, hidpp 1091 drivers/hid/hid-logitech-hidpp.c static int hidpp20_batterylevel_get_battery_capacity(struct hidpp_device *hidpp, hidpp 1102 drivers/hid/hid-logitech-hidpp.c ret = hidpp_send_fap_command_sync(hidpp, feature_index, hidpp 1109 drivers/hid/hid-logitech-hidpp.c hid_err(hidpp->hid_dev, "%s: received protocol error 0x%02x\n", hidpp 1123 drivers/hid/hid-logitech-hidpp.c static int hidpp20_batterylevel_get_battery_info(struct hidpp_device *hidpp, hidpp 1131 drivers/hid/hid-logitech-hidpp.c ret = hidpp_send_fap_command_sync(hidpp, feature_index, hidpp 1135 drivers/hid/hid-logitech-hidpp.c hid_err(hidpp->hid_dev, "%s: received protocol error 0x%02x\n", hidpp 1146 drivers/hid/hid-logitech-hidpp.c hidpp->capabilities |= HIDPP_CAPABILITY_BATTERY_LEVEL_STATUS; hidpp 1148 drivers/hid/hid-logitech-hidpp.c hidpp->capabilities |= HIDPP_CAPABILITY_BATTERY_MILEAGE; hidpp 1153 drivers/hid/hid-logitech-hidpp.c static int hidpp20_query_battery_info(struct hidpp_device *hidpp) hidpp 1159 drivers/hid/hid-logitech-hidpp.c if (hidpp->battery.feature_index == 0xff) { hidpp 1160 drivers/hid/hid-logitech-hidpp.c ret = hidpp_root_get_feature(hidpp, hidpp 1162 drivers/hid/hid-logitech-hidpp.c &hidpp->battery.feature_index, hidpp 1168 drivers/hid/hid-logitech-hidpp.c ret = hidpp20_batterylevel_get_battery_capacity(hidpp, hidpp 1169 drivers/hid/hid-logitech-hidpp.c hidpp->battery.feature_index, hidpp 1175 drivers/hid/hid-logitech-hidpp.c ret = hidpp20_batterylevel_get_battery_info(hidpp, hidpp 1176 drivers/hid/hid-logitech-hidpp.c hidpp->battery.feature_index); hidpp 1180 drivers/hid/hid-logitech-hidpp.c hidpp->battery.status = status; hidpp 1181 drivers/hid/hid-logitech-hidpp.c hidpp->battery.capacity = capacity; hidpp 1182 drivers/hid/hid-logitech-hidpp.c hidpp->battery.level = level; hidpp 1184 drivers/hid/hid-logitech-hidpp.c hidpp->battery.online = status == POWER_SUPPLY_STATUS_DISCHARGING || hidpp 1190 drivers/hid/hid-logitech-hidpp.c static int hidpp20_battery_event(struct hidpp_device *hidpp, hidpp 1197 drivers/hid/hid-logitech-hidpp.c if (report->fap.feature_index != hidpp->battery.feature_index || hidpp 1207 drivers/hid/hid-logitech-hidpp.c hidpp->battery.online = status == POWER_SUPPLY_STATUS_DISCHARGING || hidpp 1210 drivers/hid/hid-logitech-hidpp.c changed = capacity != hidpp->battery.capacity || hidpp 1211 drivers/hid/hid-logitech-hidpp.c level != hidpp->battery.level || hidpp 1212 drivers/hid/hid-logitech-hidpp.c status != hidpp->battery.status; hidpp 1215 drivers/hid/hid-logitech-hidpp.c hidpp->battery.level = level; hidpp 1216 drivers/hid/hid-logitech-hidpp.c hidpp->battery.capacity = capacity; hidpp 1217 drivers/hid/hid-logitech-hidpp.c hidpp->battery.status = status; hidpp 1218 drivers/hid/hid-logitech-hidpp.c if (hidpp->battery.ps) hidpp 1219 drivers/hid/hid-logitech-hidpp.c power_supply_changed(hidpp->battery.ps); hidpp 1240 drivers/hid/hid-logitech-hidpp.c struct hidpp_device *hidpp = power_supply_get_drvdata(psy); hidpp 1245 drivers/hid/hid-logitech-hidpp.c val->intval = hidpp->battery.status; hidpp 1248 drivers/hid/hid-logitech-hidpp.c val->intval = hidpp->battery.capacity; hidpp 1251 drivers/hid/hid-logitech-hidpp.c val->intval = hidpp->battery.level; hidpp 1257 drivers/hid/hid-logitech-hidpp.c val->intval = hidpp->battery.online; hidpp 1260 drivers/hid/hid-logitech-hidpp.c if (!strncmp(hidpp->name, "Logitech ", 9)) hidpp 1261 drivers/hid/hid-logitech-hidpp.c val->strval = hidpp->name + 9; hidpp 1263 drivers/hid/hid-logitech-hidpp.c val->strval = hidpp->name; hidpp 1269 drivers/hid/hid-logitech-hidpp.c val->strval = hidpp->hid_dev->uniq; hidpp 1287 drivers/hid/hid-logitech-hidpp.c static int hidpp_hrs_set_highres_scrolling_mode(struct hidpp_device *hidpp, hidpp 1296 drivers/hid/hid-logitech-hidpp.c ret = hidpp_root_get_feature(hidpp, hidpp 1304 drivers/hid/hid-logitech-hidpp.c ret = hidpp_send_fap_command_sync(hidpp, feature_index, hidpp 1322 drivers/hid/hid-logitech-hidpp.c static int hidpp_hrw_get_wheel_capability(struct hidpp_device *hidpp, hidpp 1330 drivers/hid/hid-logitech-hidpp.c ret = hidpp_root_get_feature(hidpp, HIDPP_PAGE_HIRES_WHEEL, hidpp 1335 drivers/hid/hid-logitech-hidpp.c ret = hidpp_send_fap_command_sync(hidpp, feature_index, hidpp 1344 drivers/hid/hid-logitech-hidpp.c hid_warn(hidpp->hid_dev, hidpp 1349 drivers/hid/hid-logitech-hidpp.c static int hidpp_hrw_set_wheel_mode(struct hidpp_device *hidpp, bool invert, hidpp 1358 drivers/hid/hid-logitech-hidpp.c ret = hidpp_root_get_feature(hidpp, HIDPP_PAGE_HIRES_WHEEL, hidpp 1367 drivers/hid/hid-logitech-hidpp.c return hidpp_send_fap_command_sync(hidpp, feature_index, hidpp 1384 drivers/hid/hid-logitech-hidpp.c static int hidpp_solar_request_battery_event(struct hidpp_device *hidpp) hidpp 1391 drivers/hid/hid-logitech-hidpp.c if (hidpp->battery.feature_index == 0xff) { hidpp 1392 drivers/hid/hid-logitech-hidpp.c ret = hidpp_root_get_feature(hidpp, hidpp 1394 drivers/hid/hid-logitech-hidpp.c &hidpp->battery.solar_feature_index, hidpp 1400 drivers/hid/hid-logitech-hidpp.c ret = hidpp_send_fap_command_sync(hidpp, hidpp 1401 drivers/hid/hid-logitech-hidpp.c hidpp->battery.solar_feature_index, hidpp 1405 drivers/hid/hid-logitech-hidpp.c hid_err(hidpp->hid_dev, "%s: received protocol error 0x%02x\n", hidpp 1412 drivers/hid/hid-logitech-hidpp.c hidpp->capabilities |= HIDPP_CAPABILITY_BATTERY_MILEAGE; hidpp 1417 drivers/hid/hid-logitech-hidpp.c static int hidpp_solar_battery_event(struct hidpp_device *hidpp, hidpp 1427 drivers/hid/hid-logitech-hidpp.c if (report->fap.feature_index != hidpp->battery.solar_feature_index || hidpp 1445 drivers/hid/hid-logitech-hidpp.c if (capacity < hidpp->battery.capacity) hidpp 1455 drivers/hid/hid-logitech-hidpp.c hidpp->battery.online = true; hidpp 1456 drivers/hid/hid-logitech-hidpp.c if (capacity != hidpp->battery.capacity || hidpp 1457 drivers/hid/hid-logitech-hidpp.c status != hidpp->battery.status) { hidpp 1458 drivers/hid/hid-logitech-hidpp.c hidpp->battery.capacity = capacity; hidpp 1459 drivers/hid/hid-logitech-hidpp.c hidpp->battery.status = status; hidpp 1460 drivers/hid/hid-logitech-hidpp.c if (hidpp->battery.ps) hidpp 1461 drivers/hid/hid-logitech-hidpp.c power_supply_changed(hidpp->battery.ps); hidpp 1486 drivers/hid/hid-logitech-hidpp.c static int hidpp_touchpad_fw_items_set(struct hidpp_device *hidpp, hidpp 1494 drivers/hid/hid-logitech-hidpp.c ret = hidpp_send_fap_command_sync(hidpp, feature_index, hidpp 1498 drivers/hid/hid-logitech-hidpp.c hid_err(hidpp->hid_dev, "%s: received protocol error 0x%02x\n", hidpp 1557 drivers/hid/hid-logitech-hidpp.c static int hidpp_touchpad_get_raw_info(struct hidpp_device *hidpp, hidpp 1564 drivers/hid/hid-logitech-hidpp.c ret = hidpp_send_fap_command_sync(hidpp, feature_index, hidpp 1568 drivers/hid/hid-logitech-hidpp.c hid_err(hidpp->hid_dev, "%s: received protocol error 0x%02x\n", hidpp 1681 drivers/hid/hid-logitech-hidpp.c struct hidpp_device *hidpp; hidpp 1773 drivers/hid/hid-logitech-hidpp.c ret = hidpp_send_fap_command_sync(data->hidpp, data->feature_index, hidpp 1777 drivers/hid/hid-logitech-hidpp.c hid_err(data->hidpp->hid_dev, "Failed to send command to device!\n"); hidpp 1840 drivers/hid/hid-logitech-hidpp.c hid_warn(data->hidpp->hid_dev, "Force feedback command queue contains %d commands, causing substantial delays!", s); hidpp 1899 drivers/hid/hid-logitech-hidpp.c hid_err(data->hidpp->hid_dev, "Unexpected periodic waveform type %i!\n", effect->u.periodic.waveform); hidpp 1984 drivers/hid/hid-logitech-hidpp.c hid_err(data->hidpp->hid_dev, "Unexpected force type %i!\n", effect->type); hidpp 2084 drivers/hid/hid-logitech-hidpp.c struct hid_device *hid = data->hidpp->hid_dev; hidpp 2093 drivers/hid/hid-logitech-hidpp.c static int hidpp_ff_init(struct hidpp_device *hidpp, hidpp 2096 drivers/hid/hid-logitech-hidpp.c struct hid_device *hid = hidpp->hid_dev; hidpp 2152 drivers/hid/hid-logitech-hidpp.c data->hidpp = hidpp; hidpp 2168 drivers/hid/hid-logitech-hidpp.c error = device_create_file(&(hidpp->hid_dev->dev), &dev_attr_range); hidpp 2170 drivers/hid/hid-logitech-hidpp.c hid_warn(hidpp->hid_dev, "Unable to create sysfs interface for \"range\", errno %d!\n", error); hidpp 2210 drivers/hid/hid-logitech-hidpp.c static void wtp_populate_input(struct hidpp_device *hidpp, hidpp 2213 drivers/hid/hid-logitech-hidpp.c struct wtp_data *wd = hidpp->private_data; hidpp 2230 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_WTP_PHYSICAL_BUTTONS) hidpp 2239 drivers/hid/hid-logitech-hidpp.c static void wtp_touch_event(struct hidpp_device *hidpp, hidpp 2242 drivers/hid/hid-logitech-hidpp.c struct wtp_data *wd = hidpp->private_data; hidpp 2249 drivers/hid/hid-logitech-hidpp.c slot = input_mt_get_slot_by_key(hidpp->input, touch_report->finger_id); hidpp 2251 drivers/hid/hid-logitech-hidpp.c input_mt_slot(hidpp->input, slot); hidpp 2252 drivers/hid/hid-logitech-hidpp.c input_mt_report_slot_state(hidpp->input, MT_TOOL_FINGER, hidpp 2255 drivers/hid/hid-logitech-hidpp.c input_event(hidpp->input, EV_ABS, ABS_MT_POSITION_X, hidpp 2257 drivers/hid/hid-logitech-hidpp.c input_event(hidpp->input, EV_ABS, ABS_MT_POSITION_Y, hidpp 2260 drivers/hid/hid-logitech-hidpp.c input_event(hidpp->input, EV_ABS, ABS_MT_PRESSURE, hidpp 2265 drivers/hid/hid-logitech-hidpp.c static void wtp_send_raw_xy_event(struct hidpp_device *hidpp, hidpp 2271 drivers/hid/hid-logitech-hidpp.c wtp_touch_event(hidpp, &(raw->fingers[i])); hidpp 2274 drivers/hid/hid-logitech-hidpp.c !(hidpp->quirks & HIDPP_QUIRK_WTP_PHYSICAL_BUTTONS)) hidpp 2275 drivers/hid/hid-logitech-hidpp.c input_event(hidpp->input, EV_KEY, BTN_LEFT, raw->button); hidpp 2278 drivers/hid/hid-logitech-hidpp.c input_mt_sync_frame(hidpp->input); hidpp 2279 drivers/hid/hid-logitech-hidpp.c input_sync(hidpp->input); hidpp 2283 drivers/hid/hid-logitech-hidpp.c static int wtp_mouse_raw_xy_event(struct hidpp_device *hidpp, u8 *data) hidpp 2285 drivers/hid/hid-logitech-hidpp.c struct wtp_data *wd = hidpp->private_data; hidpp 2317 drivers/hid/hid-logitech-hidpp.c wtp_send_raw_xy_event(hidpp, &raw); hidpp 2324 drivers/hid/hid-logitech-hidpp.c struct hidpp_device *hidpp = hid_get_drvdata(hdev); hidpp 2325 drivers/hid/hid-logitech-hidpp.c struct wtp_data *wd = hidpp->private_data; hidpp 2329 drivers/hid/hid-logitech-hidpp.c if (!wd || !hidpp->input) hidpp 2339 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_WTP_PHYSICAL_BUTTONS) { hidpp 2340 drivers/hid/hid-logitech-hidpp.c input_event(hidpp->input, EV_KEY, BTN_LEFT, hidpp 2342 drivers/hid/hid-logitech-hidpp.c input_event(hidpp->input, EV_KEY, BTN_RIGHT, hidpp 2344 drivers/hid/hid-logitech-hidpp.c input_sync(hidpp->input); hidpp 2349 drivers/hid/hid-logitech-hidpp.c return wtp_mouse_raw_xy_event(hidpp, &data[7]); hidpp 2356 drivers/hid/hid-logitech-hidpp.c hidpp_touchpad_raw_xy_event(hidpp, data + 4, &raw); hidpp 2358 drivers/hid/hid-logitech-hidpp.c wtp_send_raw_xy_event(hidpp, &raw); hidpp 2365 drivers/hid/hid-logitech-hidpp.c static int wtp_get_config(struct hidpp_device *hidpp) hidpp 2367 drivers/hid/hid-logitech-hidpp.c struct wtp_data *wd = hidpp->private_data; hidpp 2372 drivers/hid/hid-logitech-hidpp.c ret = hidpp_root_get_feature(hidpp, HIDPP_PAGE_TOUCHPAD_RAW_XY, hidpp 2378 drivers/hid/hid-logitech-hidpp.c ret = hidpp_touchpad_get_raw_info(hidpp, wd->mt_feature_index, hidpp 2396 drivers/hid/hid-logitech-hidpp.c struct hidpp_device *hidpp = hid_get_drvdata(hdev); hidpp 2404 drivers/hid/hid-logitech-hidpp.c hidpp->private_data = wd; hidpp 2411 drivers/hid/hid-logitech-hidpp.c struct hidpp_device *hidpp = hid_get_drvdata(hdev); hidpp 2412 drivers/hid/hid-logitech-hidpp.c struct wtp_data *wd = hidpp->private_data; hidpp 2416 drivers/hid/hid-logitech-hidpp.c ret = wtp_get_config(hidpp); hidpp 2423 drivers/hid/hid-logitech-hidpp.c return hidpp_touchpad_set_raw_report_state(hidpp, wd->mt_feature_index, hidpp 2491 drivers/hid/hid-logitech-hidpp.c struct hidpp_device *hidpp = hid_get_drvdata(hdev); hidpp 2494 drivers/hid/hid-logitech-hidpp.c if (!hidpp->input) { hidpp 2521 drivers/hid/hid-logitech-hidpp.c input_report_key(hidpp->input, BTN_MIDDLE, 1); hidpp 2524 drivers/hid/hid-logitech-hidpp.c input_report_key(hidpp->input, BTN_FORWARD, 1); hidpp 2527 drivers/hid/hid-logitech-hidpp.c input_report_key(hidpp->input, BTN_BACK, 1); hidpp 2530 drivers/hid/hid-logitech-hidpp.c input_report_key(hidpp->input, BTN_BACK, 0); hidpp 2531 drivers/hid/hid-logitech-hidpp.c input_report_key(hidpp->input, BTN_FORWARD, 0); hidpp 2532 drivers/hid/hid-logitech-hidpp.c input_report_key(hidpp->input, BTN_MIDDLE, 0); hidpp 2538 drivers/hid/hid-logitech-hidpp.c input_sync(hidpp->input); hidpp 2552 drivers/hid/hid-logitech-hidpp.c input_report_key(hidpp->input, BTN_LEFT, hidpp 2554 drivers/hid/hid-logitech-hidpp.c input_report_key(hidpp->input, BTN_RIGHT, hidpp 2558 drivers/hid/hid-logitech-hidpp.c input_report_rel(hidpp->input, REL_HWHEEL, -1); hidpp 2559 drivers/hid/hid-logitech-hidpp.c input_report_rel(hidpp->input, REL_HWHEEL_HI_RES, hidpp 2562 drivers/hid/hid-logitech-hidpp.c input_report_rel(hidpp->input, REL_HWHEEL, 1); hidpp 2563 drivers/hid/hid-logitech-hidpp.c input_report_rel(hidpp->input, REL_HWHEEL_HI_RES, hidpp 2568 drivers/hid/hid-logitech-hidpp.c input_report_rel(hidpp->input, REL_X, v); hidpp 2571 drivers/hid/hid-logitech-hidpp.c input_report_rel(hidpp->input, REL_Y, v); hidpp 2575 drivers/hid/hid-logitech-hidpp.c hidpp_scroll_counter_handle_scroll(hidpp->input, hidpp 2576 drivers/hid/hid-logitech-hidpp.c &hidpp->vertical_wheel_counter, v); hidpp 2578 drivers/hid/hid-logitech-hidpp.c input_sync(hidpp->input); hidpp 2584 drivers/hid/hid-logitech-hidpp.c static void m560_populate_input(struct hidpp_device *hidpp, hidpp 2628 drivers/hid/hid-logitech-hidpp.c static int k400_disable_tap_to_click(struct hidpp_device *hidpp) hidpp 2630 drivers/hid/hid-logitech-hidpp.c struct k400_private_data *k400 = hidpp->private_data; hidpp 2636 drivers/hid/hid-logitech-hidpp.c ret = hidpp_root_get_feature(hidpp, hidpp 2644 drivers/hid/hid-logitech-hidpp.c ret = hidpp_touchpad_fw_items_set(hidpp, k400->feature_index, &items); hidpp 2653 drivers/hid/hid-logitech-hidpp.c struct hidpp_device *hidpp = hid_get_drvdata(hdev); hidpp 2661 drivers/hid/hid-logitech-hidpp.c hidpp->private_data = k400; hidpp 2668 drivers/hid/hid-logitech-hidpp.c struct hidpp_device *hidpp = hid_get_drvdata(hdev); hidpp 2673 drivers/hid/hid-logitech-hidpp.c return k400_disable_tap_to_click(hidpp); hidpp 2682 drivers/hid/hid-logitech-hidpp.c static int g920_ff_set_autocenter(struct hidpp_device *hidpp, hidpp 2694 drivers/hid/hid-logitech-hidpp.c ret = hidpp_send_fap_command_sync(hidpp, data->feature_index, hidpp 2699 drivers/hid/hid-logitech-hidpp.c hid_warn(hidpp->hid_dev, "Failed to autocenter device!\n"); hidpp 2706 drivers/hid/hid-logitech-hidpp.c static int g920_get_config(struct hidpp_device *hidpp, hidpp 2716 drivers/hid/hid-logitech-hidpp.c ret = hidpp_root_get_feature(hidpp, HIDPP_PAGE_G920_FORCE_FEEDBACK, hidpp 2722 drivers/hid/hid-logitech-hidpp.c ret = hidpp_send_fap_command_sync(hidpp, data->feature_index, hidpp 2729 drivers/hid/hid-logitech-hidpp.c hid_err(hidpp->hid_dev, hidpp 2737 drivers/hid/hid-logitech-hidpp.c ret = hidpp_send_fap_command_sync(hidpp, data->feature_index, hidpp 2742 drivers/hid/hid-logitech-hidpp.c hid_warn(hidpp->hid_dev, "Failed to reset all forces!\n"); hidpp 2744 drivers/hid/hid-logitech-hidpp.c ret = hidpp_send_fap_command_sync(hidpp, data->feature_index, hidpp 2749 drivers/hid/hid-logitech-hidpp.c hid_warn(hidpp->hid_dev, hidpp 2756 drivers/hid/hid-logitech-hidpp.c ret = hidpp_send_fap_command_sync(hidpp, data->feature_index, hidpp 2761 drivers/hid/hid-logitech-hidpp.c hid_warn(hidpp->hid_dev, hidpp 2768 drivers/hid/hid-logitech-hidpp.c return g920_ff_set_autocenter(hidpp, data); hidpp 2774 drivers/hid/hid-logitech-hidpp.c static int hidpp10_wheel_connect(struct hidpp_device *hidpp) hidpp 2776 drivers/hid/hid-logitech-hidpp.c return hidpp10_set_register(hidpp, HIDPP_REG_ENABLE_REPORTS, 0, hidpp 2781 drivers/hid/hid-logitech-hidpp.c static int hidpp10_wheel_raw_event(struct hidpp_device *hidpp, hidpp 2786 drivers/hid/hid-logitech-hidpp.c if (!hidpp->input) hidpp 2798 drivers/hid/hid-logitech-hidpp.c input_report_rel(hidpp->input, REL_WHEEL, value); hidpp 2799 drivers/hid/hid-logitech-hidpp.c input_report_rel(hidpp->input, REL_WHEEL_HI_RES, value * 120); hidpp 2800 drivers/hid/hid-logitech-hidpp.c input_report_rel(hidpp->input, REL_HWHEEL, hvalue); hidpp 2801 drivers/hid/hid-logitech-hidpp.c input_report_rel(hidpp->input, REL_HWHEEL_HI_RES, hvalue * 120); hidpp 2802 drivers/hid/hid-logitech-hidpp.c input_sync(hidpp->input); hidpp 2807 drivers/hid/hid-logitech-hidpp.c static void hidpp10_wheel_populate_input(struct hidpp_device *hidpp, hidpp 2820 drivers/hid/hid-logitech-hidpp.c static int hidpp10_extra_mouse_buttons_connect(struct hidpp_device *hidpp) hidpp 2822 drivers/hid/hid-logitech-hidpp.c return hidpp10_set_register(hidpp, HIDPP_REG_ENABLE_REPORTS, 0, hidpp 2827 drivers/hid/hid-logitech-hidpp.c static int hidpp10_extra_mouse_buttons_raw_event(struct hidpp_device *hidpp, hidpp 2832 drivers/hid/hid-logitech-hidpp.c if (!hidpp->input) hidpp 2849 drivers/hid/hid-logitech-hidpp.c input_report_key(hidpp->input, BTN_MOUSE + i, hidpp 2854 drivers/hid/hid-logitech-hidpp.c input_report_key(hidpp->input, BTN_MISC + i, hidpp 2857 drivers/hid/hid-logitech-hidpp.c input_sync(hidpp->input); hidpp 2862 drivers/hid/hid-logitech-hidpp.c struct hidpp_device *hidpp, struct input_dev *input_dev) hidpp 2880 drivers/hid/hid-logitech-hidpp.c static u8 *hidpp10_consumer_keys_report_fixup(struct hidpp_device *hidpp, hidpp 2908 drivers/hid/hid-logitech-hidpp.c static int hidpp10_consumer_keys_connect(struct hidpp_device *hidpp) hidpp 2910 drivers/hid/hid-logitech-hidpp.c return hidpp10_set_register(hidpp, HIDPP_REG_ENABLE_REPORTS, 0, hidpp 2915 drivers/hid/hid-logitech-hidpp.c static int hidpp10_consumer_keys_raw_event(struct hidpp_device *hidpp, hidpp 2934 drivers/hid/hid-logitech-hidpp.c hid_report_raw_event(hidpp->hid_dev, HID_INPUT_REPORT, hidpp 2944 drivers/hid/hid-logitech-hidpp.c static int hi_res_scroll_enable(struct hidpp_device *hidpp) hidpp 2949 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_HI_RES_SCROLL_X2121) { hidpp 2950 drivers/hid/hid-logitech-hidpp.c ret = hidpp_hrw_set_wheel_mode(hidpp, false, true, false); hidpp 2952 drivers/hid/hid-logitech-hidpp.c ret = hidpp_hrw_get_wheel_capability(hidpp, &multiplier); hidpp 2953 drivers/hid/hid-logitech-hidpp.c } else if (hidpp->quirks & HIDPP_QUIRK_HI_RES_SCROLL_X2120) { hidpp 2954 drivers/hid/hid-logitech-hidpp.c ret = hidpp_hrs_set_highres_scrolling_mode(hidpp, true, hidpp 2957 drivers/hid/hid-logitech-hidpp.c ret = hidpp10_enable_scrolling_acceleration(hidpp); hidpp 2966 drivers/hid/hid-logitech-hidpp.c hidpp->vertical_wheel_counter.wheel_multiplier = multiplier; hidpp 2967 drivers/hid/hid-logitech-hidpp.c hid_info(hidpp->hid_dev, "multiplier = %d\n", multiplier); hidpp 2978 drivers/hid/hid-logitech-hidpp.c struct hidpp_device *hidpp = hid_get_drvdata(hdev); hidpp 2980 drivers/hid/hid-logitech-hidpp.c if (!hidpp) hidpp 2985 drivers/hid/hid-logitech-hidpp.c (hidpp->quirks & HIDPP_QUIRK_HIDPP_CONSUMER_VENDOR_KEYS)) hidpp 2986 drivers/hid/hid-logitech-hidpp.c rdesc = hidpp10_consumer_keys_report_fixup(hidpp, rdesc, rsize); hidpp 2995 drivers/hid/hid-logitech-hidpp.c struct hidpp_device *hidpp = hid_get_drvdata(hdev); hidpp 2997 drivers/hid/hid-logitech-hidpp.c if (!hidpp) hidpp 3000 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_CLASS_WTP) hidpp 3002 drivers/hid/hid-logitech-hidpp.c else if (hidpp->quirks & HIDPP_QUIRK_CLASS_M560 && hidpp 3013 drivers/hid/hid-logitech-hidpp.c struct hidpp_device *hidpp = hid_get_drvdata(hdev); hidpp 3015 drivers/hid/hid-logitech-hidpp.c if (!hidpp) hidpp 3019 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_CLASS_G920) { hidpp 3031 drivers/hid/hid-logitech-hidpp.c static void hidpp_populate_input(struct hidpp_device *hidpp, hidpp 3034 drivers/hid/hid-logitech-hidpp.c hidpp->input = input; hidpp 3036 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_CLASS_WTP) hidpp 3037 drivers/hid/hid-logitech-hidpp.c wtp_populate_input(hidpp, input); hidpp 3038 drivers/hid/hid-logitech-hidpp.c else if (hidpp->quirks & HIDPP_QUIRK_CLASS_M560) hidpp 3039 drivers/hid/hid-logitech-hidpp.c m560_populate_input(hidpp, input); hidpp 3041 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_HIDPP_WHEELS) hidpp 3042 drivers/hid/hid-logitech-hidpp.c hidpp10_wheel_populate_input(hidpp, input); hidpp 3044 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_HIDPP_EXTRA_MOUSE_BTNS) hidpp 3045 drivers/hid/hid-logitech-hidpp.c hidpp10_extra_mouse_buttons_populate_input(hidpp, input); hidpp 3051 drivers/hid/hid-logitech-hidpp.c struct hidpp_device *hidpp = hid_get_drvdata(hdev); hidpp 3054 drivers/hid/hid-logitech-hidpp.c if (!hidpp) hidpp 3057 drivers/hid/hid-logitech-hidpp.c hidpp_populate_input(hidpp, input); hidpp 3062 drivers/hid/hid-logitech-hidpp.c static int hidpp_raw_hidpp_event(struct hidpp_device *hidpp, u8 *data, hidpp 3065 drivers/hid/hid-logitech-hidpp.c struct hidpp_report *question = hidpp->send_receive_buf; hidpp 3066 drivers/hid/hid-logitech-hidpp.c struct hidpp_report *answer = hidpp->send_receive_buf; hidpp 3074 drivers/hid/hid-logitech-hidpp.c if (unlikely(mutex_is_locked(&hidpp->send_mutex))) { hidpp 3082 drivers/hid/hid-logitech-hidpp.c hidpp->answer_available = true; hidpp 3083 drivers/hid/hid-logitech-hidpp.c wake_up(&hidpp->wait); hidpp 3095 drivers/hid/hid-logitech-hidpp.c atomic_set(&hidpp->connected, hidpp 3097 drivers/hid/hid-logitech-hidpp.c if (schedule_work(&hidpp->work) == 0) hidpp 3102 drivers/hid/hid-logitech-hidpp.c if (hidpp->capabilities & HIDPP_CAPABILITY_HIDPP20_BATTERY) { hidpp 3103 drivers/hid/hid-logitech-hidpp.c ret = hidpp20_battery_event(hidpp, data, size); hidpp 3106 drivers/hid/hid-logitech-hidpp.c ret = hidpp_solar_battery_event(hidpp, data, size); hidpp 3111 drivers/hid/hid-logitech-hidpp.c if (hidpp->capabilities & HIDPP_CAPABILITY_HIDPP10_BATTERY) { hidpp 3112 drivers/hid/hid-logitech-hidpp.c ret = hidpp10_battery_event(hidpp, data, size); hidpp 3117 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_HIDPP_WHEELS) { hidpp 3118 drivers/hid/hid-logitech-hidpp.c ret = hidpp10_wheel_raw_event(hidpp, data, size); hidpp 3123 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_HIDPP_EXTRA_MOUSE_BTNS) { hidpp 3124 drivers/hid/hid-logitech-hidpp.c ret = hidpp10_extra_mouse_buttons_raw_event(hidpp, data, size); hidpp 3129 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_HIDPP_CONSUMER_VENDOR_KEYS) { hidpp 3130 drivers/hid/hid-logitech-hidpp.c ret = hidpp10_consumer_keys_raw_event(hidpp, data, size); hidpp 3141 drivers/hid/hid-logitech-hidpp.c struct hidpp_device *hidpp = hid_get_drvdata(hdev); hidpp 3144 drivers/hid/hid-logitech-hidpp.c if (!hidpp) hidpp 3150 drivers/hid/hid-logitech-hidpp.c if (size != hidpp->very_long_report_length) { hidpp 3155 drivers/hid/hid-logitech-hidpp.c ret = hidpp_raw_hidpp_event(hidpp, data, size); hidpp 3163 drivers/hid/hid-logitech-hidpp.c ret = hidpp_raw_hidpp_event(hidpp, data, size); hidpp 3171 drivers/hid/hid-logitech-hidpp.c ret = hidpp_raw_hidpp_event(hidpp, data, size); hidpp 3180 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_CLASS_WTP) hidpp 3182 drivers/hid/hid-logitech-hidpp.c else if (hidpp->quirks & HIDPP_QUIRK_CLASS_M560) hidpp 3194 drivers/hid/hid-logitech-hidpp.c struct hidpp_device *hidpp = hid_get_drvdata(hdev); hidpp 3197 drivers/hid/hid-logitech-hidpp.c if (!hidpp) hidpp 3200 drivers/hid/hid-logitech-hidpp.c counter = &hidpp->vertical_wheel_counter; hidpp 3206 drivers/hid/hid-logitech-hidpp.c if (!(hidpp->quirks & HIDPP_QUIRK_HI_RES_SCROLL) || value == 0 hidpp 3207 drivers/hid/hid-logitech-hidpp.c || hidpp->input == NULL || counter->wheel_multiplier == 0) hidpp 3210 drivers/hid/hid-logitech-hidpp.c hidpp_scroll_counter_handle_scroll(hidpp->input, counter, value); hidpp 3214 drivers/hid/hid-logitech-hidpp.c static int hidpp_initialize_battery(struct hidpp_device *hidpp) hidpp 3217 drivers/hid/hid-logitech-hidpp.c struct power_supply_config cfg = { .drv_data = hidpp }; hidpp 3218 drivers/hid/hid-logitech-hidpp.c struct power_supply_desc *desc = &hidpp->battery.desc; hidpp 3225 drivers/hid/hid-logitech-hidpp.c if (hidpp->battery.ps) hidpp 3228 drivers/hid/hid-logitech-hidpp.c hidpp->battery.feature_index = 0xff; hidpp 3229 drivers/hid/hid-logitech-hidpp.c hidpp->battery.solar_feature_index = 0xff; hidpp 3231 drivers/hid/hid-logitech-hidpp.c if (hidpp->protocol_major >= 2) { hidpp 3232 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_CLASS_K750) hidpp 3233 drivers/hid/hid-logitech-hidpp.c ret = hidpp_solar_request_battery_event(hidpp); hidpp 3235 drivers/hid/hid-logitech-hidpp.c ret = hidpp20_query_battery_info(hidpp); hidpp 3239 drivers/hid/hid-logitech-hidpp.c hidpp->capabilities |= HIDPP_CAPABILITY_HIDPP20_BATTERY; hidpp 3241 drivers/hid/hid-logitech-hidpp.c ret = hidpp10_query_battery_status(hidpp); hidpp 3243 drivers/hid/hid-logitech-hidpp.c ret = hidpp10_query_battery_mileage(hidpp); hidpp 3246 drivers/hid/hid-logitech-hidpp.c hidpp->capabilities |= HIDPP_CAPABILITY_BATTERY_MILEAGE; hidpp 3248 drivers/hid/hid-logitech-hidpp.c hidpp->capabilities |= HIDPP_CAPABILITY_BATTERY_LEVEL_STATUS; hidpp 3250 drivers/hid/hid-logitech-hidpp.c hidpp->capabilities |= HIDPP_CAPABILITY_HIDPP10_BATTERY; hidpp 3253 drivers/hid/hid-logitech-hidpp.c battery_props = devm_kmemdup(&hidpp->hid_dev->dev, hidpp 3262 drivers/hid/hid-logitech-hidpp.c if (hidpp->capabilities & HIDPP_CAPABILITY_BATTERY_MILEAGE) hidpp 3266 drivers/hid/hid-logitech-hidpp.c if (hidpp->capabilities & HIDPP_CAPABILITY_BATTERY_LEVEL_STATUS) hidpp 3270 drivers/hid/hid-logitech-hidpp.c battery = &hidpp->battery; hidpp 3281 drivers/hid/hid-logitech-hidpp.c battery->ps = devm_power_supply_register(&hidpp->hid_dev->dev, hidpp 3287 drivers/hid/hid-logitech-hidpp.c power_supply_powers(battery->ps, &hidpp->hid_dev->dev); hidpp 3294 drivers/hid/hid-logitech-hidpp.c struct hidpp_device *hidpp = hid_get_drvdata(hdev); hidpp 3297 drivers/hid/hid-logitech-hidpp.c if (hidpp->protocol_major < 2) hidpp 3300 drivers/hid/hid-logitech-hidpp.c name = hidpp_get_device_name(hidpp); hidpp 3329 drivers/hid/hid-logitech-hidpp.c struct hidpp_device *hidpp = hid_get_drvdata(hdev); hidpp 3338 drivers/hid/hid-logitech-hidpp.c input_dev->name = hidpp->name; hidpp 3350 drivers/hid/hid-logitech-hidpp.c static void hidpp_connect_event(struct hidpp_device *hidpp) hidpp 3352 drivers/hid/hid-logitech-hidpp.c struct hid_device *hdev = hidpp->hid_dev; hidpp 3354 drivers/hid/hid-logitech-hidpp.c bool connected = atomic_read(&hidpp->connected); hidpp 3359 drivers/hid/hid-logitech-hidpp.c if (hidpp->battery.ps) { hidpp 3360 drivers/hid/hid-logitech-hidpp.c hidpp->battery.online = false; hidpp 3361 drivers/hid/hid-logitech-hidpp.c hidpp->battery.status = POWER_SUPPLY_STATUS_UNKNOWN; hidpp 3362 drivers/hid/hid-logitech-hidpp.c hidpp->battery.level = POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN; hidpp 3363 drivers/hid/hid-logitech-hidpp.c power_supply_changed(hidpp->battery.ps); hidpp 3368 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_CLASS_WTP) { hidpp 3372 drivers/hid/hid-logitech-hidpp.c } else if (hidpp->quirks & HIDPP_QUIRK_CLASS_M560) { hidpp 3376 drivers/hid/hid-logitech-hidpp.c } else if (hidpp->quirks & HIDPP_QUIRK_CLASS_K400) { hidpp 3382 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_HIDPP_WHEELS) { hidpp 3383 drivers/hid/hid-logitech-hidpp.c ret = hidpp10_wheel_connect(hidpp); hidpp 3388 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_HIDPP_EXTRA_MOUSE_BTNS) { hidpp 3389 drivers/hid/hid-logitech-hidpp.c ret = hidpp10_extra_mouse_buttons_connect(hidpp); hidpp 3394 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_HIDPP_CONSUMER_VENDOR_KEYS) { hidpp 3395 drivers/hid/hid-logitech-hidpp.c ret = hidpp10_consumer_keys_connect(hidpp); hidpp 3402 drivers/hid/hid-logitech-hidpp.c if (!hidpp->protocol_major) { hidpp 3403 drivers/hid/hid-logitech-hidpp.c ret = hidpp_root_get_protocol_version(hidpp); hidpp 3410 drivers/hid/hid-logitech-hidpp.c if (hidpp->name == hdev->name && hidpp->protocol_major >= 2) { hidpp 3411 drivers/hid/hid-logitech-hidpp.c name = hidpp_get_device_name(hidpp); hidpp 3419 drivers/hid/hid-logitech-hidpp.c hidpp->name = devm_name; hidpp 3423 drivers/hid/hid-logitech-hidpp.c hidpp_initialize_battery(hidpp); hidpp 3426 drivers/hid/hid-logitech-hidpp.c if (hidpp->capabilities & HIDPP_CAPABILITY_HIDPP10_BATTERY) { hidpp 3427 drivers/hid/hid-logitech-hidpp.c hidpp10_enable_battery_reporting(hidpp); hidpp 3428 drivers/hid/hid-logitech-hidpp.c if (hidpp->capabilities & HIDPP_CAPABILITY_BATTERY_MILEAGE) hidpp 3429 drivers/hid/hid-logitech-hidpp.c hidpp10_query_battery_mileage(hidpp); hidpp 3431 drivers/hid/hid-logitech-hidpp.c hidpp10_query_battery_status(hidpp); hidpp 3432 drivers/hid/hid-logitech-hidpp.c } else if (hidpp->capabilities & HIDPP_CAPABILITY_HIDPP20_BATTERY) { hidpp 3433 drivers/hid/hid-logitech-hidpp.c hidpp20_query_battery_info(hidpp); hidpp 3435 drivers/hid/hid-logitech-hidpp.c if (hidpp->battery.ps) hidpp 3436 drivers/hid/hid-logitech-hidpp.c power_supply_changed(hidpp->battery.ps); hidpp 3438 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_HI_RES_SCROLL) hidpp 3439 drivers/hid/hid-logitech-hidpp.c hi_res_scroll_enable(hidpp); hidpp 3441 drivers/hid/hid-logitech-hidpp.c if (!(hidpp->quirks & HIDPP_QUIRK_NO_HIDINPUT) || hidpp->delayed_input) hidpp 3451 drivers/hid/hid-logitech-hidpp.c hidpp_populate_input(hidpp, input); hidpp 3457 drivers/hid/hid-logitech-hidpp.c hidpp->delayed_input = input; hidpp 3486 drivers/hid/hid-logitech-hidpp.c struct hidpp_device *hidpp = hid_get_drvdata(hdev); hidpp 3515 drivers/hid/hid-logitech-hidpp.c hidpp->very_long_report_length = report_length; hidpp 3538 drivers/hid/hid-logitech-hidpp.c struct hidpp_device *hidpp; hidpp 3545 drivers/hid/hid-logitech-hidpp.c hidpp = devm_kzalloc(&hdev->dev, sizeof(*hidpp), GFP_KERNEL); hidpp 3546 drivers/hid/hid-logitech-hidpp.c if (!hidpp) hidpp 3549 drivers/hid/hid-logitech-hidpp.c hidpp->hid_dev = hdev; hidpp 3550 drivers/hid/hid-logitech-hidpp.c hidpp->name = hdev->name; hidpp 3551 drivers/hid/hid-logitech-hidpp.c hidpp->quirks = id->driver_data; hidpp 3552 drivers/hid/hid-logitech-hidpp.c hid_set_drvdata(hdev, hidpp); hidpp 3565 drivers/hid/hid-logitech-hidpp.c devm_kfree(&hdev->dev, hidpp); hidpp 3570 drivers/hid/hid-logitech-hidpp.c hidpp->quirks |= HIDPP_QUIRK_UNIFYING; hidpp 3574 drivers/hid/hid-logitech-hidpp.c hidpp->quirks |= HIDPP_QUIRK_HIDPP_WHEELS | hidpp 3579 drivers/hid/hid-logitech-hidpp.c hidpp->quirks |= HIDPP_QUIRK_HIDPP_CONSUMER_VENDOR_KEYS; hidpp 3582 drivers/hid/hid-logitech-hidpp.c hidpp->quirks &= ~HIDPP_QUIRK_CLASS_WTP; hidpp 3583 drivers/hid/hid-logitech-hidpp.c hidpp->quirks &= ~HIDPP_QUIRK_NO_HIDINPUT; hidpp 3586 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_CLASS_WTP) { hidpp 3590 drivers/hid/hid-logitech-hidpp.c } else if (hidpp->quirks & HIDPP_QUIRK_CLASS_K400) { hidpp 3596 drivers/hid/hid-logitech-hidpp.c INIT_WORK(&hidpp->work, delayed_work_cb); hidpp 3597 drivers/hid/hid-logitech-hidpp.c mutex_init(&hidpp->send_mutex); hidpp 3598 drivers/hid/hid-logitech-hidpp.c init_waitqueue_head(&hidpp->wait); hidpp 3627 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_UNIFYING) hidpp 3628 drivers/hid/hid-logitech-hidpp.c hidpp_unifying_init(hidpp); hidpp 3630 drivers/hid/hid-logitech-hidpp.c connected = hidpp_root_get_protocol_version(hidpp) == 0; hidpp 3631 drivers/hid/hid-logitech-hidpp.c atomic_set(&hidpp->connected, connected); hidpp 3632 drivers/hid/hid-logitech-hidpp.c if (!(hidpp->quirks & HIDPP_QUIRK_UNIFYING)) { hidpp 3642 drivers/hid/hid-logitech-hidpp.c if (connected && (hidpp->quirks & HIDPP_QUIRK_CLASS_WTP)) { hidpp 3643 drivers/hid/hid-logitech-hidpp.c ret = wtp_get_config(hidpp); hidpp 3646 drivers/hid/hid-logitech-hidpp.c } else if (connected && (hidpp->quirks & HIDPP_QUIRK_CLASS_G920)) { hidpp 3647 drivers/hid/hid-logitech-hidpp.c ret = g920_get_config(hidpp, &data); hidpp 3652 drivers/hid/hid-logitech-hidpp.c hidpp_connect_event(hidpp); hidpp 3659 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_NO_HIDINPUT) hidpp 3669 drivers/hid/hid-logitech-hidpp.c if (hidpp->quirks & HIDPP_QUIRK_CLASS_G920) { hidpp 3670 drivers/hid/hid-logitech-hidpp.c ret = hidpp_ff_init(hidpp, &data); hidpp 3672 drivers/hid/hid-logitech-hidpp.c hid_warn(hidpp->hid_dev, hidpp 3685 drivers/hid/hid-logitech-hidpp.c cancel_work_sync(&hidpp->work); hidpp 3686 drivers/hid/hid-logitech-hidpp.c mutex_destroy(&hidpp->send_mutex); hidpp 3692 drivers/hid/hid-logitech-hidpp.c struct hidpp_device *hidpp = hid_get_drvdata(hdev); hidpp 3694 drivers/hid/hid-logitech-hidpp.c if (!hidpp) hidpp 3700 drivers/hid/hid-logitech-hidpp.c cancel_work_sync(&hidpp->work); hidpp 3701 drivers/hid/hid-logitech-hidpp.c mutex_destroy(&hidpp->send_mutex);