Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: xpad - use new BTN_GRIP* buttons

Map paddles to the newly defined BTN_GRIP* buttons.

Signed-off-by: Vicki Pfau <vi@endrift.com>
Link: https://lore.kernel.org/r/20250702040102.125432-3-vi@endrift.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Vicki Pfau and committed by
Dmitry Torokhov
e7412ba9 97c01e65

+18 -18
+18 -18
drivers/input/joystick/xpad.c
··· 475 475 476 476 /* used when the controller has extra paddle buttons */ 477 477 static const signed short xpad_btn_paddles[] = { 478 - BTN_TRIGGER_HAPPY5, BTN_TRIGGER_HAPPY6, /* paddle upper right, lower right */ 479 - BTN_TRIGGER_HAPPY7, BTN_TRIGGER_HAPPY8, /* paddle upper left, lower left */ 478 + BTN_GRIPR, BTN_GRIPR2, /* paddle upper right, lower right */ 479 + BTN_GRIPL, BTN_GRIPL2, /* paddle upper left, lower left */ 480 480 -1 /* terminating entry */ 481 481 }; 482 482 ··· 1070 1070 data[18] = 0; 1071 1071 1072 1072 /* Elite Series 2 split packet paddle bits */ 1073 - input_report_key(dev, BTN_TRIGGER_HAPPY5, data[18] & BIT(0)); 1074 - input_report_key(dev, BTN_TRIGGER_HAPPY6, data[18] & BIT(1)); 1075 - input_report_key(dev, BTN_TRIGGER_HAPPY7, data[18] & BIT(2)); 1076 - input_report_key(dev, BTN_TRIGGER_HAPPY8, data[18] & BIT(3)); 1073 + input_report_key(dev, BTN_GRIPR, data[18] & BIT(0)); 1074 + input_report_key(dev, BTN_GRIPR2, data[18] & BIT(1)); 1075 + input_report_key(dev, BTN_GRIPL, data[18] & BIT(2)); 1076 + input_report_key(dev, BTN_GRIPL2, data[18] & BIT(3)); 1077 1077 1078 1078 do_sync = true; 1079 1079 } ··· 1170 1170 data[32] = 0; 1171 1171 1172 1172 /* OG Elite Series Controller paddle bits */ 1173 - input_report_key(dev, BTN_TRIGGER_HAPPY5, data[32] & BIT(1)); 1174 - input_report_key(dev, BTN_TRIGGER_HAPPY6, data[32] & BIT(3)); 1175 - input_report_key(dev, BTN_TRIGGER_HAPPY7, data[32] & BIT(0)); 1176 - input_report_key(dev, BTN_TRIGGER_HAPPY8, data[32] & BIT(2)); 1173 + input_report_key(dev, BTN_GRIPR, data[32] & BIT(1)); 1174 + input_report_key(dev, BTN_GRIPR2, data[32] & BIT(3)); 1175 + input_report_key(dev, BTN_GRIPL, data[32] & BIT(0)); 1176 + input_report_key(dev, BTN_GRIPL2, data[32] & BIT(2)); 1177 1177 } else if (xpad->packet_type == PKT_XBE2_FW_OLD) { 1178 1178 /* Mute paddles if controller has a custom mapping applied. 1179 1179 * Checked by comparing the current mapping ··· 1183 1183 data[18] = 0; 1184 1184 1185 1185 /* Elite Series 2 4.x firmware paddle bits */ 1186 - input_report_key(dev, BTN_TRIGGER_HAPPY5, data[18] & BIT(0)); 1187 - input_report_key(dev, BTN_TRIGGER_HAPPY6, data[18] & BIT(1)); 1188 - input_report_key(dev, BTN_TRIGGER_HAPPY7, data[18] & BIT(2)); 1189 - input_report_key(dev, BTN_TRIGGER_HAPPY8, data[18] & BIT(3)); 1186 + input_report_key(dev, BTN_GRIPR, data[18] & BIT(0)); 1187 + input_report_key(dev, BTN_GRIPR2, data[18] & BIT(1)); 1188 + input_report_key(dev, BTN_GRIPL, data[18] & BIT(2)); 1189 + input_report_key(dev, BTN_GRIPL2, data[18] & BIT(3)); 1190 1190 } else if (xpad->packet_type == PKT_XBE2_FW_5_EARLY) { 1191 1191 /* Mute paddles if controller has a custom mapping applied. 1192 1192 * Checked by comparing the current mapping ··· 1198 1198 /* Elite Series 2 5.x firmware paddle bits 1199 1199 * (before the packet was split) 1200 1200 */ 1201 - input_report_key(dev, BTN_TRIGGER_HAPPY5, data[22] & BIT(0)); 1202 - input_report_key(dev, BTN_TRIGGER_HAPPY6, data[22] & BIT(1)); 1203 - input_report_key(dev, BTN_TRIGGER_HAPPY7, data[22] & BIT(2)); 1204 - input_report_key(dev, BTN_TRIGGER_HAPPY8, data[22] & BIT(3)); 1201 + input_report_key(dev, BTN_GRIPR, data[22] & BIT(0)); 1202 + input_report_key(dev, BTN_GRIPR2, data[22] & BIT(1)); 1203 + input_report_key(dev, BTN_GRIPL, data[22] & BIT(2)); 1204 + input_report_key(dev, BTN_GRIPL2, data[22] & BIT(3)); 1205 1205 } 1206 1206 } 1207 1207