03/18/2008

Touchscreen Driver - a small improvement

Today, I found myself a bit of spare time and played with corgi_ts.c to make touchscreen better. First, I put a printk line in corgi_ts.c to see what kind of value is passed to Android. The coordinate was in landscape view, origined from top-left. The default style of Android is landscape view. It wouldn't work.

So, I wrote a small patch to swap the coordinate like this;
diff -ur linux-2.6.23/drivers/input/touchscreen/corgi_ts.c linux-2.6.23-new/drivers/input/touchscreen/corgi_ts.c
--- linux-2.6.23/drivers/input/touchscreen/corgi_ts.c 2008-03-18 18:39:56.779191359 +0900
+++ linux-2.6.23-new/drivers/input/touchscreen/corgi_ts.c 2008-03-18 19:44:02.823705338 +0900
@@ -183,11 +183,14 @@
if (!corgi_ts->tc.pressure && corgi_ts->pendown == 0)
return;

- input_report_abs(dev, ABS_X, corgi_ts->tc.x);
- input_report_abs(dev, ABS_Y, corgi_ts->tc.y);
- input_report_abs(dev, ABS_PRESSURE, corgi_ts->tc.pressure);
- input_report_key(dev, BTN_TOUCH, corgi_ts->pendown);
- input_sync(dev);
+ if ((X_AXIS_MIN < corgi_ts->tc.y && corgi_ts->tc.y < X_AXIS_MAX) &
+ (Y_AXIS_MIN < corgi_ts->tc.x && corgi_ts->tc.x < Y_AXIS_MAX)) {
+ input_report_abs(dev, ABS_X, Y_AXIS_MAX - corgi_ts->tc.y);
+ input_report_abs(dev, ABS_Y, corgi_ts->tc.x);
+ input_report_abs(dev, ABS_PRESSURE, corgi_ts->tc.pressure);
+ input_report_key(dev, BTN_TOUCH, corgi_ts->pendown);
+ input_sync(dev);
+ }
}

static void ts_interrupt_main(struct corgi_ts *corgi_ts, int isTimer)
@@ -267,6 +270,18 @@
#define corgits_resume NULL
#endif

+static int corgits_open(struct input_dev *input)
+{
+ printk("corgi_ts: open\n");
+ return 0;
+}
+
+static void corgits_close(struct input_dev *input)
+{
+ printk("corgi_ts: close\n");
+ return;
+}
+
static int __init corgits_probe(struct platform_device *pdev)
{
struct corgi_ts *corgi_ts;
@@ -302,10 +317,13 @@
input_dev->id.version = 0x0100;
input_dev->dev.parent = &pdev->dev;

+ input_dev->open = corgits_open;
+ input_dev->close = corgits_close;
+
input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH);
- input_set_abs_params(input_dev, ABS_X, X_AXIS_MIN, X_AXIS_MAX, 0, 0);
- input_set_abs_params(input_dev, ABS_Y, Y_AXIS_MIN, Y_AXIS_MAX, 0, 0);
+ input_set_abs_params(input_dev, ABS_X, Y_AXIS_MIN, Y_AXIS_MAX, 0, 0);
+ input_set_abs_params(input_dev, ABS_Y, X_AXIS_MIN, X_AXIS_MAX, 0, 0);
input_set_abs_params(input_dev, ABS_PRESSURE, PRESSURE_MIN, PRESSURE_MAX, 0, 0);

pxa_gpio_mode(IRQ_TO_GPIO(corgi_ts->irq_gpio) | GPIO_IN);
It looks OK. Pointer Location applet in Dev Tools works fine. It draws lines between dots where I tapped with a stylas pen. And pressure value is passed correctly. Red bar on the top of following image shows pressure value passed from touchscreen driver.
android-pointer-location-2.png

But. Still touchscreen works only in the first applet. If I switch to Google Map after playing with Pointer Location, touchscreen input is gone. After reboot, I tried Google Map first, touchscreen works.

Anyway, one step at a time.

Cheers,
posted by 安藤恐竜 at 19:23 | Comment(32) | TrackBack(0) | 日記
Comments for this entry
Dear Sir:

#define X_AXIS_MAX 3830
#define X_AXIS_MIN 150
#define Y_AXIS_MAX 3830
#define Y_AXIS_MIN 190
#define PRESSURE_MIN 0
#define PRESSURE_MAX 15000

