* [PATCH 0/3] xpad: Add support for Thrustmaster, Inc. Ferrari 458 Spider Racing Wheel
@ 2025-08-05 19:20 Pär Eriksson
2025-08-05 19:20 ` [PATCH 1/3] Input: xpad - Add MAP_FERRARI_458_CUSTOM_AXES mapping flag Pär Eriksson
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Pär Eriksson @ 2025-08-05 19:20 UTC (permalink / raw)
To: Dmitry Torokhov, Vicki Pfau, Pavel Rojtberg, Nilton Perim Neto,
Antheas Kapenekakis, Pär Eriksson, Mario Limonciello,
linux-input, linux-kernel
Hello,
This patch series adds support for the Thrustmaster, Inc. Ferrari 458 Spider Racing Wheel (USB ID 044f:b671) to the xpad driver. The implementation is inspired by the work in https://github.com/Capure/xpad.
The wheel reports steering and pedal data at non-standard offsets, so custom axis mapping is introduced via a new mapping flag.
I have tested the changes with the actual hardware on Fedora 42 (kernel 6.15.7-200.fc42.x86_64), and confirmed correct input reporting.
If you prefer a different name for the mapping flag, please let me know.
Please consider this for upstream inclusion.
Pär Eriksson (3):
Input: xpad - Add MAP_FERRARI_458_CUSTOM_AXES mapping flag
Input: xpad - Add Thrustmaster Ferrari 458 Spider (044f:b671) device
entry
Input: xpad - Implement custom axis mapping for Ferrari 458 Spider
drivers/input/joystick/xpad.c | 35 ++++++++++++++++++++++++-----------
1 file changed, 24 insertions(+), 11 deletions(-)
--
2.50.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] Input: xpad - Add MAP_FERRARI_458_CUSTOM_AXES mapping flag
2025-08-05 19:20 [PATCH 0/3] xpad: Add support for Thrustmaster, Inc. Ferrari 458 Spider Racing Wheel Pär Eriksson
@ 2025-08-05 19:20 ` Pär Eriksson
2025-08-05 19:20 ` [PATCH 2/3] Input: xpad - Add Thrustmaster Ferrari 458 Spider (044f:b671) device entry Pär Eriksson
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Pär Eriksson @ 2025-08-05 19:20 UTC (permalink / raw)
To: Dmitry Torokhov, Vicki Pfau, Pavel Rojtberg, Nilton Perim Neto,
Antheas Kapenekakis, Pär Eriksson, Mario Limonciello,
linux-input, linux-kernel
Introduce MAP_FERRARI_458_CUSTOM_AXES to support custom axis mapping for
the Thrustmaster Ferrari 458 Spider wheel and pedals.
Signed-off-by: Pär Eriksson <parherman@gmail.com>
---
drivers/input/joystick/xpad.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 1d8c579b5433..51e285efac79 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -84,6 +84,7 @@
#define MAP_PADDLES BIT(4)
#define MAP_PROFILE_BUTTON BIT(5)
#define MAP_SHARE_OFFSET BIT(6)
+#define MAP_FERRARI_458_CUSTOM_AXES BIT(7)
#define DANCEPAD_MAP_CONFIG (MAP_DPAD_TO_BUTTONS | \
MAP_TRIGGERS_TO_BUTTONS | MAP_STICKS_TO_NULL)
--
2.50.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] Input: xpad - Add Thrustmaster Ferrari 458 Spider (044f:b671) device entry
2025-08-05 19:20 [PATCH 0/3] xpad: Add support for Thrustmaster, Inc. Ferrari 458 Spider Racing Wheel Pär Eriksson
2025-08-05 19:20 ` [PATCH 1/3] Input: xpad - Add MAP_FERRARI_458_CUSTOM_AXES mapping flag Pär Eriksson
@ 2025-08-05 19:20 ` Pär Eriksson
2025-08-05 19:20 ` [PATCH 3/3] Input: xpad - Implement custom axis mapping for Ferrari 458 Spider Pär Eriksson
2025-08-05 20:23 ` [PATCH 0/3] xpad: Add support for Thrustmaster, Inc. Ferrari 458 Spider Racing Wheel Vicki Pfau
3 siblings, 0 replies; 7+ messages in thread
From: Pär Eriksson @ 2025-08-05 19:20 UTC (permalink / raw)
To: Dmitry Torokhov, Vicki Pfau, Pavel Rojtberg, Nilton Perim Neto,
Antheas Kapenekakis, Pär Eriksson, Mario Limonciello,
linux-input, linux-kernel
Add the USB ID for the Thrustmaster Ferrari 458 Spider (044f:b671) to the
device table, using the MAP_FERRARI_458_CUSTOM_AXES mapping flag.
Signed-off-by: Pär Eriksson <parherman@gmail.com>
---
drivers/input/joystick/xpad.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 51e285efac79..fdd70f256be7 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -147,6 +147,7 @@ static const struct xpad_device {
{ 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX },
{ 0x044f, 0x0f10, "Thrustmaster Modena GT Wheel", 0, XTYPE_XBOX },
{ 0x044f, 0xb326, "Thrustmaster Gamepad GP XID", 0, XTYPE_XBOX360 },
+ { 0x044f, 0xb671, "Thrustmaster, Inc. Ferrari 458 Spider Racing Wheel", MAP_FERRARI_458_CUSTOM_AXES, XTYPE_XBOXONE },
{ 0x044f, 0xd01e, "ThrustMaster, Inc. ESWAP X 2 ELDEN RING EDITION", 0, XTYPE_XBOXONE },
{ 0x045e, 0x0202, "Microsoft X-Box pad v1 (US)", 0, XTYPE_XBOX },
{ 0x045e, 0x0285, "Microsoft X-Box pad (Japan)", 0, XTYPE_XBOX },
--
2.50.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] Input: xpad - Implement custom axis mapping for Ferrari 458 Spider
2025-08-05 19:20 [PATCH 0/3] xpad: Add support for Thrustmaster, Inc. Ferrari 458 Spider Racing Wheel Pär Eriksson
2025-08-05 19:20 ` [PATCH 1/3] Input: xpad - Add MAP_FERRARI_458_CUSTOM_AXES mapping flag Pär Eriksson
2025-08-05 19:20 ` [PATCH 2/3] Input: xpad - Add Thrustmaster Ferrari 458 Spider (044f:b671) device entry Pär Eriksson
@ 2025-08-05 19:20 ` Pär Eriksson
2025-08-05 20:23 ` [PATCH 0/3] xpad: Add support for Thrustmaster, Inc. Ferrari 458 Spider Racing Wheel Vicki Pfau
3 siblings, 0 replies; 7+ messages in thread
From: Pär Eriksson @ 2025-08-05 19:20 UTC (permalink / raw)
To: Dmitry Torokhov, Vicki Pfau, Pavel Rojtberg, Nilton Perim Neto,
Pär Eriksson, Antheas Kapenekakis, Pierre-Loup A. Griffais,
linux-input, linux-kernel
Update xpadone_process_packet to handle steering and pedal data at
non-standard offsets for devices with MAP_FERRARI_458_CUSTOM_AXES.
Signed-off-by: Pär Eriksson <parherman@gmail.com>
---
drivers/input/joystick/xpad.c | 33 ++++++++++++++++++++++-----------
1 file changed, 22 insertions(+), 11 deletions(-)
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index fdd70f256be7..252290424bbd 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -1135,17 +1135,23 @@ static void xpadone_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char
input_report_key(dev, BTN_THUMBR, data[5] & BIT(7));
if (!(xpad->mapping & MAP_STICKS_TO_NULL)) {
- /* left stick */
- input_report_abs(dev, ABS_X,
- (__s16) le16_to_cpup((__le16 *)(data + 10)));
- input_report_abs(dev, ABS_Y,
- ~(__s16) le16_to_cpup((__le16 *)(data + 12)));
-
- /* right stick */
- input_report_abs(dev, ABS_RX,
- (__s16) le16_to_cpup((__le16 *)(data + 14)));
- input_report_abs(dev, ABS_RY,
- ~(__s16) le16_to_cpup((__le16 *)(data + 16)));
+ if (xpad->mapping & MAP_FERRARI_458_CUSTOM_AXES) {
+ /* steering wheel */
+ input_report_abs(dev, ABS_X,
+ ((__u16) le16_to_cpup((__le16 *)(data + 6))) - S16_MAX);
+ } else {
+ /* left stick */
+ input_report_abs(dev, ABS_X,
+ (__s16) le16_to_cpup((__le16 *)(data + 10)));
+ input_report_abs(dev, ABS_Y,
+ ~(__s16) le16_to_cpup((__le16 *)(data + 12)));
+
+ /* right stick */
+ input_report_abs(dev, ABS_RX,
+ (__s16) le16_to_cpup((__le16 *)(data + 14)));
+ input_report_abs(dev, ABS_RY,
+ ~(__s16) le16_to_cpup((__le16 *)(data + 16)));
+ }
}
/* triggers left/right */
@@ -1154,6 +1160,11 @@ static void xpadone_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char
(__u16) le16_to_cpup((__le16 *)(data + 6)));
input_report_key(dev, BTN_TR2,
(__u16) le16_to_cpup((__le16 *)(data + 8)));
+ } else if (xpad->mapping & MAP_FERRARI_458_CUSTOM_AXES) {
+ input_report_abs(dev, ABS_Z,
+ (__u16) le16_to_cpup((__le16 *)(data + 10)));
+ input_report_abs(dev, ABS_RZ,
+ (__u16) le16_to_cpup((__le16 *)(data + 8)));
} else {
input_report_abs(dev, ABS_Z,
(__u16) le16_to_cpup((__le16 *)(data + 6)));
--
2.50.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] xpad: Add support for Thrustmaster, Inc. Ferrari 458 Spider Racing Wheel
2025-08-05 19:20 [PATCH 0/3] xpad: Add support for Thrustmaster, Inc. Ferrari 458 Spider Racing Wheel Pär Eriksson
` (2 preceding siblings ...)
2025-08-05 19:20 ` [PATCH 3/3] Input: xpad - Implement custom axis mapping for Ferrari 458 Spider Pär Eriksson
@ 2025-08-05 20:23 ` Vicki Pfau
2025-08-05 20:57 ` Dmitry Torokhov
3 siblings, 1 reply; 7+ messages in thread
From: Vicki Pfau @ 2025-08-05 20:23 UTC (permalink / raw)
To: Pär Eriksson, Dmitry Torokhov, Pavel Rojtberg,
Nilton Perim Neto, Antheas Kapenekakis, Mario Limonciello,
linux-input, linux-kernel
Hi Pär,
On 8/5/25 12:20 PM, Pär Eriksson wrote:
> Hello,
>
> This patch series adds support for the Thrustmaster, Inc. Ferrari 458 Spider Racing Wheel (USB ID 044f:b671) to the xpad driver. The implementation is inspired by the work in https://github.com/Capure/xpad.
>
> The wheel reports steering and pedal data at non-standard offsets, so custom axis mapping is introduced via a new mapping flag.
> I have tested the changes with the actual hardware on Fedora 42 (kernel 6.15.7-200.fc42.x86_64), and confirmed correct input reporting.
>
> If you prefer a different name for the mapping flag, please let me know.
>
> Please consider this for upstream inclusion.
>
> Pär Eriksson (3):
> Input: xpad - Add MAP_FERRARI_458_CUSTOM_AXES mapping flag
> Input: xpad - Add Thrustmaster Ferrari 458 Spider (044f:b671) device
> entry
> Input: xpad - Implement custom axis mapping for Ferrari 458 Spider
>
> drivers/input/joystick/xpad.c | 35 ++++++++++++++++++++++++-----------
> 1 file changed, 24 insertions(+), 11 deletions(-)
>
So I have several concerns with this series in general. First of all, it should be just one patch, but more importantly, the device *does* have standard offsets...just not standard *gamepad* offsets. GIP, the Xbox One controller protocol, uses GUIDs to specify the type of device in question. Most devices you're familiar with use the gamepad GUID, but the wheels use a different one which have a different set of mappings. So ideally, the name of the flag would be MAP_WHEEL.
However, the problem runs deeper. This is all easily detectable from the metadata. xpad *in general* does not support the metadata parsing, so we can't autodetect it without parsing it. Unfortunately, the metadata message is fragmented. xpad *in general* does not support fragmented messages. xpad is based on a very rudimentary understanding of the protocol, which is very obsolete at this point.
I have a new driver I've been working on for a few months that supports all of this stuff properly, including wheels, that I am hoping to support for the 6.17 merge window. I may be too late, but if I submit it soon you can at least pull it downstream while waiting for the 6.18 merge window. I'll see if I can get it ready before the end of the week.
Vicki
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] xpad: Add support for Thrustmaster, Inc. Ferrari 458 Spider Racing Wheel
2025-08-05 20:23 ` [PATCH 0/3] xpad: Add support for Thrustmaster, Inc. Ferrari 458 Spider Racing Wheel Vicki Pfau
@ 2025-08-05 20:57 ` Dmitry Torokhov
2025-08-06 0:16 ` Vicki Pfau
0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Torokhov @ 2025-08-05 20:57 UTC (permalink / raw)
To: Vicki Pfau
Cc: Pär Eriksson, Pavel Rojtberg, Nilton Perim Neto,
Antheas Kapenekakis, Mario Limonciello, linux-input, linux-kernel
Hi Vicki,
On Tue, Aug 05, 2025 at 01:23:39PM -0700, Vicki Pfau wrote:
> I have a new driver I've been working on for a few months that
> supports all of this stuff properly, including wheels, that I am
> hoping to support for the 6.17 merge window.
6.17 merge window is closing this weekend so no new drivers can go into
it anymore, only what was in maintainer trees/linux-next.
6.18 is the earliest option.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] xpad: Add support for Thrustmaster, Inc. Ferrari 458 Spider Racing Wheel
2025-08-05 20:57 ` Dmitry Torokhov
@ 2025-08-06 0:16 ` Vicki Pfau
0 siblings, 0 replies; 7+ messages in thread
From: Vicki Pfau @ 2025-08-06 0:16 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Pär Eriksson, Pavel Rojtberg, Nilton Perim Neto,
Antheas Kapenekakis, Mario Limonciello, linux-input, linux-kernel
Hi Dmitry
On 8/5/25 1:57 PM, Dmitry Torokhov wrote:
> Hi Vicki,
>
> On Tue, Aug 05, 2025 at 01:23:39PM -0700, Vicki Pfau wrote:
>
>> I have a new driver I've been working on for a few months that
>> supports all of this stuff properly, including wheels, that I am
>> hoping to support for the 6.17 merge window.
>
> 6.17 merge window is closing this weekend so no new drivers can go into
> it anymore, only what was in maintainer trees/linux-next.
I see. I haven't been paying attention to how merge window timing works until now, so that's on me for not cleaning it up sooner for this cycle. My other concerns for this patchset still stand, though.
>
> 6.18 is the earliest option.
That gives me more time to clean it up and generally get it working better, so I guess it's a trade-off here. It's still missing some features I'd like to get in so I don't have to do significant refactoring later.
>
> Thanks.
>
Thanks,
Vicki
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-08-06 0:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-05 19:20 [PATCH 0/3] xpad: Add support for Thrustmaster, Inc. Ferrari 458 Spider Racing Wheel Pär Eriksson
2025-08-05 19:20 ` [PATCH 1/3] Input: xpad - Add MAP_FERRARI_458_CUSTOM_AXES mapping flag Pär Eriksson
2025-08-05 19:20 ` [PATCH 2/3] Input: xpad - Add Thrustmaster Ferrari 458 Spider (044f:b671) device entry Pär Eriksson
2025-08-05 19:20 ` [PATCH 3/3] Input: xpad - Implement custom axis mapping for Ferrari 458 Spider Pär Eriksson
2025-08-05 20:23 ` [PATCH 0/3] xpad: Add support for Thrustmaster, Inc. Ferrari 458 Spider Racing Wheel Vicki Pfau
2025-08-05 20:57 ` Dmitry Torokhov
2025-08-06 0:16 ` Vicki Pfau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).