ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I got an USB touchscreen. The touchscreen on my device is a PenMount 6000 USB. When running dmesg, this is what I found about it:
<6>[ 4.033918] input: DIALOGUE INC PenMount USB as /class/input/
input6
<7>[ 4.060448] evbug.c: Connected device: "DIALOGUE INC PenMount
USB", usb-0000:00:1d.7-4.1/input0
<6>[ 4.060456] input: USB HID v0.01 Mouse [DIALOGUE INC PenMount
USB] on usb-0000:00:1d.7-4.1
<6>[ 4.066725] usbcore: registered new interface driver usbhid
<6>[ 4.070042] drivers/hid/usbhid/hid-core.c: v2.6:USB HID core
driver
This says it's registered as a USB HID. Information from /proc/bus/input/devices
I: Bus=0003 Vendor=14e1 Product=6000 Version=0001
N: Name="DIALOGUE INC PenMount USB"
P: Phys=usb-0000:00:1d.7-4.1/input0
S: Sysfs=/class/input/input6
U: Uniq=
H: Handlers=mouse0 event6 evbug
B: EV=1b
B: KEY=30000 0 0 0 0 0 0 0 0
B: ABS=3
B: MSC=10
It is registered as /dev/input/event6.
Now I want to write my own driver for this touchscreen. It looks like it's using an other driver. Can I write my own and will it use my driver instead of the standard USB driver?
I got an USB touchscreen. The touchscreen on my device is a PenMount 6000 USB. When running dmesg, this is what I found about it:
<6>[ 4.033918] input: DIALOGUE INC PenMount USB as /class/input/
input6
It is registered as /dev/input/event6.
Now I want to write my own driver for this touchscreen. It looks like it's using an other driver. Can I write my own and will it use my driver instead of the standard USB driver?
You don't say anything about what version/distro of Linux, but did you Google for this? Or visit the PenMount website?
My distro is not mentioned. But the main thing is that it's recognized as USB hid. If I would write my own driver with specific VendorID and productID, will it overload the other 'driver' ?
And how do I know what kernel driver a device uses? What code will be called at the moment when I touch the screen.
All the USB HID driver code is located in /drivers/hid/ from the root kernel directory tree. Thankfully, it's quite easy to understand although you may have to do some Googling first (primary about the HID spec if you don't already know it).
All the USB HID driver code is located in /drivers/hid/ from the root kernel directory tree. Thankfully, it's quite easy to understand although you may have to do some Googling first (primary about the HID spec if you don't already know it).
But it looks the USB core now redirects the touchscreen to the usb hid driver. How can I redirect it to my own driver?
My distro is not mentioned. But the main thing is that it's recognized as USB hid. If I would write my own driver with specific VendorID and productID, will it overload the other 'driver' ?
And how do I know what kernel driver a device uses? What code will be called at the moment when I touch the screen.
And you still haven't mentioned it. There's Fedora, SuSE, Slackware and Ubuntu on their site, as well as the source-code driver, ready to compile and use.
And you still haven't mentioned it. There's Fedora, SuSE, Slackware and Ubuntu on their site, as well as the source-code driver, ready to compile and use.
I'm using Android. I need myself a kernel driver. But I'm almost there at the moment. Just need to get the correct X and Y values from the device. I yet don't know what to do with the data I'm getting in from it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.