Code:
Name: ads7846Info: ADS7846 Touch controllerLoad: dtoverlay=ads7846,<param>=<val>Params: cs SPI bus Chip Select (default 1) speed SPI bus speed (default 2MHz, max 3.25MHz) penirq GPIO used for PENIRQ. REQUIRED penirq_pull Set GPIO pull (default 0=none, 2=pullup) swapxy Swap x and y axis xmin Minimum value on the X axis (default 0) ymin Minimum value on the Y axis (default 0) xmax Maximum value on the X axis (default 4095) ymax Maximum value on the Y axis (default 4095) pmin Minimum reported pressure value (default 0) pmax Maximum reported pressure value (default 65535) xohms Touchpanel sensitivity (X-plate resistance) (default 400) invx Invert x axis invy Invert y axis penirq is required and usually xohms (60-100) has to be set as well. Apart from that, pmax (255) and swapxy are also common. The rest of the calibration can be done with xinput-calibrator. See: github.com/notro/fbtft/wiki/FBTFT-on-Raspian Device Tree binding document: www.kernel.org/doc/Documentation/devicetree/bindings/input/ads7846.txtCode:
pi@newpi5:~/linux/arch/arm/boot/dts/overlays $ sudo libinput measure touchpad-size 320x480 /dev/input/event5Device does not have resolutions.Kernel specified touchpad size: 319.0x479.0mmUser specified touchpad size: 320.0x480.0mmKernel axis range: x [ 0.. 319], y [ 0.. 479]Detected axis range: x [ 5.. 314], y [ 15.. 474]Move one finger along all edges of the touchpaduntil the detected axis range stops changing.+------------------------------+| || || || || || || || || || O|| || || || || || || || || |+------------------------------+ Press Ctrl+C to stop Code:
touchscreen-size-x = <320>; touchscreen-size-y = <480>; touchscreen-x-mm = <49>; touchscreen-y-mm = <74>;Code:
Kernel specified touchpad size: 319.0x479.0mmUser specified touchpad size: 320.0x480.0mmStatistics: Posted by aBUGSworstnightmare — Mon Jul 14, 2025 9:37 am