Skip to content

Commit a411910

Browse files
LawstorantJiri Kosina
authored andcommitted
HID: pidff: Add PERMISSIVE_CONTROL quirk
With this quirk, a PID device isn't required to have a strict logical_minimum of 1 for the the PID_DEVICE_CONTROL usage page. Some devices come with weird values in their device descriptors and this quirk enables their initialization even if the logical minimum of the DEVICE_CONTROL page is not 1. Fixes initialization of VRS Direct Force Pro Changes in v6: - Change quirk name to better reflect it's intention Co-developed-by: Makarenko Oleg <oleg@makarenk.ooo> Signed-off-by: Makarenko Oleg <oleg@makarenk.ooo> Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com> Reviewed-by: Michał Kopeć <michal@nozomi.space> Reviewed-by: Paul Dino Jones <paul@spacefreak18.xyz> Tested-by: Paul Dino Jones <paul@spacefreak18.xyz> Tested-by: Cristóferson Bueno <cbueno81@gmail.com> Tested-by: Pablo Cisneros <patchkez@protonmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
1 parent fc7c154 commit a411910

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

drivers/hid/usbhid/hid-pidff.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,8 @@ static int pidff_find_special_fields(struct pidff_device *pidff)
982982
0x57, 0);
983983
pidff->device_control =
984984
pidff_find_special_field(pidff->reports[PID_DEVICE_CONTROL],
985-
0x96, 1);
985+
0x96, !(pidff->quirks & HID_PIDFF_QUIRK_PERMISSIVE_CONTROL));
986+
986987
pidff->block_load_status =
987988
pidff_find_special_field(pidff->reports[PID_BLOCK_LOAD],
988989
0x8b, 1);

include/linux/hid.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,8 +1229,9 @@ int hid_pidff_init(struct hid_device *hid);
12291229
#endif
12301230

12311231
/* HID PIDFF quirks */
1232-
#define HID_PIDFF_QUIRK_MISSING_DELAY BIT(0)
1233-
#define HID_PIDFF_QUIRK_MISSING_PBO BIT(1)
1232+
#define HID_PIDFF_QUIRK_MISSING_DELAY BIT(0)
1233+
#define HID_PIDFF_QUIRK_MISSING_PBO BIT(1)
1234+
#define HID_PIDFF_QUIRK_PERMISSIVE_CONTROL BIT(2)
12341235

12351236
#define dbg_hid(fmt, ...) pr_debug("%s: " fmt, __FILE__, ##__VA_ARGS__)
12361237

0 commit comments

Comments
 (0)