I port Android Gingerbread to my custom board (with Samsung S5PV210 processor). I have a touch screen with an ESC7000 chip. I found the driver in /kernel/drivers/input/touchscreen/usbtouchscreen.c. It almost worked, but the order of the bits, the order and the byte order were not very good in USB packets. I changed the code to get the correct RAW position (I use printk on the console to see it), and now it almost works. My data ranges from xmin, ymin to xmax, ymax - from 420 430 to 3650, 3650, whereas in theory this should be from 0.0 to 4095.4095. This is not surprising, since capacitive sensing requires calibration. This is a simple calibration, such as y = mx + b for each axis (simple linear calibration). I looked around the drivers, and I canโt understand where the calibration is done. It must be programmed because it is device dependent and must be calibrated for each device once during the production of the system. I want to make it clean, like other Android devices. Does anyone know where calibration information is stored in the Android system? Where is the code that calculates the compensation. Any web search about this gives information about people who want to recalibrate their phone. So it is useless to me.
source share