Lines Matching refs:hdev

815 	struct hid_device *hdev;  member
840 static __u8 *sixaxis_fixup(struct hid_device *hdev, __u8 *rdesc, in sixaxis_fixup() argument
847 static __u8 *ps3remote_fixup(struct hid_device *hdev, __u8 *rdesc, in ps3remote_fixup() argument
854 static int ps3remote_mapping(struct hid_device *hdev, struct hid_input *hi, in ps3remote_mapping() argument
888 static __u8 *sony_report_fixup(struct hid_device *hdev, __u8 *rdesc, in sony_report_fixup() argument
891 struct sony_sc *sc = hid_get_drvdata(hdev); in sony_report_fixup()
904 hid_info(hdev, "Fixing up Sony RF Receiver report descriptor\n"); in sony_report_fixup()
915 hid_info(hdev, "Using modified Dualshock 4 report descriptor with gyroscope axes\n"); in sony_report_fixup()
919 hid_info(hdev, "Using modified Dualshock 4 Bluetooth report descriptor\n"); in sony_report_fixup()
925 return sixaxis_fixup(hdev, rdesc, rsize); in sony_report_fixup()
928 return ps3remote_fixup(hdev, rdesc, rsize); in sony_report_fixup()
965 struct hid_input *hidinput = list_entry(sc->hdev->inputs.next, in dualshock4_parse_report()
1035 static int sony_raw_event(struct hid_device *hdev, struct hid_report *report, in sony_raw_event() argument
1038 struct sony_sc *sc = hid_get_drvdata(hdev); in sony_raw_event()
1060 static int sony_mapping(struct hid_device *hdev, struct hid_input *hi, in sony_mapping() argument
1064 struct sony_sc *sc = hid_get_drvdata(hdev); in sony_mapping()
1090 return ps3remote_mapping(hdev, hi, field, usage, bit, max); in sony_mapping()
1112 static void sony_input_configured(struct hid_device *hdev, in sony_input_configured() argument
1115 struct sony_sc *sc = hid_get_drvdata(hdev); in sony_input_configured()
1123 hid_err(sc->hdev, in sony_input_configured()
1133 static int sixaxis_set_operational_usb(struct hid_device *hdev) in sixaxis_set_operational_usb() argument
1144 ret = hid_hw_raw_request(hdev, 0xf2, buf, SIXAXIS_REPORT_0xF2_SIZE, in sixaxis_set_operational_usb()
1147 hid_err(hdev, "can't set operational mode: step 1\n"); in sixaxis_set_operational_usb()
1155 ret = hid_hw_raw_request(hdev, 0xf5, buf, SIXAXIS_REPORT_0xF5_SIZE, in sixaxis_set_operational_usb()
1158 hid_err(hdev, "can't set operational mode: step 2\n"); in sixaxis_set_operational_usb()
1162 ret = hid_hw_output_report(hdev, buf, 1); in sixaxis_set_operational_usb()
1164 hid_err(hdev, "can't set operational mode: step 3\n"); in sixaxis_set_operational_usb()
1172 static int sixaxis_set_operational_bt(struct hid_device *hdev) in sixaxis_set_operational_bt() argument
1182 ret = hid_hw_raw_request(hdev, buf[0], buf, sizeof(report), in sixaxis_set_operational_bt()
1194 static int dualshock4_set_operational_bt(struct hid_device *hdev) in dualshock4_set_operational_bt() argument
1203 ret = hid_hw_raw_request(hdev, 0x02, buf, DS4_REPORT_0x02_SIZE, in dualshock4_set_operational_bt()
1257 static void buzz_set_leds(struct hid_device *hdev, const __u8 *leds) in buzz_set_leds() argument
1260 &hdev->report_enum[HID_OUTPUT_REPORT].report_list; in buzz_set_leds()
1272 hid_hw_request(hdev, report, HID_REQ_SET_REPORT); in buzz_set_leds()
1282 buzz_set_leds(sc->hdev, leds); in sony_set_leds()
1294 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in sony_led_set_brightness() local
1300 drv_data = hid_get_drvdata(hdev); in sony_led_set_brightness()
1302 hid_err(hdev, "No device data\n"); in sony_led_set_brightness()
1337 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in sony_led_get_brightness() local
1342 drv_data = hid_get_drvdata(hdev); in sony_led_get_brightness()
1344 hid_err(hdev, "No device data\n"); in sony_led_get_brightness()
1360 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in sony_led_blink_set() local
1361 struct sony_sc *drv_data = hid_get_drvdata(hdev); in sony_led_blink_set()
1366 hid_err(hdev, "No device data\n"); in sony_led_blink_set()
1424 struct hid_device *hdev = sc->hdev; in sony_leds_init() local
1446 if (!hid_validate_values(hdev, HID_OUTPUT_REPORT, 0, 0, 7)) in sony_leds_init()
1473 name_sz = strlen(dev_name(&hdev->dev)) + name_len + 1; in sony_leds_init()
1478 name_sz = strlen(dev_name(&hdev->dev)) + strlen(ds4_name_str[n]) + 2; in sony_leds_init()
1482 hid_err(hdev, "Couldn't allocate memory for LED %d\n", n); in sony_leds_init()
1489 snprintf(name, name_sz, name_fmt, dev_name(&hdev->dev), in sony_leds_init()
1492 snprintf(name, name_sz, name_fmt, dev_name(&hdev->dev), n + 1); in sony_leds_init()
1504 ret = led_classdev_register(&hdev->dev, led); in sony_leds_init()
1506 hid_err(hdev, "Failed to register LED %d\n", n); in sony_leds_init()
1573 hid_hw_raw_request(sc->hdev, report->report_id, (__u8 *)report, in sixaxis_state_worker()
1581 struct hid_device *hdev = sc->hdev; in dualshock4_state_worker() local
1619 hid_hw_output_report(hdev, buf, DS4_REPORT_0x05_SIZE); in dualshock4_state_worker()
1621 hid_hw_raw_request(hdev, 0x11, buf, DS4_REPORT_0x11_SIZE, in dualshock4_state_worker()
1665 struct hid_input *hidinput = list_entry(sc->hdev->inputs.next, in sony_init_ff()
1725 struct hid_device *hdev = sc->hdev; in sony_battery_probe() local
1745 sc->battery = power_supply_register(&hdev->dev, &sc->battery_desc, in sony_battery_probe()
1749 hid_err(hdev, "Unable to register battery device\n"); in sony_battery_probe()
1753 power_supply_powers(sc->battery, &hdev->dev); in sony_battery_probe()
1791 hid_info(sc->hdev, "controller with MAC address %pMR already connected\n", in sony_check_add_dev_list()
1821 ret = strlen(sc->hdev->uniq); in sony_get_bt_devaddr()
1825 ret = sscanf(sc->hdev->uniq, in sony_get_bt_devaddr()
1850 hid_warn(sc->hdev, "UNIQ does not contain a MAC address; duplicate check skipped\n"); in sony_check_add()
1863 ret = hid_hw_raw_request(sc->hdev, 0x81, buf, in sony_check_add()
1868 hid_err(sc->hdev, "failed to retrieve feature report 0x81 with the DualShock 4 MAC address\n"); in sony_check_add()
1884 ret = hid_hw_raw_request(sc->hdev, 0xf2, buf, in sony_check_add()
1889 hid_err(sc->hdev, "failed to retrieve feature report 0xf2 with the Sixaxis MAC address\n"); in sony_check_add()
1960 static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id) in sony_probe() argument
1967 sc = devm_kzalloc(&hdev->dev, sizeof(*sc), GFP_KERNEL); in sony_probe()
1969 hid_err(hdev, "can't alloc sony descriptor\n"); in sony_probe()
1976 hid_set_drvdata(hdev, sc); in sony_probe()
1977 sc->hdev = hdev; in sony_probe()
1979 ret = hid_parse(hdev); in sony_probe()
1981 hid_err(hdev, "parse failed\n"); in sony_probe()
1990 ret = hid_hw_start(hdev, connect_mask); in sony_probe()
1992 hid_err(hdev, "hw start failed\n"); in sony_probe()
1998 hid_err(hdev, "failed to allocate the output report buffer\n"); in sony_probe()
2004 hid_err(hdev, "failed to allocate the device id\n"); in sony_probe()
2019 hdev->quirks |= HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP; in sony_probe()
2020 hdev->quirks |= HID_QUIRK_SKIP_OUTPUT_REPORT_ID; in sony_probe()
2021 ret = sixaxis_set_operational_usb(hdev); in sony_probe()
2028 hdev->quirks |= HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP; in sony_probe()
2029 ret = sixaxis_set_operational_bt(hdev); in sony_probe()
2037 hdev->quirks |= HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP; in sony_probe()
2038 ret = dualshock4_set_operational_bt(hdev); in sony_probe()
2040 hid_err(hdev, "failed to set the Dualshock 4 operational mode\n"); in sony_probe()
2069 ret = hid_hw_open(hdev); in sony_probe()
2071 hid_err(hdev, "hw open failed\n"); in sony_probe()
2084 hid_hw_close(hdev); in sony_probe()
2094 hid_hw_stop(hdev); in sony_probe()
2098 static void sony_remove(struct hid_device *hdev) in sony_remove() argument
2100 struct sony_sc *sc = hid_get_drvdata(hdev); in sony_remove()
2106 hid_hw_close(hdev); in sony_remove()
2118 hid_hw_stop(hdev); in sony_remove()