imx6 touchscreen calibration

Hello,

I am working with a imx6 digi board, OS linux, kernel version 4.9 builded with yocto 2.4.

I need to calibrate touch screen because, when I touch near to display’s border theres is a difference between the cursor and the point touched (uncalibrated).

First, I used xinput_calibrator, changing transformation matrix but i tried differents parameters configurations and I couldn’t improved the function as I needed.

Then, I used tslib with ts_calibrate and when I run ts_test the touchscreen is calibrated but when I close ts_test the touchscreen is uncalibrated. It seems like the touchscreen doesn’t loaded the calibration.

I have setted the following environment variables :

export TSLIB_TSDEVICE=/dev/input/toucscreen0 export TSLIB_TSEVENTTYPE=INPUT export TSLIB_CONFFILE=/etc/ts.conf export TSLIB_CALIBFILE=/etc/pointercal
I believe that ts_test can read the calibration configuration parameters from pointercal file but when I close ts_test the system It cannot.

Someone can hellp me with this issue?

Thanks