Il 08/03/21 15:00, Jiri Kosina ha scritto:
- I don't think we need to have this in a separate driver, is there a substantial reason why it can't be folded into hid-thrustmaster proper?
I didn't add the init code to the hid-tmff as the ff stands for force feedback and hid-tminit does a completely different job.
However there are no significant reasons to avoid folding the two logics in a common module hid-tmff or hid-thrustmaster.
- Looking at what the code actually does, it seems like this could completely be done in userspace via libusb as a hook in udev when such device is plugged in, can't it?
Yes indeed Kim wrote a python script (https://github.com/Kimplul/py-tminit) that does the same job via libusb.
One can argue that when the joystick is attached and appears like a "Thrustmaster FFB Wheel" is, as far as we know, useless as the hid descriptor is broken for the axis and some features, like changing the range via LEFT|RIGHT + MODE button, seem to not work at all. So with a kernel driver built-in one could just plug a supported wheel and have at least a semi-functional joystick correctly identified by its model name out of the box without installing anything else on the system. (I say semi-functional because without force feedback support for the specific joystick the wheel remains stiff to steer)