Lines Matching refs:hdev

1027 	struct hid_device *hdev;  member
1052 static __u8 *sixaxis_fixup(struct hid_device *hdev, __u8 *rdesc, in sixaxis_fixup() argument
1059 static u8 *motion_fixup(struct hid_device *hdev, u8 *rdesc, in motion_fixup() argument
1066 static u8 *navigation_fixup(struct hid_device *hdev, u8 *rdesc, in navigation_fixup() argument
1073 static __u8 *ps3remote_fixup(struct hid_device *hdev, __u8 *rdesc, in ps3remote_fixup() argument
1080 static int ps3remote_mapping(struct hid_device *hdev, struct hid_input *hi, in ps3remote_mapping() argument
1114 static __u8 *sony_report_fixup(struct hid_device *hdev, __u8 *rdesc, in sony_report_fixup() argument
1117 struct sony_sc *sc = hid_get_drvdata(hdev); in sony_report_fixup()
1130 hid_info(hdev, "Fixing up Sony RF Receiver report descriptor\n"); in sony_report_fixup()
1141 hid_info(hdev, "Using modified Dualshock 4 report descriptor with gyroscope axes\n"); in sony_report_fixup()
1145 hid_info(hdev, "Using modified Dualshock 4 Bluetooth report descriptor\n"); in sony_report_fixup()
1151 return sixaxis_fixup(hdev, rdesc, rsize); in sony_report_fixup()
1154 return motion_fixup(hdev, rdesc, rsize); in sony_report_fixup()
1157 return navigation_fixup(hdev, rdesc, rsize); in sony_report_fixup()
1160 return ps3remote_fixup(hdev, rdesc, rsize); in sony_report_fixup()
1200 struct hid_input *hidinput = list_entry(sc->hdev->inputs.next, in dualshock4_parse_report()
1270 static int sony_raw_event(struct hid_device *hdev, struct hid_report *report, in sony_raw_event() argument
1273 struct sony_sc *sc = hid_get_drvdata(hdev); in sony_raw_event()
1311 static int sony_mapping(struct hid_device *hdev, struct hid_input *hi, in sony_mapping() argument
1315 struct sony_sc *sc = hid_get_drvdata(hdev); in sony_mapping()
1341 return ps3remote_mapping(hdev, hi, field, usage, bit, max); in sony_mapping()
1363 static int sony_input_configured(struct hid_device *hdev, in sony_input_configured() argument
1366 struct sony_sc *sc = hid_get_drvdata(hdev); in sony_input_configured()
1376 hid_err(sc->hdev, in sony_input_configured()
1391 static int sixaxis_set_operational_usb(struct hid_device *hdev) in sixaxis_set_operational_usb() argument
1402 ret = hid_hw_raw_request(hdev, 0xf2, buf, SIXAXIS_REPORT_0xF2_SIZE, in sixaxis_set_operational_usb()
1405 hid_err(hdev, "can't set operational mode: step 1\n"); in sixaxis_set_operational_usb()
1413 ret = hid_hw_raw_request(hdev, 0xf5, buf, SIXAXIS_REPORT_0xF5_SIZE, in sixaxis_set_operational_usb()
1416 hid_err(hdev, "can't set operational mode: step 2\n"); in sixaxis_set_operational_usb()
1420 ret = hid_hw_output_report(hdev, buf, 1); in sixaxis_set_operational_usb()
1422 hid_err(hdev, "can't set operational mode: step 3\n"); in sixaxis_set_operational_usb()
1430 static int sixaxis_set_operational_bt(struct hid_device *hdev) in sixaxis_set_operational_bt() argument
1440 ret = hid_hw_raw_request(hdev, buf[0], buf, sizeof(report), in sixaxis_set_operational_bt()
1452 static int dualshock4_set_operational_bt(struct hid_device *hdev) in dualshock4_set_operational_bt() argument
1461 ret = hid_hw_raw_request(hdev, 0x02, buf, DS4_REPORT_0x02_SIZE, in dualshock4_set_operational_bt()
1521 struct hid_device *hdev = sc->hdev; in buzz_set_leds() local
1523 &hdev->report_enum[HID_OUTPUT_REPORT].report_list; in buzz_set_leds()
1537 hid_hw_request(hdev, report, HID_REQ_SET_REPORT); in buzz_set_leds()
1552 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in sony_led_set_brightness() local
1558 drv_data = hid_get_drvdata(hdev); in sony_led_set_brightness()
1560 hid_err(hdev, "No device data\n"); in sony_led_set_brightness()
1594 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in sony_led_get_brightness() local
1599 drv_data = hid_get_drvdata(hdev); in sony_led_get_brightness()
1601 hid_err(hdev, "No device data\n"); in sony_led_get_brightness()
1617 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in sony_led_blink_set() local
1618 struct sony_sc *drv_data = hid_get_drvdata(hdev); in sony_led_blink_set()
1623 hid_err(hdev, "No device data\n"); in sony_led_blink_set()
1681 struct hid_device *hdev = sc->hdev; in sony_leds_init() local
1702 if (!hid_validate_values(hdev, HID_OUTPUT_REPORT, 0, 0, 7)) in sony_leds_init()
1744 name_sz = strlen(dev_name(&hdev->dev)) + name_len + 1; in sony_leds_init()
1749 name_sz = strlen(dev_name(&hdev->dev)) + strlen(ds4_name_str[n]) + 2; in sony_leds_init()
1753 hid_err(hdev, "Couldn't allocate memory for LED %d\n", n); in sony_leds_init()
1760 snprintf(name, name_sz, name_fmt, dev_name(&hdev->dev), in sony_leds_init()
1763 snprintf(name, name_sz, name_fmt, dev_name(&hdev->dev), n + 1); in sony_leds_init()
1775 ret = led_classdev_register(&hdev->dev, led); in sony_leds_init()
1777 hid_err(hdev, "Failed to register LED %d\n", n); in sony_leds_init()
1844 hid_hw_raw_request(sc->hdev, report->report_id, (__u8 *)report, in sixaxis_state_worker()
1852 struct hid_device *hdev = sc->hdev; in dualshock4_state_worker() local
1890 hid_hw_output_report(hdev, buf, DS4_REPORT_0x05_SIZE); in dualshock4_state_worker()
1892 hid_hw_raw_request(hdev, 0x11, buf, DS4_REPORT_0x11_SIZE, in dualshock4_state_worker()
1899 struct hid_device *hdev = sc->hdev; in motion_state_worker() local
1914 hid_hw_output_report(hdev, (__u8 *)report, MOTION_REPORT_0x02_SIZE); in motion_state_worker()
1961 struct hid_input *hidinput = list_entry(sc->hdev->inputs.next, in sony_init_ff()
2021 struct hid_device *hdev = sc->hdev; in sony_battery_probe() local
2041 sc->battery = power_supply_register(&hdev->dev, &sc->battery_desc, in sony_battery_probe()
2045 hid_err(hdev, "Unable to register battery device\n"); in sony_battery_probe()
2049 power_supply_powers(sc->battery, &hdev->dev); in sony_battery_probe()
2087 hid_info(sc->hdev, "controller with MAC address %pMR already connected\n", in sony_check_add_dev_list()
2117 ret = strlen(sc->hdev->uniq); in sony_get_bt_devaddr()
2121 ret = sscanf(sc->hdev->uniq, in sony_get_bt_devaddr()
2148 hid_warn(sc->hdev, "UNIQ does not contain a MAC address; duplicate check skipped\n"); in sony_check_add()
2161 ret = hid_hw_raw_request(sc->hdev, 0x81, buf, in sony_check_add()
2166 hid_err(sc->hdev, "failed to retrieve feature report 0x81 with the DualShock 4 MAC address\n"); in sony_check_add()
2183 ret = hid_hw_raw_request(sc->hdev, 0xf2, buf, in sony_check_add()
2188 hid_err(sc->hdev, "failed to retrieve feature report 0xf2 with the Sixaxis MAC address\n"); in sony_check_add()
2259 static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id) in sony_probe() argument
2266 sc = devm_kzalloc(&hdev->dev, sizeof(*sc), GFP_KERNEL); in sony_probe()
2268 hid_err(hdev, "can't alloc sony descriptor\n"); in sony_probe()
2275 hid_set_drvdata(hdev, sc); in sony_probe()
2276 sc->hdev = hdev; in sony_probe()
2278 ret = hid_parse(hdev); in sony_probe()
2280 hid_err(hdev, "parse failed\n"); in sony_probe()
2289 ret = hid_hw_start(hdev, connect_mask); in sony_probe()
2291 hid_err(hdev, "hw start failed\n"); in sony_probe()
2297 hid_err(hdev, "failed to allocate the device id\n"); in sony_probe()
2303 hid_err(hdev, "failed to allocate the output report buffer\n"); in sony_probe()
2319 hdev->quirks |= HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP; in sony_probe()
2320 hdev->quirks |= HID_QUIRK_SKIP_OUTPUT_REPORT_ID; in sony_probe()
2321 ret = sixaxis_set_operational_usb(hdev); in sony_probe()
2329 hdev->quirks |= HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP; in sony_probe()
2330 ret = sixaxis_set_operational_bt(hdev); in sony_probe()
2338 hdev->quirks |= HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP; in sony_probe()
2339 ret = dualshock4_set_operational_bt(hdev); in sony_probe()
2341 hid_err(hdev, "failed to set the Dualshock 4 operational mode\n"); in sony_probe()
2372 ret = hid_hw_open(hdev); in sony_probe()
2374 hid_err(hdev, "hw open failed\n"); in sony_probe()
2387 hid_hw_close(hdev); in sony_probe()
2397 hid_hw_stop(hdev); in sony_probe()
2401 static void sony_remove(struct hid_device *hdev) in sony_remove() argument
2403 struct sony_sc *sc = hid_get_drvdata(hdev); in sony_remove()
2409 hid_hw_close(hdev); in sony_remove()
2421 hid_hw_stop(hdev); in sony_remove()