[android-kernel] how to test touchscreen driver

1,297 views
Skip to first unread message

bridgette

unread,
May 12, 2010, 12:12:14 PM5/12/10
to Android Linux Kernel Development
I am using the tsc2005 driver but it is not being recognized. Any
suggestions on how to test?

I have printk statements throughout that indicate that it is being
initialized but I'd like to test to what happens when I touch the
screen and if it is atleast recognizing it.

Thanks.

--
unsubscribe: android-kerne...@googlegroups.com
website: http://groups.google.com/group/android-kernel

karthik poduval

unread,
May 12, 2010, 12:40:19 PM5/12/10
to android...@googlegroups.com
Check if there is a registration with input dev subsystem in the driver and see if its passed or failed. There also should be a middle ware process to read these events from the input dev and pass them to the Android framework. Check if this process is running.

-- 
Regards,
Karthik Poduval

bridgette

unread,
May 12, 2010, 2:02:00 PM5/12/10
to Android Linux Kernel Development
Thanks...the driver is being registered. What is the middleware
process that reads these events and passes them to the Android
Framework?

On May 12, 11:40 am, karthik poduval <karthik.podu...@gmail.com>
wrote:
> Check if there is a registration with input dev subsystem in the driver and
> see if its passed or failed. There also should be a middle ware process to
> read these events from the input dev and pass them to the Android framework.
> Check if this process is running.
>
> --
> Regards,
> Karthik Poduval
>
> On Wed, May 12, 2010 at 11:12 AM, bridgette <tbridge...@yahoo.com> wrote:
> > I am using the tsc2005 driver but it is not being recognized.  Any
> > suggestions on how to test?
>
> > I have printk statements throughout that indicate that it is being
> > initialized but I'd like to test to what happens when I touch the
> > screen and if it is atleast recognizing it.
>
> > Thanks.
>
> > --
> > unsubscribe: android-kerne...@googlegroups.com<android-kernel%2Bunsu...@googlegroups.com>

bridgette

unread,
May 12, 2010, 2:11:17 PM5/12/10
to Android Linux Kernel Development
also when I do a getevent, this is my output...

#
getevent
add device 1: /dev/input/
event2
name: "Virtual
Touchscreen"
could not get driver version for /dev/input/mouse0, Not a
typewriter
add device 2: /dev/input/
event1
name: "TSC2005
touchscreen"
could not get driver version for /dev/input/mice, Not a
typewriter
add device 3: /dev/input/
event0
name: "gpio-keys"

karthik poduval

unread,
May 12, 2010, 3:56:19 PM5/12/10
to android...@googlegroups.com
I think its called event.c++ (not sure though) somewhere in the Android code. On way to find out would be to grep on /dev/input/ and looks through search results for source code that opens these nodes.

Regards,
Karthik Poduval
--
Regards,
Karthik Poduval

bridgette

unread,
May 13, 2010, 11:15:17 AM5/13/10
to Android Linux Kernel Development
For a brief period, the touchscreen was being recognized. In the
tsc2005.c file I added the following lines :

static int __devinit tsc2005_ts_init(struct tsc2005 *ts,
struct tsc2005_platform_data
*pdata)
...

// set_bit(EV_ABS, idev->evbit);
// set_bit(ABS_X, idev->absbit);
// set_bit(ABS_Y, idev->absbit);

set_bit(EV_KEY, idev->evbit);
set_bit(BTN_TOUCH, idev->keybit);

// bitmap_fill(idev->keybit, KEY_MAX);
// bitmap_fill(idev->relbit, REL_MAX);
bitmap_fill(idev->absbit, ABS_MAX);


This worked and then it stopped...I did not change anything.

Any ideas?
> > <android-kernel%2Bunsu...@googlegroups.com<android-kernel%252Buns...@googlegroups.com>
> Regards,
> Karthik Poduval
>
> --
> unsubscribe: android-kerne...@googlegroups.com
> website:http://groups.google.com/group/android-kernel

ani