Right now, I'm searching the way to make android work with mxc_ts.c on freescale i.mx27. I found the corgi_ts.c has 6 defines. would you like to do me a favor to show me how to find the value and how to get the value. BTW, if I can use the ts device via /dev/input/event1 under qtopia phone edition 4.3.1 on mx27, is this touchscreen driver can work under android? the mxc_ts.c can be found at
http://hi.baidu.com/gaomanyi/blog/item/6d39c7623dce40d9e6113a9f.html
Thank you in advance.

Best Regards,
Akio
Posted by Akio at 03/27/2008 01:21
Akio,

i.MX ts driver seems not reporting min/max value before registering driver.

Try,
input_set_abs_params(input_dev, ABS_X, X_AXIS_MIN, X_AXIS_MAX, 0, 0);
input_set_abs_params(input_dev, ABS_Y, Y_AXIS_MIN, Y_AXIS_MAX, 0, 0);
before calling input_register_driver().

It seems to me that Android expects abs_x and abs_y stricktly within the min/max. It is the reason why there is an if(min < x < max && min < y < max) condition before input_report_abs() in my patch.

If you don't know min/max values of abs_x and abs_y, experiments with good and old printk() would be helpful. ;-)

Good luck,
Posted by androidzaurus at 03/27/2008 09:14
Dear Sir:

Thank you very much. You are really a nice Android Hacker. BTW, ABS_PRESSURE is must to have or not? Because I don't find any information about ABS_PRESSURE on mx27 mxc_ts.c.in other words
input_set_abs_params(input_dev, ABS_PRESSURE, PRESSURE_MIN, PRESSURE_MAX, 0, 0);
is must have or not? Could you give some advise?

Thanks in advance.

Best Regards,
Akio
Posted by Akio at 03/27/2008 12:17
Hi,

I guess you don't have to input_set_abs_params(ABS_PRESSURE) if you don't have pressure information. For example, joystick driver reports xy coordinates only, then it doesn't set min/max of pressure. Same theory could be applied.

Cheers,
Posted by androidzaurus at 03/27/2008 13:36
Dear Sir:

the following message is extract from /dev/log/main which generated by android logger.

EventHubNew device: path=/dev/input/event1 name=mxc_ts id=0x10000 (of 0x1) index=1 fd=39
EventHubNew device: path=/dev/input/event0 name=mxckpd id=0x10001 (of 0x2) index=2 fd=40
EventHubNew keyboard: name=mxckpd keymap=qwerty.kl keymapPath=/system/usr/keychars/qwerty.kcm.bin
EventHubReporting device opened: id=0x10001, name=/dev/input/event0
KeyInputQueue Device added: id=0x10001, name=mxckpd, classes=1
KeyInputQueue Keymap: qwerty.kl
EventHubReporting device opened: id=0x10000, name=/dev/input/event1
KeyInputQueue Device added: id=0x10000, name=null, classes=2
KeyInputQueue X: min=80 max=1000 flat=0 fuzz=0
KeyInputQueue Y: min=80 max=1000 flat=0 fuzz=0
KeyInputQueue Pressure: min=0 max=1 flat=0 fuzz=0
KeyInputQueue Size: unknown values

from the message, I can make sure the android should open the touchscreen driver, but can't get any information from the ts driver.

the following is my modified version of mxc_ts.c

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/input.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/freezer.h>
#include <asm/arch/pmic_external.h>
#include <asm/arch/pmic_adc.h>

#define MXC_TS_NAME "mxc_ts"

#ifdef CONFIG_ANDROID_POWER
#define X_AXIS_MAX 1000
#define X_AXIS_MIN 80
#define Y_AXIS_MAX 1000
#define Y_AXIS_MIN 80
#define PRESSURE_MIN 0
#define PRESSURE_MAX 1
#endif

static struct input_dev *mxc_inputdev = NULL;
static u32 input_ts_installed;

