how to implement a touch panel driver? (ST1633i)

stsemant

New Member
Hi,

I have absolutely no idea when dealing with drivers under Linux, so I am now trusting to your forum and I hope that someone can help me.
I have an LCD display with capacitive touch panel. The touch controller is the ST1633i (sends the coordinates of the user input via I2C) and that's it.
I would like the inputs to be recognized by the operating system via the touch panel.
I also found a driver for the ST1633i (https://gitlab.indel.ch/thirdparty/linux-indel/blob/b7781d129f7c23f33fccc5566c17a4752aa4a798/drivers/input/touchscreen/st1633.c).
My questions are now:
How do I correctly insert this driver? Where do I have to save it?
What else do I have to do? What should I put attention on?
Is there a general workflow for this?
How can I test this?

I know, I could easily integrate the reading of user input into my application program. But I find the way with the driver the most elegant. Regardless, I'm interested.
Operating system: Linux Angstrom (Yocto Project).
Hardware: Toradex VF61 (https://www.toradex.com/en/computer-on-modules/colibri-arm-family/nxp-freescale-vybrid-vf6xx)

Many thanks in advance!
 


JulienCC

Active Member
How do I correctly insert this driver? Where do I have to save it?
Compile it following the provided instructions. It should make a .ko file. Then load it with insmod or modprobe.

You could also put it in the kernel directory, use the appropriate subdirectory
Code:
/lib/modules/YOUR_KERNEL_VERSION/kernel/
What else do I have to do? What should I put attention on?
Make it load automatically. But don't do it before you a sure it's not going to make your system crash. In case of problem you can always use grub to boot with a limited set of modules.
Check that the code you got is compatible with your current kernel version.

Is there a general workflow for this?
How can I test this?
I would say like any project : have some version control, some tools chain to build. Then load the module.

Keep us posted with your results.
 

Members online


Top