/* * Check if the device is PID and initialize it * Add quirks after initialisation
*/ staticint universal_pidff_probe(struct hid_device *hdev, conststruct hid_device_id *id)
{ int i, error;
/* Check if device contains PID usage page */
error = 1; for (i = 0; i < hdev->collection_size; i++) if ((hdev->collection[i].usage & HID_USAGE_PAGE) == HID_UP_PID) {
error = 0;
hid_dbg(hdev, "PID usage page found\n"); break;
}
/* * Do not fail as this might be the second "device" * just for additional buttons/axes. Exit cleanly if force * feedback usage page wasn't found (included devices were * tested and confirmed to be USB PID after all).
*/ if (error) {
hid_dbg(hdev, "PID usage page not found in the descriptor\n"); return 0;
}
/* Check if HID_PID support is enabled */ int (*init_function)(struct hid_device *, u32);
init_function = hid_pidff_init_with_quirks; if (!init_function) {
hid_warn(hdev, "HID_PID support not enabled!\n"); return 0;
}
error = init_function(hdev, id->driver_data); if (error) {
hid_warn(hdev, "Error initialising force feedback\n"); goto err;
}
/* Remove fuzz and deadzone from the second joystick axis */ if (hdev->vendor == USB_VENDOR_ID_FFBEAST &&
hdev->product == USB_DEVICE_ID_FFBEAST_JOYSTICK)
input_set_abs_params(input, ABS_Y,
input->absinfo[ABS_Y].minimum,
input->absinfo[ABS_Y].maximum, 0, 0);
MODULE_DESCRIPTION("Universal driver for USB PID Force Feedback devices");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Oleg Makarenko <oleg@makarenk.ooo>");
MODULE_AUTHOR("Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>");
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-04-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.