static int ts_thread(void *arg)
{
t_touch_screen ts_sample;
s32 wait = 0;

daemonize("mxc_ts");
while (input_ts_installed) {
try_to_freeze();
memset(&ts_sample, 0, sizeof(t_touch_screen));
pmic_adc_get_touch_sample(&ts_sample, !wait);
/*
#ifdef CONFIG_ANDROID_POWER
if ((X_AXIS_MIN <= ts_sample.x_position && ts_sample.x_position <= X_AXIS_MAX) &
(Y_AXIS_MIN <= ts_sample.y_position && ts_sample.y_position <= Y_AXIS_MAX)) {
input_report_abs(mxc_inputdev, ABS_X, ts_sample.x_position);
input_report_abs(mxc_inputdev, ABS_Y, ts_sample.y_position);
input_report_abs(mxc_inputdev, ABS_PRESSURE, ts_sample.contact_resistance);
input_report_key(mxc_inputdev, BTN_TOUCH, 1);
input_sync(mxc_inputdev);
}
#else
*/
input_report_abs(mxc_inputdev, ABS_X, ts_sample.x_position);
input_report_abs(mxc_inputdev, ABS_Y, ts_sample.y_position);
input_report_abs(mxc_inputdev, ABS_PRESSURE, ts_sample.contact_resistance);
input_report_key(mxc_inputdev, BTN_TOUCH, 1);
input_sync(mxc_inputdev);
//#endif

wait = ts_sample.contact_resistance;
msleep(20);
}

return 0;
}


//#ifdef CONFIG_ANDROID_POWER
static int mxc_ts_open(struct input_dev *input)
{
printk("mxc_ts input touchscreen interface open\n");
return 0;
}

static void mxc_ts_close(struct input_dev *input)
{
printk("mxc_ts input touchscreen interface close\n");
return;
}
//#endif


static int __init mxc_ts_init(void)
{
mxc_inputdev = input_allocate_device();
if (!mxc_inputdev) {
printk(KERN_ERR "mxc_ts_init: not enough memory for input device\n");
return -ENOMEM;
}

mxc_inputdev->name = "mxc_ts\0";
mxc_inputdev->phys = "mxc_ts\0";
mxc_inputdev->id.bustype = BUS_HOST;
mxc_inputdev->open = mxc_ts_open;
mxc_inputdev->close = mxc_ts_close;
mxc_inputdev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
mxc_inputdev->keybit[LONG(BTN_TOUCH)] |= BIT(BTN_TOUCH);
mxc_inputdev->absbit[0] = BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE);

//#ifdef CONFIG_ANDROID_POWER
input_set_abs_params(mxc_inputdev, ABS_X, X_AXIS_MIN, X_AXIS_MAX, 0, 0);
input_set_abs_params(mxc_inputdev, ABS_Y, Y_AXIS_MIN, Y_AXIS_MAX, 0, 0);
input_set_abs_params(mxc_inputdev, ABS_PRESSURE, PRESSURE_MIN, PRESSURE_MAX, 0, 0);
//#endif

input_register_device(mxc_inputdev);

input_ts_installed = 1;
kernel_thread(ts_thread, NULL, CLONE_VM | CLONE_FS);
printk("mxc input touchscreen loaded\n");
return 0;
}

static void __exit mxc_ts_exit(void)
{
input_ts_installed = 0;
input_unregister_device(mxc_inputdev);

if (mxc_inputdev) {
input_free_device(mxc_inputdev);
mxc_inputdev = NULL;
}
}

late_initcall(mxc_ts_init);
module_exit(mxc_ts_exit);

MODULE_DESCRIPTION("MXC input touchscreen driver");
MODULE_AUTHOR("Freescale Semiconductor, Inc.");
MODULE_LICENSE("GPL");

Best Regards,
Akio
Posted by Akio at 03/29/2008 18:04
Dear Sir:

According the code what I test, I found two thing is very strange.
1. the ts's name in android is null, but the keypad is not.
2. android seem don't know mxc_ts.c outcome.
but I can use tslib to get the outcome from mxc_ts.c via /dev/input/event1

the touchscreen for mx27 with android still not work.
I still try to find out what is the key point.

Thank you very much.

Best Regards,
Akio
Posted by Akio at 03/29/2008 18:19
Hi,

Maybe you don't have /sys/class/input/input1/. Android looks for drivers in /sys.

I guess you'd better to platform_driver_register() in your dev_init() and let the probe function do the current mxc_ts_init() job. Your keyboard driver or corgi_ts.c would be helpful.

Cheers,
Posted by androidzaurus at 03/30/2008 12:54
Desr Sir:

