@@ -1441,6 +1441,25 @@ static int hidpp_input_mapping(struct hid_device *hdev, struct hid_input *hi,
1441
1441
return 0 ;
1442
1442
}
1443
1443
1444
+ static int hidpp_input_mapped (struct hid_device * hdev , struct hid_input * hi ,
1445
+ struct hid_field * field , struct hid_usage * usage ,
1446
+ unsigned long * * bit , int * max )
1447
+ {
1448
+ struct hidpp_device * hidpp = hid_get_drvdata (hdev );
1449
+
1450
+ /* Ensure that Logitech G920 is not given a default fuzz/flat value */
1451
+ if (hidpp -> quirks & HIDPP_QUIRK_CLASS_G920 ) {
1452
+ if (usage -> type == EV_ABS && (usage -> code == ABS_X ||
1453
+ usage -> code == ABS_Y || usage -> code == ABS_Z ||
1454
+ usage -> code == ABS_RZ )) {
1455
+ field -> application = HID_GD_MULTIAXIS ;
1456
+ }
1457
+ }
1458
+
1459
+ return 0 ;
1460
+ }
1461
+
1462
+
1444
1463
static void hidpp_populate_input (struct hidpp_device * hidpp ,
1445
1464
struct input_dev * input , bool origin_is_hid_core )
1446
1465
{
@@ -1875,6 +1894,7 @@ static struct hid_driver hidpp_driver = {
1875
1894
.raw_event = hidpp_raw_event ,
1876
1895
.input_configured = hidpp_input_configured ,
1877
1896
.input_mapping = hidpp_input_mapping ,
1897
+ .input_mapped = hidpp_input_mapped ,
1878
1898
};
1879
1899
1880
1900
module_hid_driver (hidpp_driver );
0 commit comments