Skip to contentSkip to conversation

touch screen not detected by Angstrom Linux

at91sam9g45 Yegor Yefremov 2 participants 3 messages Sep 30, 2009 – Oct 1, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello Nicolas,

I could successfully apply your touch screen drivers to 2.6.32-rc2:

2.6.30-at91-exp-0045-input-atmel_tsadcc-touchscreen-use-platform-paramet.patch 2.6.30-at91-exp-0046-at91-input-platform-parameters-for-atmel_tsadcc-in.patch 2.6.30-at91-exp-0047-at91-input-touchscreen-support-for-at91sam9g45ekes.patch

Here dmesg output for 2.6.32-rc2:

atmel_tsadcc atmel_tsadcc: Master clock is set at: 133333333 Hz atmel_tsadcc atmel_tsadcc: Prescaler is set at: 221
input: atmel touch screen controller as /devices/platform/atmel_tsadcc/input/input1

Here dmesg output for 2.6.27 where touch screen is working under Angstrom Linux:

atmel_tsadcc atmel_tsadcc: Master clock is set at: 133333333 Hz atmel_tsadcc atmel_tsadcc: Prescaler is set at: 221
input: atmel touch screen controller as /class/input/input1

The device is working if I read /dev/input/event1, but I'm not able to get it working under Angstrom Linux. Any ideas?

Regards,
Yegor

#1 lore raw

Yegor Yefremov :

Quoted 14 lines

Hello Nicolas,

I could successfully apply your touch screen drivers to 2.6.32-rc2:

2.6.30-at91-exp-0045-input-atmel_tsadcc-touchscreen-use-platform-paramet.patch 2.6.30-at91-exp-0046-at91-input-platform-parameters-for-atmel_tsadcc-in.patch 2.6.30-at91-exp-0047-at91-input-touchscreen-support-for-at91sam9g45ekes.patch

Here dmesg output for 2.6.32-rc2:

atmel_tsadcc atmel_tsadcc: Master clock is set at: 133333333 Hz atmel_tsadcc atmel_tsadcc: Prescaler is set at: 221
input: atmel touch screen controller as /devices/platform/atmel_tsadcc/input/input1

Quoted 7 lines

Here dmesg output for 2.6.27 where touch screen is working under Angstrom Linux:

atmel_tsadcc atmel_tsadcc: Master clock is set at: 133333333 Hz atmel_tsadcc atmel_tsadcc: Prescaler is set at: 221
input: atmel touch screen controller as /class/input/input1

The device is working if I read /dev/input/event1, but I'm not able to get it working under Angstrom Linux. Any ideas?

Yes: in the driver we do not report the pressure measurement (not available on at91sam9rl). There is a bug in tslib that prevents a pressure-less touchscreen to work correctly.

1/ solution one: apply the patch I posted on tslib ml:
https://lists.berlios.de/pipermail/tslib-general/2009-September/000225.html

2/ re-introduce the fake pressure report in your source (atmel_tsadcc driver)

8<-------------------------------------------

drivers/input/touchscreen/atmel_tsadcc.c +3 -0
index 3c24783..27ac912 100644
@@ -134,6 +134,7 @@ static irqreturn_t atmel_tsadcc_interrupt(int irq, void *dev)
 
 		input_report_key(input_dev, BTN_TOUCH, 0);
 		ts_dev->bufferedmeasure = 0;
+		input_report_abs(input_dev, ABS_PRESSURE, 0);
 		input_sync(input_dev);
 
 	} else if (status & ATMEL_TSADCC_PENCNT) {
@@ -158,6 +159,7 @@ static irqreturn_t atmel_tsadcc_interrupt(int irq, void *dev)
 			input_report_abs(input_dev, ABS_X, ts_dev->prev_absx);
 			input_report_abs(input_dev, ABS_Y, ts_dev->prev_absy);
 			input_report_key(input_dev, BTN_TOUCH, 1);
+			input_report_abs(input_dev, ABS_PRESSURE, 7500);
 			input_sync(input_dev);
 		} else
 			ts_dev->bufferedmeasure = 1;