Thank you very much.
I'l try to add platform_driver_register
and check the /sys/class/input/input1/*
exists or not.

ほんどうに ありがどう

Best Regards,
Akio
Posted by Akio at 03/31/2008 22:12
Dear Sir:

BTW, Do I have to do touchscreen calibration or not?

Best Regards,
Akio
Posted by Akio at 03/31/2008 22:37
Hi,

calibration should be done by Android system but not implemented yet, it seems to me.
Posted by androidzaurus at 04/01/2008 09:51
Dear Sir:

thank you very much. finally I can make the touchscreen work under webkit browser and google map, but the first screen show on LCD is seem not work. (I use android m3).

the following is my current mxc_ts.c. I'll try to make probe() to replace current init() doing and call platform_driver_register() in module init().

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/input.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/freezer.h>
#include <linux/platform_device.h>
#include <asm/arch/pmic_external.h>
#include <asm/arch/pmic_adc.h>

#ifdef CONFIG_ANDROID_POWER
#define X_AXIS_MAX 1000
#define X_AXIS_MIN 80
#define Y_AXIS_MAX 1000
#define Y_AXIS_MIN 80
#define PRESSURE_MIN 0
#define PRESSURE_MAX 1
#endif

static struct input_dev *mxc_inputdev = NULL;
static u32 input_ts_installed;

static char MXC_TS_NAME[] = "mxc_ts\0";
static char MXC_TS_PHYS[] = "mxc_ts/input1\0";

static int ts_thread(void *arg)
{
t_touch_screen ts_sample;
s32 wait = 0;

daemonize("mxc_ts");
while (input_ts_installed) {
try_to_freeze();
memset(&ts_sample, 0, sizeof(t_touch_screen));
pmic_adc_get_touch_sample(&ts_sample, !wait);

if((ts_sample.x_position >= X_AXIS_MIN) &&
(ts_sample.x_position <= X_AXIS_MAX) &&
(ts_sample.y_position >= Y_AXIS_MIN) &&
(ts_sample.y_position <= Y_AXIS_MAX)){
input_report_abs(mxc_inputdev, ABS_X, ts_sample.x_position);
input_report_abs(mxc_inputdev, ABS_Y, ts_sample.y_position);
input_report_abs(mxc_inputdev, ABS_PRESSURE, ts_sample.contact_resistance);
input_report_key(mxc_inputdev, BTN_TOUCH, 1);
input_sync(mxc_inputdev);
} else {
input_report_key(mxc_inputdev, BTN_TOUCH, 0);
input_sync(mxc_inputdev);
}
wait = ts_sample.contact_resistance;
msleep(20);
}

return 0;
}

static int mxc_ts_open(struct input_dev *input)
{
printk("mxc_ts input touchscreen interface open\n");

return 0;
}

static void mxc_ts_close(struct input_dev *input)
{
printk("mxc_ts input touchscreen interface close\n");

return;
}

static int mxcts_probe(struct platform_device *pdev)
{
printk("mxc_ts input touchscreen interface probe\n");

return 0;
}

static int mxcts_remove(struct platform_device *pdev)
{
printk("mxc_ts input touchscreen interface remove\n");

return 0;
}

static int mxcts_suspend(struct platform_device *dev)
{
printk("mxc_ts input touchscreen interface suspend\n");

return 0;
}

static int mxcts_resume(struct platform_device *dev)
{
printk("mxc_ts input touchscreen interface resume\n");

return 0;
}

static struct platform_driver mxcts_driver =
{
.driver = {
.name = MXC_TS_NAME,
.bus = &platform_bus_type,
},
.probe = mxcts_probe,
.remove = mxcts_remove,
.suspend = mxcts_suspend,
.resume = mxcts_resume,
};

static int __init mxc_ts_init(void)
{
mxc_inputdev = input_allocate_device();
if (!mxc_inputdev) {
printk(KERN_ERR "mxc_ts_init: not enough memory for input device\n");
return -ENOMEM;
}

mxc_inputdev->name = MXC_TS_NAME;
mxc_inputdev->phys = MXC_TS_PHYS;
mxc_inputdev->id.bustype = BUS_HOST;
mxc_inputdev->open = mxc_ts_open;
mxc_inputdev->close = mxc_ts_close;
mxc_inputdev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
mxc_inputdev->keybit[LONG(BTN_TOUCH)] |= BIT(BTN_TOUCH);
input_set_abs_params(mxc_inputdev, ABS_X, X_AXIS_MIN, X_AXIS_MAX, 0, 0);
input_set_abs_params(mxc_inputdev, ABS_Y, Y_AXIS_MIN, Y_AXIS_MAX, 0, 0);
input_set_abs_params(mxc_inputdev, ABS_PRESSURE, PRESSURE_MIN, PRESSURE_MAX, 0, 0);
input_register_device(mxc_inputdev);

input_ts_installed = 1;
kernel_thread(ts_thread, NULL, CLONE_VM | CLONE_FS);
platform_driver_register(&mxcts_driver);
printk("mxc input touchscreen loaded\n");

return 0;
}

static void __exit mxc_ts_exit(void)
{
input_ts_installed = 0;
msleep(20);

input_unregister_device(mxc_inputdev);

if (mxc_inputdev) {
input_free_device(mxc_inputdev);
mxc_inputdev = NULL;
}

platform_driver_unregister(&mxcts_driver);
}

late_initcall(mxc_ts_init);
module_exit(mxc_ts_exit);

MODULE_DESCRIPTION("MXC input touchscreen driver");
MODULE_AUTHOR("Freescale Semiconductor, Inc.");
MODULE_LICENSE("GPL");

Best Regards,
Akio
Posted by Akio at 04/05/2008 16:31
Dear Sir:

After some tests, I found the position which is got from touchscreen is not very stable. How do I reduce the noise? And How do I make the one click behavior not double click as I touch touchscreen just one time not two time?

Thank you very much.

Best Regards,
Akio
Posted by Akio at 04/05/2008 16:45
Akio,

Good job to make it work.

I have no idea about sensitivity and double click issue. Mine has more problems than yours. Zaurus case, touchscreen only works for the first applet. Sigh...
Posted by androidzaurus at 04/05/2008 20:40
Dear Sir:

after about 100 times test, I make the noise more stable than before. what I use is to set the msleep time is different between got samples and no sample. right the value is 200 v.s. 50. but expand the time of got sample seems make double click behavior gone. BTW, I also find the y value seems top is bottom, bottom is top. so I change the value using "y_pos = Y_AXIS_MAX - ts_sample.y_position + Y_AXIS_MIN". after this value transform, the result seems has some extra bias that I don't know how to reduce this. I think I have to find a way to do some calibration, just like tslib's ts_calibrate utility. Thank you very much.

ほんどうに ありがどう

Best Regards,
Akio
Posted by Akio at 04/06/2008 14:18
Dear Sir:

more better value is got sample and then msleep(100). and if no data, msleep(50).

Best Regards,
Akio
Posted by Akio at 04/06/2008 14:26
Akio,

You work really hard. I'm glad your hard work paid off.

I agree with you that Android should have ts_calibrate functionality. We will see how Google coupe with once Android handset is go to the market.
Posted by androidzaurus at 04/06/2008 19:18
Dear sir:

Just for fun :p. I'm not very work hard, just for my own thought and use my rest time.

the following is what I found about touchscreen calibration.
http://www.embedded.com/story/OEG20020529S0046

Right now, I'm thinking how to let ts_calibrate's result pass into touchscreen device driver via proc file system, and add a function to do the calibration before pass to android. this is according http://www.oesf.org/forum/index.php?showtopic=25431
said.
BTW, what is the unit of the corgi_ts->tc.x value that input_report_abs takes.

What is the status of zaurus's touchscreen. is my observation useful or not? hope my experience could help you solve some problem.

Best Regards,
Akio

Posted by Akio at 04/07/2008 00:04
Thanks. Discussion with you gives me some ideas. But I don't have much spare time for now to implement them. Sigh...
Posted by androidzaurus at 04/13/2008 18:45
Dear Sir:

I think I had prove that the touch screen must be calibrated. if the data is addressed by the calibration coefficients, the touch screen under android m3 has very good performance. Right now, I have to reduce the jitter of the input samples. tslib seems provide one way to reduce the jitter. but I still need some test to know how it is working.

Hope I have enough time to finish the job.

Best Regards,
Akio
Posted by Akio at 04/27/2008 00:44
Hi
I tried with your pacth. But still my touchscreen did not work.

Andorid : m5-rc14 Linux 2.6.23
I am using Compulab EM-X270 PXA270 target with "wm97xx touchscreen" touchscreen driver.


Pleae find my log message:
cat /proc/bus/input/devices
I: Bus=0019 Vendor=0000 Product=0000 Version=0000
N: Name="pxa27x-keyboard"
P: Phys=
S: Sysfs=/class/input/input0
U: Uniq=
H: Handlers=kbd mouse0 event0
B: EV=100007
B: KEY=1680 0 0 10000000
B: REL=100

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="wm97xx touchscreen"
P: Phys=
S: Sysfs=/class/input/input1
U: Uniq=
H: Handlers=event1
B: EV=9
B: ABS=1000003
----------------------# cat /proc/bus/input/handlers
N: Number=0 Name=kbd
N: Number=1 Name=mousedev Minor=32
N: Number=2 Name=evdev Minor=64

-----------------------------
getevent&
# add device 1: /dev/input/event1
name: "wm97xx touchscreen"
could not get driver version for /dev/input/mice, Not a typewriter
add device 2: /dev/input/event0
name: "pxa27x-keyboard"
could not get driver version for /dev/input/mouse0, Not a typewriter
------------------------------
when I touched my android screen i got following messgae

/dev/input/event1: 0003 0000 00000352
/dev/input/event1: 0003 0001 00000a5f
/dev/input/event1: 0000 0000 00000000


/dev/input/event1: 0003 0000 00000344
/dev/input/event1: 0000 0000 00000000

looks like kernel is able to read the event but android os does not able to understand it.

Please help me out.

Thanks in advanced

Maneesh Jain
Posted by Maneesh Jain at 04/22/2009 22:04
I have no idea about any touchscreen other than Zaurus. Neither your hardware configuration.

In this comment tree, You can find source code of mxc touchscreen driver posted by Akio. It may help a bit, I hope.

Posted by androidzaurus at 04/23/2009 10:50
Hi
Thanks for your reply.

can you please suggest me here, how can i debug more about my tochuscreen .

As your experience over Android, can you please give me your valuable points to debug this issue.
Thanks once again for your prompt reply.

Maneesh
Posted by Maneesh Jain at 04/24/2009 15:57
Hi
Thanks for all support.

Good News...

My touchscreen is now working fine with Android.

Now I have a working Android over PXA270 based Compulab EM-X270 target board.
If anybody have any issue to porting the Androidn over this hardware please feel free to ask me any time.
Maneesh Jain
Posted by Maneesh Jain at 04/29/2009 16:24
Hi.
I have a problem.
My Touch Screen isn't working with android

My log

cat /proc/bus/input/devices
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="triton2-pwrbutton"
P: Phys=
S: Sysfs=/class/input/input0
U: Uniq=
H: Handlers=kbd event0 evbug
B: EV=3
B: KEY=100000 0 0 0

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="tsc2004"
P: Phys=
S: Sysfs=/class/input/input1
U: Uniq=
H: Handlers=event1 evbug
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=1000003


# getevent &
# add device 1: /dev/input/event1
name: "tsc2004"
add device 2: /dev/input/event0
name: "triton2-pwrbutton"
/dev/input/event1: 0001 014a 00000001
/dev/input/event1: 0003 0000 00000083
/dev/input/event1: 0003 0018 000000cc
/dev/input/event1: 0000 0000 00000000
/dev/input/event1: 0001 014a 00000000
/dev/input/event1: 0003 0018 00000000
/dev/input/event1: 0000 0000 00000000
/dev/input/event1: 0001 014a 00000001
/dev/input/event1: 0003 0000 000000fe
/dev/input/event1: 0003 0001 0000008b
/dev/input/event1: 0003 0018 000000cc
/dev/input/event1: 0000 0000 00000000
/dev/input/event1: 0001 014a 00000000
/dev/input/event1: 0003 0018 00000000
/dev/input/event1: 0000 0000 00000000

Please, How can i debug my touch screen driver?
Please, give me a information about debug method, Maneesh.

Thank you
Posted by namsu.park at 05/14/2009 10:42
Hi

You have to do calibrate your touchscreen.
did you update your touchscreen driver according to "Touchscreen Driver - a small improvement" suggestion.

Please check this and let me know.
Posted by Maneesh Jain at 05/14/2009 19:04
Thank you.

My touchscreen is working well on android. I just check Android Power Option at Android Kernel. then, it is working.

But, I don't know Why. Who can tell me about this?

.........
Posted by namsu.park at 05/20/2009 10:52
Hi all,

I am porting Android to a OMAP3530 LV SOM development platform. I am using a tsc2004 touchscreen. I have built the 2.6.28 kernel and I can get Android to boot however the touchscreen is not working. The touch screen is assigned to event0. I can getevent and touched the screen and here is what i got:

(kernel printk msg + getevent msg)

# getevent &
# add device 1: /dev/input/event0
name: "tsc2004"
could not get driver version for /dev/input/mice, Not a typewriter
x:873 y:211 down:1
Pressure On Screen x=873 y=211
/dev/input/event0: 0003 0000 000001f7
/dev/input/event0: 0003 0001 0000025f
/dev/input/event0:x:3440 y:3786 down:1
0003 0018 000000ea
/dev/input/Pressure On Screen x=3440 y=3786
event0: 0000 0000 00000000
/dev/input/event0: 0003 0000 00000066
/dev/input/event0: 0003 0001 00000030
/dev/input/event0:x:3436 y:3780 down:1
0000 0000 00000000
Pressure On Screen x=3436 y=3780
/dev/input/event0: 0003 0000 00000067
/dev/input/event0: 0003 0001 00000031
/dev/input/event0:x:3433 y:3777 down:1
0000 0000 00000000
Pressure On Screen x=3433 y=3777
x:3389 y:3761 down:0
/dev/input/event0: 0003 0018 000x:3389 y:3761 down:0
00000
/dev/input/event0: 0000 0x:3389 y:3761 down:0
000 00000000
x:3389 y:3761 down:1
Pressure On Screen x=3389 y=3761
/dev/input/event0: 0003 0000 0000006e
/dev/input/event0: 0003 0001 00000034
/dev/input/event0:x:587 y:3819 down:1
0003 0018 000000ea
/dev/input/Pressure On Screen x=587 y=3819
event0: 0000 0000 00000000
/dev/input/event0: 0003 0000 00000224
/dev/input/event0: 0003 0001 0000002b
/dev/input/event0:x:582 y:3818 down:1
0000 0000 00000000
Pressure On Screen x=582 y=3818
/dev/input/event0: 0003 0000 00000225
/dev/input/event0: 0000 0000 00000000
x:579 y:3815 down:1
Pressure On Screen x=579 y=3815
x:581 y:3798 down:0
/dev/input/event0: 0003 0018 000x:581 y:3798 down:0
00000
/dev/input/event

# cat /proc/bus/input/devices
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="tsc2004"
P: Phys=
S: Sysfs=/class/input/input0
U: Uniq=
H: Handlers=event0
B: EV=b
B: KEY=0
B: ABS=1000003

looks like kernel is able to read the event but android does not able to understand it.
I tried with all the patchs available for touch screen (for android) . But still my touchscreen did not work.
Please help me out.

Thanks in advanced
Deepak
Posted by deepak at 05/22/2009 14:02
Hi namsu

My Touch Screen isn't working with android power option.

Please, How can i up my touch screen on android?

can you provide the patch for tsc2004.

Thanks in advanced
Deepak
Posted by deepak at 05/24/2009 17:40
Hi Maneesh,

I am working on pxa255.On touching the

screen,i am getting the events(getevent),but

thereafter I am lost what to do.

Please,provide me some help in this regard.

Thanks in advance.
Swati
Posted by swati at 06/02/2009 15:25
Hi Swati,

Seems to be you did not include the BTN_TOUCH events in your touchscreen driver.

Please do it and check again. Meanwhile you may send me the detail information of your setup .

Maneesh
Posted by Maneesh Jain at 06/13/2009 19:59
tnoklo [url=http://paydayloansbbi.com/]payday loan[/url] jZeaT [url=http://paydayloansbbi.ca/]pay day loans[/url] ttKHf [url=http://paydayloansbbi.co.uk/]quickquid[/url] 8424
Posted by payday loan at 01/12/2013 13:15
tqpxtbb [url=http://paydayloansbsb.co.uk/]payday UK[/url] >:-[ [url=http://paydayloansbsb.com/]payday loans[/url] EKpNYY [url=http://paydayloansbsb.ca/]pay day loans[/url] =-]
Posted by payday UK at 01/18/2013 10:59
Leave your comment
Name: [Must]

EMail: [Must]

URL: [Must]

Comment: [Must]

Confirmation Code: [Must]


Type in alphabets what you see in this image.
Trackback URI:  http://blog.seesaa.jp/tb/90045743
Trackback entries must contain URL of this entry.

Trackbacks to this entry
×

この広告は1年以上新しい記事の投稿がないブログに表示されております。