Lines Matching +full:force +full:- +full:mode

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Force feedback support for Betop based devices
8 * 0x11c2:0x2208 "BTP2185 BFM mode Joystick"
9 * - tested with BTP2185 BFM Mode.
11 * 0x11C0:0x5506 "BTP2185 PC mode Joystick"
12 * - tested with BTP2185 PC Mode.
14 * 0x8380:0x1850 "BTP2185 V2 PC mode USB Gamepad"
15 * - tested with BTP2185 PC Mode with another version.
17 * 0x20bc:0x5500 "BTP2185 V2 BFM mode Joystick"
18 * - tested with BTP2171s.
31 #include "hid-ids.h"
44 left = effect->u.rumble.strong_magnitude; in hid_betopff_play()
45 right = effect->u.rumble.weak_magnitude; in hid_betopff_play()
47 betopff->report->field[2]->value[0] = left / 256; in hid_betopff_play()
48 betopff->report->field[3]->value[0] = right / 256; in hid_betopff_play()
50 hid_hw_request(hid, betopff->report, HID_REQ_SET_REPORT); in hid_betopff_play()
61 &hid->report_enum[HID_OUTPUT_REPORT].report_list; in betopff_init()
66 if (list_empty(&hid->inputs)) { in betopff_init()
68 return -ENODEV; in betopff_init()
71 hidinput = list_first_entry(&hid->inputs, struct hid_input, list); in betopff_init()
72 dev = hidinput->input; in betopff_init()
76 return -ENODEV; in betopff_init()
82 * ----------------------------------------- in betopff_init()
85 * ----------------------------------------- in betopff_init()
88 if (report->maxfield < 4) { in betopff_init()
90 report->maxfield); in betopff_init()
91 return -ENODEV; in betopff_init()
93 for (i = 0; i < report->maxfield; i++) { in betopff_init()
94 if (report->field[i]->report_count < 1) { in betopff_init()
96 return -ENODEV; in betopff_init()
98 for (j = 0; j < report->field[i]->report_count; j++) { in betopff_init()
99 report->field[i]->value[j] = 0x00; in betopff_init()
105 return -ENOMEM; in betopff_init()
107 set_bit(FF_RUMBLE, dev->ffbit); in betopff_init()
115 betopff->report = report; in betopff_init()
116 hid_hw_request(hid, betopff->report, HID_REQ_SET_REPORT); in betopff_init()
118 hid_info(hid, "Force feedback for betop devices by huangbo <huangbobupt@163.com>\n"); in betopff_init()
127 if (id->driver_data) in betop_probe()
128 hdev->quirks |= HID_QUIRK_MULTI_INPUT; in betop_probe()
165 MODULE_DESCRIPTION("Force feedback support for Betop based devices");