3

I'm having some difficulties writing a kernel mode driver on debian wheezy for a custom touch screen, that has driver only for windows. My main problem is, that I have absolutely no experience in driver programming, apart from the tutorial write-to-system-log module I've found on the internet. Also, I have some more specific problems as can be seen below.

Hardware structure: The touch screen itself is connected to a microcontroller, that connects through serial port to the computer. I've managed to initialize the controller from user-space program connecting through ttyS0, and recieve raw data from the touch screen, but I just couldn't manage to get started from kernel space.

I've looked around in drivers/input/touchscreen/, opened a few .c files, so maybe I could find out, how to start at least, but I'm pretty stuck around here, because I can't substitute some values to match my hardware. In linux/serio.h there is a long list of defines for serio protocols, that for example elo touch screen's driver is using:

#define SERIO_ELO       0x29

Is there any kind of documentation about these values, their meanings, or how they are interpreted?

Are there any books or websites, from which I could learn more about this topic? For now, this is a really dark spot for me.

I don't intend to ask for a full solution, but I'd really appreciate some examples or tutorials regarding serial communicaton and/or touch event gerenation in kernel mode.

Thanks in advance for your help.

phazek
  • 31
  • 2
  • Have you considered using a USB HID MCU so that you don't need to write any drivers at all? – Ignacio Vazquez-Abrams Mar 28 '14 at 15:44
  • The problem is, that I can't really modify the hardware structure at all, because this is an encased embedded system. There are thousands of these devices present at customers, and we've just started to port the software to linux. So yeah... we have quite a few restrictions. – phazek Mar 29 '14 at 08:35
  • If your user-space code already works, try the `uinput` device. – CL. Mar 29 '14 at 10:33
  • Thank you, I'm going to try that together with select() function. Maybe the kernel mode wasn't a good idea after all. – phazek Apr 02 '14 at 09:39

0 Answers0