From 553a05b8821f5a6bc633e97187933e2157b2d291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20N=C3=A9meth?= Date: Mon, 22 Oct 2007 00:56:52 -0400 Subject: Input: i8042 - export i8042_command() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Export the i8042_command() function which manages the mutual exclusion with the help of the i8042_lock spinlock. This allows to access i8042 safely from other parts of the kernel. Signed-off-by: Márton Németh Signed-off-by: Dmitry Torokhov --- drivers/input/serio/i8042.c | 4 +++- drivers/input/serio/i8042.h | 22 ---------------------- 2 files changed, 3 insertions(+), 23 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 11dafc0ee994..1a0cea3c5294 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c @@ -20,6 +20,7 @@ #include #include #include +#include #include @@ -208,7 +209,7 @@ static int __i8042_command(unsigned char *param, int command) return 0; } -static int i8042_command(unsigned char *param, int command) +int i8042_command(unsigned char *param, int command) { unsigned long flags; int retval; @@ -219,6 +220,7 @@ static int i8042_command(unsigned char *param, int command) return retval; } +EXPORT_SYMBOL(i8042_command); /* * i8042_kbd_write() sends a byte out through the keyboard interface. diff --git a/drivers/input/serio/i8042.h b/drivers/input/serio/i8042.h index b3eb7a72d961..dd22d91f8b39 100644 --- a/drivers/input/serio/i8042.h +++ b/drivers/input/serio/i8042.h @@ -60,28 +60,6 @@ #define I8042_CTR_AUXDIS 0x20 #define I8042_CTR_XLATE 0x40 -/* - * Commands. - */ - -#define I8042_CMD_CTL_RCTR 0x0120 -#define I8042_CMD_CTL_WCTR 0x1060 -#define I8042_CMD_CTL_TEST 0x01aa - -#define I8042_CMD_KBD_DISABLE 0x00ad -#define I8042_CMD_KBD_ENABLE 0x00ae -#define I8042_CMD_KBD_TEST 0x01ab -#define I8042_CMD_KBD_LOOP 0x11d2 - -#define I8042_CMD_AUX_DISABLE 0x00a7 -#define I8042_CMD_AUX_ENABLE 0x00a8 -#define I8042_CMD_AUX_TEST 0x01a9 -#define I8042_CMD_AUX_SEND 0x10d4 -#define I8042_CMD_AUX_LOOP 0x11d3 - -#define I8042_CMD_MUX_PFX 0x0090 -#define I8042_CMD_MUX_SEND 0x1090 - /* * Return codes. */ -- cgit v1.2.3 From 858711c55f757872b11574599bfa836df8ab34c9 Mon Sep 17 00:00:00 2001 From: Michael Hennerich Date: Mon, 22 Oct 2007 00:59:38 -0400 Subject: Input: bf54x-keys - return real error when request_irq() fails Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu Signed-off-by: Dmitry Torokhov --- drivers/input/keyboard/bf54x-keys.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/input') diff --git a/drivers/input/keyboard/bf54x-keys.c b/drivers/input/keyboard/bf54x-keys.c index a67b29b089ef..e5f4da928340 100644 --- a/drivers/input/keyboard/bf54x-keys.c +++ b/drivers/input/keyboard/bf54x-keys.c @@ -256,7 +256,6 @@ static int __devinit bfin_kpad_probe(struct platform_device *pdev) printk(KERN_ERR DRV_NAME ": unable to claim irq %d; error %d\n", bf54x_kpad->irq, error); - error = -EBUSY; goto out2; } -- cgit v1.2.3 From 14e4020630b364cc564172a476cd6a6ac4bc7393 Mon Sep 17 00:00:00 2001 From: Jerrold Jones Date: Mon, 22 Oct 2007 00:59:47 -0400 Subject: Input: usbtouchscreen - add support for GoTop tablet devices Add support for GoTop Super_Q2/GogoPen/PenPower tablets to usbtouchscreen. Protocol discovery was done by Yick Yan Lam. Signed-off-by: Daniel Ritz Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/Kconfig | 6 +++++ drivers/input/touchscreen/usbtouchscreen.c | 36 ++++++++++++++++++++++++++++-- 2 files changed, 40 insertions(+), 2 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index e3e0baa1a158..fa8442b6241c 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -202,6 +202,7 @@ config TOUCHSCREEN_USB_COMPOSITE - DMC TSC-10/25 - IRTOUCHSYSTEMS/UNITOP - IdealTEK URTC1000 + - GoTop Super_Q2/GogoPen/PenPower tablets Have a look at for a usage description and the required user-space stuff. @@ -259,4 +260,9 @@ config TOUCHSCREEN_USB_GENERAL_TOUCH bool "GeneralTouch Touchscreen device support" if EMBEDDED depends on TOUCHSCREEN_USB_COMPOSITE +config TOUCHSCREEN_USB_GOTOP + default y + bool "GoTop Super_Q2/GogoPen/PenPower tablet device support" if EMBEDDED + depends on TOUCHSCREEN_USB_COMPOSITE + endif diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 9fb3d5c30999..f7d4a3b1ee7b 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c @@ -11,8 +11,9 @@ * - DMC TSC-10/25 * - IRTOUCHSYSTEMS/UNITOP * - IdealTEK URTC1000 + * - GoTop Super_Q2/GogoPen/PenPower tablets * - * Copyright (C) 2004-2006 by Daniel Ritz + * Copyright (C) 2004-2007 by Daniel Ritz * Copyright (C) by Todd E. Johnson (mtouchusb.c) * * This program is free software; you can redistribute it and/or @@ -115,6 +116,7 @@ enum { DEVTYPE_IRTOUCH, DEVTYPE_IDEALTEK, DEVTYPE_GENERAL_TOUCH, + DEVTYPE_GOTOP, }; static struct usb_device_id usbtouch_devices[] = { @@ -168,6 +170,12 @@ static struct usb_device_id usbtouch_devices[] = { {USB_DEVICE(0x0dfc, 0x0001), .driver_info = DEVTYPE_GENERAL_TOUCH}, #endif +#ifdef CONFIG_TOUCHSCREEN_USB_GOTOP + {USB_DEVICE(0x08f2, 0x007f), .driver_info = DEVTYPE_GOTOP}, + {USB_DEVICE(0x08f2, 0x00ce), .driver_info = DEVTYPE_GOTOP}, + {USB_DEVICE(0x08f2, 0x00f4), .driver_info = DEVTYPE_GOTOP}, +#endif + {} }; @@ -500,6 +508,20 @@ static int general_touch_read_data(struct usbtouch_usb *dev, unsigned char *pkt) } #endif +/***************************************************************************** + * GoTop Part + */ +#ifdef CONFIG_TOUCHSCREEN_USB_GOTOP +static int gotop_read_data(struct usbtouch_usb *dev, unsigned char *pkt) +{ + dev->x = ((pkt[1] & 0x38) << 4) | pkt[2]; + dev->y = ((pkt[1] & 0x07) << 7) | pkt[3]; + dev->touch = pkt[0] & 0x01; + return 1; +} +#endif + + /***************************************************************************** * the different device descriptors */ @@ -623,9 +645,19 @@ static struct usbtouch_device_info usbtouch_dev_info[] = { .max_yc = 0x0500, .rept_size = 7, .read_data = general_touch_read_data, - } + }, #endif +#ifdef CONFIG_TOUCHSCREEN_USB_GOTOP + [DEVTYPE_GOTOP] = { + .min_xc = 0x0, + .max_xc = 0x03ff, + .min_yc = 0x0, + .max_yc = 0x03ff, + .rept_size = 4, + .read_data = gotop_read_data, + }, +#endif }; -- cgit v1.2.3 From 46249ea60fbb61a72ee6929b831b1f3e6865f024 Mon Sep 17 00:00:00 2001 From: Anton Ekblad Date: Mon, 22 Oct 2007 00:59:59 -0400 Subject: Input: appletouch - apply idle reset logic to all touchpads Not only Geyser 3 but also Geyser 1 need to be reset after they become idle to stop them from needlessly waking up the kernel. Do idle reset on all touchpads, regardless of their version - if we see 10 empty packets the touchpad needs to be reset; good touchpads should not send empty packets anyway. Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/appletouch.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c index 0117817bf538..f132702d137d 100644 --- a/drivers/input/mouse/appletouch.c +++ b/drivers/input/mouse/appletouch.c @@ -504,25 +504,22 @@ static void atp_complete(struct urb* urb) memset(dev->xy_acc, 0, sizeof(dev->xy_acc)); } - /* Geyser 3 will continue to send packets continually after + input_report_key(dev->input, BTN_LEFT, key); + input_sync(dev->input); + + /* Many Geysers will continue to send packets continually after the first touch unless reinitialised. Do so if it's been idle for a while in order to avoid waking the kernel up several hundred times a second */ - if (atp_is_geyser_3(dev)) { - if (!x && !y && !key) { - dev->idlecount++; - if (dev->idlecount == 10) { - dev->valid = 0; - schedule_work(&dev->work); - } + if (!x && !y && !key) { + dev->idlecount++; + if (dev->idlecount == 10) { + dev->valid = 0; + schedule_work(&dev->work); } - else - dev->idlecount = 0; - } - - input_report_key(dev->input, BTN_LEFT, key); - input_sync(dev->input); + } else + dev->idlecount = 0; exit: retval = usb_submit_urb(dev->urb, GFP_ATOMIC); -- cgit v1.2.3