CONFIG_TOUCHSCREEN_ADS7846=y
in kernel config
Compile overlay and add: (maybe different per tablet, goodtft/LCD-show)
dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900
Add ADS7846_Touchscreen.idc to /system/usr/idc/
ADS7846_Touchscreen.idc:
# This is an internal device, not an external peripheral attached to the USB
# or Bluetooth bus.
device.internal = 1
# The device should behave as a touch screen, which uses the same orientation
# as the built-in display.
touch.deviceType = touchScreen
touch.orientationAware = 1
My touchscreen had swapped xy and inverted x axis. Changed kernel/arpi/drivers/input/touchscreen/ads7846.c
~line 1384
+ ts->core_prop.swap_x_y = true;
+ ts->core_prop.invert_x = true;