Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How to handle devices on non-standard busses #835

Open
nik012003 opened this issue Nov 18, 2024 · 2 comments
Open

[Question] How to handle devices on non-standard busses #835

nik012003 opened this issue Nov 18, 2024 · 2 comments

Comments

@nik012003
Copy link

Hi, I have my tablet's pen working on a downstream branch of linux mainline ( https://gitlab.postmarketos.org/panpanpanpan/sm8150-mainline ) and it will soon get supported by postmarket os and other distros.
The devices uses the spi bus, and is registered as such in the touchscreen/pen driver ( ts->input_dev->id.bustype = BUS_SPI ), without vendor/product ids.
What's the best option here to get it running with libwacom? Should I register it on a fake an I2C/usb bus on the drvier and assign an arbirary vid/pid? Or should I add SPI bus support in libwacom? in that case, how would I handle identification of the device since SPI doesn't really have vendor ids like usb does? systemd/evdev solves this by allowing dmi pattern matching for input devices.

@whot
Copy link
Member

whot commented Nov 18, 2024

Adding spi would be quite trivial, just a few lines of additions where we currently have "usb" or "bluetooth". But without vid/pid that's a bit pointless.

We could extend the DeviceMatch handling for a dmi prefix and then treat the rest of it as modalias. That's more work but should be doable and seems to be what we needhere?

I won't have time to work on this in the near future but at least with the new-ish builder pattern this should be relatively trivial to add now if you want to have a go at that.

@nik012003
Copy link
Author

Adding spi would be quite trivial, just a few lines of additions where we currently have "usb" or "bluetooth". But without vid/pid that's a bit pointless.

We could extend the DeviceMatch handling for a dmi prefix and then treat the rest of it as modalias. That's more work but should be doable and seems to be what we needhere?

I won't have time to work on this in the near future but at least with the new-ish builder pattern this should be relatively trivial to add now if you want to have a go at that.

Thank you for your input! I'll give it a shot and implement dmi pattern matching over the next few weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants