inverted touch on ads7846 chip

448 views
Skip to first unread message

Manav Gautama

unread,
Dec 4, 2008, 11:42:05 AM12/4/08
to android...@googlegroups.com
Dear droidans,
I have a ads7846 chip and the tslib working fine on a
2.6.27 kernel ported to my 2430 based board, with Xorg and tslib have
got it to give fine calibration and behaviour. On using android i am
getting inverted touch with reference being the X axis. Any tips on how
to get it calibrated on android ?

Warm regards,
Manav

bandwidthcrunch at gmail dot com

www.bandwidthcrunch.com


Maxime Petazzoni

unread,
Dec 4, 2008, 2:30:56 PM12/4/08
to android-porting
Hi,

You need to invert the READ_X and READ_Y calls in drivers/input/
touchscreen/ads7846.c for the ts->read_x and ts->read_y values. This
is a well known OmapZoom issue with Android.

- Maxime

Kai Wei

unread,
Jan 13, 2009, 8:37:07 AM1/13/09
to android-porting
Hi,
How can I get calibration with android? The value returned by driver
seemed too big to be used directly.

On Dec 5 2008, 3:30 am, Maxime Petazzoni <maxime.petazz...@gmail.com>
wrote:
> Hi,
>
> You need to invert the READ_X and READ_Y calls in drivers/input/
> touchscreen/ads7846.c for the ts->read_x and ts->read_y values. This
> is a well known OmapZoom issue with Android.
>
> - Maxime
>
> On Dec 4, 8:42 am, Manav Gautama <ma...@bandwidthcrunch.com> wrote:
>
> > Dear droidans,
> >                    I have aads7846chip and the tslib working fine on a

vishal bhoj

unread,
Jan 15, 2009, 3:31:10 AM1/15/09
to android...@googlegroups.com
hi,

TOuch screen is not working for me on omapzoom. when i run pointer location i don get any values there. when i touch only the top time & date bar slides down and goes back. what has to be changed to get touch screen working in android on omap3evm
--
with regards vishal

vishal bhoj

unread,
Jan 15, 2009, 3:34:28 AM1/15/09
to android...@googlegroups.com
when i did a logcat i get 
Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@4)
D/InputManagerService(  554):
 hide the small icon for the input method
W/InputManagerService(  554):
Ignoring focus gain of: android.view.inputmethod.InputMethodManager$1@435b54c0
--
with regards vishal

Qingzhan Zhang

unread,
Jan 16, 2009, 4:21:25 AM1/16/09
to android...@googlegroups.com
in your touch driver ,you should set the x/y/pressure's MAX value and MIN value,the android according to the MAX and MIN value  to calculate your inputing values

pramod

unread,
Jan 20, 2009, 3:36:00 AM1/20/09
to android-porting, visha...@gmail.com
hi all,

We have ported android on the ARM9 based board. We are able to see the
home page after booting android on target. But the touch screen is not
working. The touch screen driver is modified to pass the of X,Y
pressure as shown below.

xtmp = (axis_table[2] + axis_table[0]*x + axis_table
[1]*y )>>axis_table[6];
ytmp = (axis_table[5] + axis_table[3]
*x + axis_table[4]*y )>>axis_table[6];