unread,
May 12, 2010, 9:56:09 PM5/12/10
to Android Linux Kernel Development
It is called EventHub.cpp which talks to driver and get the respective
events
and pass it to windowmanager for further processing.

bridgette

unread,
May 13, 2010, 4:34:48 PM5/13/10
to Android Linux Kernel Development
I replaced the board (it looks like the board went bad) and the
touchscreen is recognized...now I will start looking at the getting
Android to recognize the events.

Arindam Roy

unread,
May 13, 2010, 9:20:39 PM5/13/10
to android...@googlegroups.com
Hello Bridgette,
Which board are you using?
Thanks,
Arindam

bridgette

unread,
May 13, 2010, 10:24:26 PM5/13/10
to Android Linux Kernel Development
Hi Arindam,

I'm using beagleboard rev c3 that has been customized with an
expansion board and an embedded lcd (nl2432hc17) attached to it.

Also, the code that I put in place earlier solved it....the
touchscreen is working.
> > > > > > > unsubscribe: android-kerne...@googlegroups.com<android-kernel%2Bunsubscribe@go­oglegroups.com>
> > <android-kernel%2Bunsu...@googlegroups.com<android-kernel%252Bunsubscri­b...@googlegroups.com>
>
> > > > > <android-kernel%2Bunsu...@googlegroups.com<android-kernel%252Bunsubscri­b...@googlegroups.com>
> > <android-kernel%252Buns...@googlegroups.com<android-kernel%25252Bunsub­scr...@googlegroups.com>
>
> > > > > > > website:http://groups.google.com/group/android-kernel
>
> > > > > > --
> > > > > > unsubscribe: android-kerne...@googlegroups.com<android-kernel%2Bunsubscribe@go­oglegroups.com>
> > <android-kernel%2Bunsu...@googlegroups.com<android-kernel%252Bunsubscri­b...@googlegroups.com>
>
> > > > > > website:http://groups.google.com/group/android-kernel
>
> > > > > --
> > > > > unsubscribe: android-kerne...@googlegroups.com<android-kernel%2Bunsubscribe@go­oglegroups.com>
> > <android-kernel%2Bunsu...@googlegroups.com<android-kernel%252Bunsubscri­b...@googlegroups.com>
>
> > > > > website:http://groups.google.com/group/android-kernel
>
> > > > --
> > > > Regards,
> > > > Karthik Poduval
>
> > > > --
> > > > unsubscribe: android-kerne...@googlegroups.com<android-kernel%2Bunsubscribe@go­oglegroups.com>
> > > > website:http://groups.google.com/group/android-kernel
>
> > > --
> > > unsubscribe: android-kerne...@googlegroups.com<android-kernel%2Bunsubscribe@go­oglegroups.com>
> > > website:http://groups.google.com/group/android-kernel
>
> > --
> > unsubscribe: android-kerne...@googlegroups.com<android-kernel%2Bunsubscribe@go­oglegroups.com>
> website:http://groups.google.com/group/android-kernel- Hide quoted text -
>
> - Show quoted text -

Abraham Arce

unread,
May 13, 2010, 11:04:08 PM5/13/10
to android...@googlegroups.com
Hi,

On Thu, May 13, 2010 at 9:24 PM, bridgette <tbrid...@yahoo.com> wrote:
> Hi Arindam,
>
> I'm using beagleboard rev c3 that has been customized with an
> expansion board and an embedded lcd (nl2432hc17) attached to it.
>
> Also, the code that I put in place earlier solved it....the
> touchscreen is working.

Sorry for jumpjng in... some other ideas on the testing side

You can also use evtest + the devicefs entry to debug
(http://cgit.freedesktop.org/~whot/evtest/tree/evtest.c)
# evtest /dev/input/event[number]

or a simple cat to devfs entry
# cat /dev/input/event[number]

You may want to check also interrupts if keyboard has a irq assigned
# cat /proc/interrupts

Best Regards
Abraham
Reply all
Reply to author
Forward
0 new messages