Elantech trackpad driver

I own a T480s which allegedly has a v4 Elantech trackpad (aka Clickpad) with firmware v. 0x7f3001.
I enabled the driver by returning B_OK from probe_elantech() but unfortunately after succesfully detecting it (the magic knock is accepted and the device returns a valid response) all I get in the syslog is:

KERN: ps2: hot plugin of input/touchpad/ps2/elantech_0
KERN: ps2: device input/touchpad/ps2/elantech_0 still active, republishing...
KERN: ps2: devfs_unpublish_device input/touchpad/ps2/elantech_0, status = 0x00000000
KERN: ELANTECH: fw 7F3001 hw 04.
KERN: ps2: devfs_publish_device input/touchpad/ps2/elantech_0, status = 0x00000000
USER 'KS': Notify of added/removed/started/stopped device
Last message repeated 1 time

several times and it seems that no other functions are called, not even elantech_open(). Could anyone shed a light on this? maybe @korli?

PS: please note that I’ve changed some traces and added the logic to retrieve and check the hardware version but none of these changes affect the behaviour.

Is the device visible in /dev/? If so, then the question would be why input_server didn’t open it.

Yes it’s published as elantech_0

Did you restart the input server?

I blocklisted the ps2 bus manager and let the system load it from non-packaged. I delete the syslog and reboot every single time to start afresh so I don’t need to restart the input server, do I?

The device is published under /dev/input/touchpad/ps2/elantech_0, is there anything that might prevent the input server from detecting it as a touchpad instead of a mouse?

From the log you posted, it looked like you replaced the driver during runtime, at least that’s how I read those unpublish driver lines. In any case, I have no idea why it wouldn’t pick it up, looking at its source might help, or try opening the driver manually.