touchscreen support for collie (sharp zaurus sl-5500)
PATCH 1/1 touchscreen support for collie (sharp zaurus sl-5500)
Add driver for collie touchscreen, partly based on ucb1x00-ts.c, but this one actually works.
From: Cyril Hrubis <[email protected]>
PATCH FOLLOWS
KernelVersion: 2.6.22-rc6-git
---
commit 2a18a9f134617ceacccb7f15fe1c383715dc769a
tree 04f026730fc0b96b749cb6a629db87d3e5f96fc7
parent a4df00d46ea436724a07da7c180bdfca2162ea98
author Pavel <[email protected]> Wed, 27 Jun 2007 16:40:25 +0200 committer Pavel <[email protected]> Wed, 27 Jun 2007 16:40:25 +0200
drivers/mfd/Kconfig | 6 + drivers/mfd/Makefile | 1 drivers/mfd/collie-ts.c | 449 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/mfd/ucb1x00.h | 3 4 files changed, 459 insertions(+), 0 deletions(-)
drivers/mfd/Kconfig +6 -0
@@ -42,4 +42,10 @@ config MCP_UCB1200_TS tristate "Touchscreen interface support" depends on MCP_UCB1200 && INPUT +config MCP_COLLIE_TS + tristate "Touchscreen collie support" + depends on MCP_UCB1200 && INPUT && !MCP_UCB1200_TS + ---help--- + Driver for touchscreen on collie - sharp sl-5500. + endmenu
drivers/mfd/Makefile +1 -0
@@ -9,6 +9,7 @@ obj-$(CONFIG_MCP_SA11X0) += mcp-sa11x0.o obj-$(CONFIG_MCP_UCB1200) += ucb1x00-core.o obj-$(CONFIG_MCP_UCB1200_TS) += ucb1x00-ts.o obj-$(CONFIG_MCP_UCB1200_AUDIO) += ucb1x00-audio.o +obj-$(CONFIG_MCP_COLLIE_TS) += collie-ts.o ifeq ($(CONFIG_SA1100_ASSABET),y) obj-$(CONFIG_MCP_UCB1200) += ucb1x00-assabet.o
drivers/mfd/collie-ts.c new file +449 -0
449 lines not on this page · raw message
drivers/mfd/ucb1x00.h +3 -0
@@ -34,7 +34,10 @@ #define UCB_IE_TSMX (1 << 13)#define UCB_IE_TCLIP (1 << 14)#define UCB_IE_ACLIP (1 << 15) +/* UCB1200 irqs */ +#define UCB_IRQ_ADC 11#define UCB_IRQ_TSPX 12 +#define UCB_IRQ_TSMX 13#define UCB_TC_A 0x05#define UCB_TC_A_LOOP (1 << 7)/* UCB1200 */
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Hi Pavel,
drivers/mfd/Kconfig config MCP_UCB1200_TS · line 50
Quoted 11 lines · Pavel Machek
Add driver for collie touchscreen, partly based on
ucb1x00-ts.c, but this one actually works.drivers/mfd/Kconfig +6
-0+config MCP_COLLIE_TS + tristate "Touchscreen collie support" + depends on MCP_UCB1200 && INPUT && !MCP_UCB1200_TS + ---help--- + Driver for touchscreen on collie - sharp sl-5500. +
Can't ucb1x00-ts be modified to properly support collie hardware? These drivers look almost like twin brothers.
drivers/mfd/collie-ts.c line 85
Quoted 4 lines
drivers/mfd/collie-ts.c new file +4
-0+input_report_abs (idev,ABS_X , x); +input_report_abs (idev,ABS_Y , y); +input_report_abs (idev,ABS_PRESSURE , pressure); +input_report_key (idev,BTN_TOUCH ,1 );
Whitespace damage...
drivers/mfd/collie-ts.c line 94
Quoted 9 lines
drivers/mfd/collie-ts.c new file +9
-0+input_sync (idev); +} + +static inline void ucb1x00_ts_event_release (struct ucb1x00_ts *ts) +{ +struct input_dev *idev = ts->idev; + +input_report_abs (idev,ABS_PRESSURE ,0 ); +input_report_key (idev,BTN_TOUCH ,0 );
And here...
drivers/mfd/collie-ts.c line 288
Quoted 4 lines
drivers/mfd/collie-ts.c new file +4
-0+ +static int ucb1x00_ts_open (struct input_dev *idev) +{ +struct ucb1x00_ts *ts = idev->private;
Please use input_get_drvdata();
drivers/mfd/collie-ts.c line 337
Quoted 6 lines
drivers/mfd/collie-ts.c new file +6
-0+/* +* Release touchscreen resources. Disable IRQs. +*/ +static void ucb1x00_ts_close (struct input_dev *idev) +{ +struct ucb1x00_ts *ts = idev->private;
And here as well.
drivers/mfd/collie-ts.c line 389
Quoted 2 lines
drivers/mfd/collie-ts.c new file +2
-0+ + idev->private = ts;
input_set_drvdata();
Signature · 1 line
Dmitry
Hi!
Quoted 9 lines
drivers/mfd/Kconfig config MCP_UCB1200_TS · line 50
Quoted 6 lines
drivers/mfd/Kconfig +6
-0+config MCP_COLLIE_TS + tristate "Touchscreen collie support" + depends on MCP_UCB1200 && INPUT && !MCP_UCB1200_TS + ---help--- + Driver for touchscreen on collie - sharp sl-5500. +Can't ucb1x00-ts be modified to properly support collie hardware? These drivers look almost like twin brothers.
Well, we don't have non-collie hardware nearby. According to metan, driver was written by the spec, but we can't test it on non-collie so we are probably breaking it. Can someone help with testing?
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html