tsc2004 touchscreen driver on Jelly Bean(JB) jb4.2.1_1.0.0-alpha

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

tsc2004 touchscreen driver on Jelly Bean(JB) jb4.2.1_1.0.0-alpha

Jump to solution
4,197 Views
ManoharChinnadu
Contributor III

Hi All,

Here i'm using jb4.2.1_1.0.0-alpha base code to bringup android Jelly bean on imx6 based hardware and i'm using tsc2004 Resistive touch screen driver.

From the kernel, i'm able to bringup the touchscreen driver and able to get the events from the touch screen driver to UI. But X and Y co ordinates are not properly configured.

i'm using tsc2004.idc and /data/system/calibration which is working for ICS and which is not effecting on the JB release.

i try to calibrate using ts_calibrate tool to calibrate and it's not working properly.

In JB, what is the procedure to calibrate JB based device?

Thanks in advance.

Labels (2)
0 Kudos
Reply
1 Solution
1,577 Views
EricNelson
Senior Contributor II

Hi Manohar,

The ts_calibrator program does this.

https://github.com/boundarydevices/android_system_core/blob/nitrogen6x/ts_calibrator/ts_calibrator.c...

Note that it takes the multi-line data shown above and converts it into a single line, separated by commas.

View solution in original post

0 Kudos
Reply
4 Replies
1,577 Views
EricNelson
Senior Contributor II

We integrated these patches into our latest JB code base, but found that there's an issue running exec from init.rc.

Some notes are available in this post:

     http://boundarydevices.com/android-jellybean-on-i-mx6-with-no-disclaimers/

0 Kudos
Reply
1,577 Views
EricNelson
Senior Contributor II

Hi Manohar,

The tsc2004 device needs calibration. I haven't yet worked through the JB details, but on ICS (and Gingerbread and Froyo before that), we've needed to patch the ts_calibrator as shown here:

    https://github.com/boundarydevices/android_system_core/commits/gingerbread/ts_calibrator

The key piece is that it looks for 'tsdev' on the kernel command line to identify the touch device.

Then you'll need to call out to the calibrator in your init as shown here:

  https://github.com/boundarydevices/android_device_boundary/blob/nit6x-wifi/nitrogen6x/init.rc#L124

Or, if you're running on one of our boards, you might be able to copy this set of coefficients into

/sys/module/tsc2004/parameters/calibration:

     -68188

     695

     271392166

     -1150

     70727

     -9349007

0 Kudos
Reply
1,577 Views
ManoharChinnadu
Contributor III

Thanks Eric,

The /data/system/calibration file coordinates are not picking up from the sysfs entry fil /sys/module/tsc2004/parameters/calibration( from sysfs entry it's showing 0,0,0,0,0,0 value)

The tsc2004.c driver file is not part of the JB release kernel source and i just integrated the driver file by taking from ICS release kernel by modifying the Makefile and Kconfig files.

how does sysfs entry file pickup the calibration coordinates from the /data/system/calibration file from the Android ICS code.?

0 Kudos
Reply
1,578 Views
EricNelson
Senior Contributor II

Hi Manohar,

The ts_calibrator program does this.

https://github.com/boundarydevices/android_system_core/blob/nitrogen6x/ts_calibrator/ts_calibrator.c...

Note that it takes the multi-line data shown above and converts it into a single line, separated by commas.

0 Kudos
Reply