@@ -256,6 +258,7 @@ static int __devinit atmel_tsadcc_probe(struct platform_device *pdev)
 	__set_bit(EV_ABS, input_dev->evbit);
 	input_set_abs_params(input_dev, ABS_X, 0, 0x3FF, 0, 0);
 	input_set_abs_params(input_dev, ABS_Y, 0, 0x3FF, 0, 0);
+	input_set_abs_params(input_dev, ABS_PRESSURE, 0, 15000, 0, 0);
 
 	input_set_capability(input_dev, EV_KEY, BTN_TOUCH);
 

8<-------------------------------------------

Best regards,

Signature · 1 line
Nicolas Ferre
#2 lore raw
Quoted 18 lines
Quoted 18 lines

I could successfully apply your touch screen drivers to 2.6.32-rc2:

2.6.30-at91-exp-0045-input-atmel_tsadcc-touchscreen-use-platform-paramet.patch 2.6.30-at91-exp-0046-at91-input-platform-parameters-for-atmel_tsadcc-in.patch 2.6.30-at91-exp-0047-at91-input-touchscreen-support-for-at91sam9g45ekes.patch

Here dmesg output for 2.6.32-rc2:

atmel_tsadcc atmel_tsadcc: Master clock is set at: 133333333 Hz atmel_tsadcc atmel_tsadcc: Prescaler is set at: 221
input: atmel touch screen controller as /devices/platform/atmel_tsadcc/input/input1

Here dmesg output for 2.6.27 where touch screen is working under Angstrom Linux:

atmel_tsadcc atmel_tsadcc: Master clock is set at: 133333333 Hz atmel_tsadcc atmel_tsadcc: Prescaler is set at: 221
input: atmel touch screen controller as /class/input/input1

Quoted 8 lines
Quoted 1 line

The device is working if I read /dev/input/event1, but I'm not able to get it working under Angstrom Linux. Any ideas?

Yes: in the driver we do not report the pressure measurement (not available on at91sam9rl). There is a bug in tslib that prevents a pressure-less touchscreen to work correctly.

1/ solution one: apply the patch I posted on tslib ml:
https://lists.berlios.de/pipermail/tslib-general/2009-September/000225.html

Your patch was committed about 10 hours ago http://svn.berlios.de/viewcvs/tslib?view=rev&revision=78

Quoted 32 lines

2/ re-introduce the fake pressure report in your source (atmel_tsadcc driver)

8<-------------------------------------------

drivers/input/touchscreen/atmel_tsadcc.c +3 -0
index 3c24783..27ac912 100644
@@ -134,6 +134,7 @@ static irqreturn_t atmel_tsadcc_interrupt(int irq, void *dev)
 
 		input_report_key(input_dev, BTN_TOUCH, 0);
 		ts_dev->bufferedmeasure = 0;
+		input_report_abs(input_dev, ABS_PRESSURE, 0);
 		input_sync(input_dev);
 
 	} else if (status & ATMEL_TSADCC_PENCNT) {
@@ -158,6 +159,7 @@ static irqreturn_t atmel_tsadcc_interrupt(int irq, void *dev)
 			input_report_abs(input_dev, ABS_X, ts_dev->prev_absx);
 			input_report_abs(input_dev, ABS_Y, ts_dev->prev_absy);
 			input_report_key(input_dev, BTN_TOUCH, 1);
+			input_report_abs(input_dev, ABS_PRESSURE, 7500);
 			input_sync(input_dev);
 		} else
 			ts_dev->bufferedmeasure = 1;
@@ -256,6 +258,7 @@ static int __devinit atmel_tsadcc_probe(struct platform_device *pdev)
 	__set_bit(EV_ABS, input_dev->evbit);
 	input_set_abs_params(input_dev, ABS_X, 0, 0x3FF, 0, 0);
 	input_set_abs_params(input_dev, ABS_Y, 0, 0x3FF, 0, 0);
+	input_set_abs_params(input_dev, ABS_PRESSURE, 0, 15000, 0, 0);
 
 	input_set_capability(input_dev, EV_KEY, BTN_TOUCH);
 
Quoted 1 line

8<-------------------------------------------

I have used the second solution and it is working like a charm. Thank you for support.

Regards,
Yegor