printk("x (xtmp)-> %d (%d)\t y(ytmp) -
> %d (%d)\n p->%d\n",x,xtmp,y,ytmp,p);


input_report_abs(d->idev, ABS_X,
ytmp);
input_report_abs(d->idev, ABS_Y,
xtmp);
input_report_abs(d->idev,
ABS_PRESSURE, p);
input_report_key(d->idev,BTN_TOUCH,1);
input_sync(d->idev);

ours is resistance based touchscreen with resoultion of 240*432.

The pointer location application of the android does'nt recognise the
touch screen inputs. The touch screen is calibrated using ts_calibrate
of tslib. The max values for x and y is 4095.

Currently the date and time bar scrolls down upon clicking on the
screen, we are not able to lauch any of the applications.

Can anyone please tell what needs to be done to correct the
touchscreen issue.

Thanks

Pramod

Qingzhan Zhang

unread,
Jan 20, 2009, 9:50:47 PM1/20/09
to android...@googlegroups.com
when you init your touch driver,you should set some params
as below
        input_set_abs_params(codec_ts_input, ABS_X, X_MIN, X_MAX, 0, 0);
        input_set_abs_params(codec_ts_input, ABS_Y, Y_MIN, Y_MAX, 0, 0);
        input_set_abs_params(codec_ts_input, ABS_PRESSURE, PRESSURE_MIN, PRESSURE_MAX, 0, 0);

pramod

unread,
Jan 20, 2009, 10:52:34 PM1/20/09
to android-porting
hi

init of touch screen driver already has the code mentioned by you. i
am passing the MIN and MAX values for x,y and pressure as shown
below..

#define ADC_MAX ((1 << 12) - 1)

input_set_abs_params(data->idev, ABS_X, 0, ADC_MAX, 0, 0);
input_set_abs_params(data->idev, ABS_Y, 0, ADC_MAX, 0, 0);
input_set_abs_params(data->idev, ABS_PRESSURE, 0, ADC_MAX, 0, 0);

still the touchscreen is not working.
> > > >> On Tue, Jan 13, 2009 at 8:37 AM, Kai Wei <kai.w...@gmail.com>

AJAY

unread,
Jan 27, 2009, 12:03:39 AM1/27/09
to android-porting
Hi Vishal,

I too am facing the same issue with Touchscreen.On touching the
touchcreen at any location the top time & date bar slides.

How did you resolve this issue ?

Thanks
Ajay

> down and goes back
> with regards vishal- Hide quoted text -
>
> - Show quoted text -

Patrick Heeb

unread,
Jan 27, 2009, 3:38:17 AM1/27/09
to android...@googlegroups.com
Hi,

the input framework depends on a working power driver.
without an enabled android power driver, the framework will not
handle the input-events correctly and constantly report x=0,y=0 as
the location of the touch event.

so either enable the android power driver in the kernel, or dig yourself
into the android input framework. (com.android.server.KeyInputQueue
is the place to start)

cheers
Patrick

AJAY

unread,
Jan 27, 2009, 4:21:44 AM1/27/09
to android-porting
Hi Patrick,

Thanks for the response . I have PM disabled in the kernel . Will
checkout enabling it.

Thanks
Ajay
> >> - Show quoted text -- Hide quoted text -

virstud

unread,
Jan 28, 2009, 11:15:05 AM1/28/09
to android-porting
I have whis problem too.
repo sync kernel
2.6.27
pxafb work.
enable android power drv, PM drv
keypad work.
spi driver work.
ads7846 (tsc2046) work.
On touching the
touchcreen at any location the top time & date bar slides.

How did you resolve?
help please

girish

unread,
Jan 28, 2009, 1:15:58 PM1/28/09
to android...@googlegroups.com
the cupcake power should be properly enabled in kernel space.

2009/1/28 virstud <russia....@gmail.com>

virstud

unread,
Jan 28, 2009, 2:21:14 PM1/28/09
to android-porting
cd mydroid
grep -R cupcake ./
not result

What is cupcake?
And how it is linked with ads7846?

On 28 янв, 21:15, girish <neo.driz...@gmail.com> wrote:
> the cupcake power should be properly enabled in kernel space.
>
> 2009/1/28 virstud <russia.proje...@gmail.com>

virstud

unread,
Jan 29, 2009, 5:23:19 PM1/29/09
to android-porting
help

On 28 янв, 21:15, girish <neo.driz...@gmail.com> wrote:
> the cupcake power should be properly enabled in kernel space.
>
> 2009/1/28 virstud <russia.proje...@gmail.com>

AJAY

unread,
Feb 3, 2009, 2:38:48 AM2/3/09
to android-porting
Yes the problem got solved enabling Android PM module in Kernel.

virstud

unread,
Feb 18, 2009, 2:41:34 AM2/18/09
to android-porting
i solved whis problem
replase ads7846.c --> loox720_spi_ads7846.c(enable auto scale -
comment ifdef CONFIG_LOOX720_ADS7846_AUTOCAL)

and edit my mod looxc550.c spi ts init section

get loox720_spi_ads7846.c:
http://4pda.ru/forum/index.php?showtopic=80918&view=findpost&p=2426808
or
svn co svn://svn.loox720.admitech.pl/handhelds/kernel26/branches/loox720-2.6.26/
loox720-2.6.26

touchscreen now work with android cupcake



On 3 фев, 10:38, AJAY <ajay...@gmail.com> wrote:
> Yes the problem got solved enabling Android PM module in Kernel.
>
> On Jan 30, 3:23 am, virstud <russia.proje...@gmail.com> wrote:
>
> > help
>
> > On 28 янв, 21:15, girish <neo.driz...@gmail.com> wrote:
>
> > > the cupcake power should be properly enabled in kernel space.
>
> > > 2009/1/28 virstud <russia.proje...@gmail.com>
>
> > > > I have whis problem too.
> > > > repo sync kernel
> > > > 2.6.27
> > > > pxafb work.
> > > > enable android power drv, PM drv
> > > > keypad work.
> > > > spi driver work.
> > > >ads7846(tsc2046) work.

virstud

unread,
Feb 25, 2009, 4:37:00 AM2/25/09
to android-porting
http://4pda.ru/forum/index.php?showtopic=80918&view=findpost&p=2453267
resolv problem - android power management driver in 2.6.27 - /cupcake/
kernel/kernel/power


On 18 фев, 10:41, virstud <russia.proje...@gmail.com> wrote:
> i solved whis problem
> replaseads7846.c  -->  loox720_spi_ads7846.c(enable auto scale -

Sarath AK

unread,
Jun 8, 2016, 8:06:33 AM6/8/16
to android-porting, Ganapathi Mathiyalagan, bayte...@gmail.com

HI,

I need a help to solve touch panel problem, I new to android os.

I am facing an issue in ADS7876 Touchpanal in Android 4.4 with Kernel 4.1 ,

i connected it with AM335x Beaglebone Black working fine , and it initialized fine with this kernel.

my board sense the in interrupt and generate the clock and data signal.

In Android 4.1 ads7846 mounted on /dev/input/event0.

but if i Check the event by using getevent -tl /dev/input/event0

did not get any event from my touch .

please help me.
Reply all
Reply to author
Forward
0 new messages