Input queue for 2.6.26 merge window
Subsystems (7)
Dmitry Torokhov
maintainercover Input queue for 2.6.26 merge window
Hi,
The following patches are what I would like to get in 2.6.26 in the next couple of days. Please shout if you see any problems.
Thanks.
Signature · 137 lines
Dmitry
Anssi Hannula (7):
Input: xpad - match xbox 360 devices with interface info
Input: xpad - fix dpad handling of unknown devices
Input: xpad - fix inverted Y and RY axes
Input: xpad - add more xbox 360 controller ids
Input: xpad - do not report nonexistent buttons for xbox360
Input: xpad - enable force feedback on xbox 360 controllers only
Input: xpad - drop obsolete driver versioning
Brian Magnuson (1):
Input: xpad - add support for wireless xbox360 controllers
David Brownell (3):
Input: ads7846 - simplify support of external vREF (and ads7843)
Input: gpio_keys - irq handling cleanup
Input: omap-keypad - fix build warning
Dmitry Baryshkov (1):
Input: tosakbd - fix suspend
Dmitry Torokhov (1):
Input: remove private member from input_dev structure
Guryanov Dmitry (1):
Input: aiptek - add support for Genius G-PEN 560 tablet
Hans-Christian Egtvedt (1):
Input: add PS/2 serio driver for AVR32 devices
Helge Deller (1):
Input: locomokbd - add 'off' button support for Sharp Collie/Poodle
Jiri Kosina (1):
Input: fix ordering in joystick Makefile
Julia Lawall (1):
Input: drivers/char/keyboard.c - use time_after
Karl Dahlke (1):
Input: put ledstate in the keyboard notifier
Kay Sievers (1):
Input: add MODULE_ALIAS() to hotpluggable platform modules
Mark Brown (8):
Input: add support for WM97xx familty touchscreens
Input: WM97xx - add chip driver for WM9705 touchscreen
Input: WM97xx - add chip driver for WM9712 touchscreen
Input: WM97xx - add chip driver for WM97123 touchscreen
Input: WM97xx - add support for streaming mode on Mainstone
Input: wm97xx-core - only schedule interrupt handler if not already
scheduled
Input: wm97xx-core - use IRQF_SAMPLE_RANDOM
Input: wm97xx-core - support use as a wakeup source
Martin Kebert (1):
Input: add Zhen Hua driver
Michael Gruber (1):
Input: xpad - set proper buffer length for outgoing requests
Michael Hennerich (1):
Input: bf54x-keys - add infrastructure for keypad wakeups
Oliver Neukum (3):
Input: xpad - don't use GFP_ATOMIC
Input: usbtouchscreen - don't use DMA on stack
Input: wacom - implement suspend and autosuspend
Peter Zijlstra (1):
Input: mac_hid - add lockdep annotation to emumousebtn
Roel Kluin (1):
Input: i8042 - fix incorrect usage of strncpy and strncat
Tobias Mueller (1):
Input: appletouch - add product IDs for the 4th generation MacBooks
MAINTAINERS | 10 +
drivers/char/keyboard.c | 6 +-
drivers/hid/usbhid/hid-quirks.c | 4 +
drivers/input/input-polldev.c | 6 +-
drivers/input/joystick/Kconfig | 12 +
drivers/input/joystick/Makefile | 4 +-
drivers/input/joystick/xpad.c | 213 ++++++-
drivers/input/joystick/zhenhua.c | 243 ++++++++
drivers/input/keyboard/aaed2000_kbd.c | 4 +
drivers/input/keyboard/bf54x-keys.c | 37 +-
drivers/input/keyboard/corgikbd.c | 2 +
drivers/input/keyboard/gpio_keys.c | 5 +-
drivers/input/keyboard/jornada680_kbd.c | 2 +
drivers/input/keyboard/jornada720_kbd.c | 4 +
drivers/input/keyboard/locomokbd.c | 73 ++-
drivers/input/keyboard/omap-keypad.c | 9 +-
drivers/input/keyboard/pxa27x_keypad.c | 4 +
drivers/input/keyboard/spitzkbd.c | 1 +
drivers/input/keyboard/tosakbd.c | 23 +-
drivers/input/misc/cobalt_btns.c | 3 +
drivers/input/mouse/appletouch.c | 13 +-
drivers/input/mouse/gpio_mouse.c | 4 +
drivers/input/serio/Kconfig | 10 +
drivers/input/serio/Makefile | 1 +
drivers/input/serio/at32psif.c | 375 ++++++++++++
drivers/input/serio/i8042-x86ia64io.h | 12 +-
drivers/input/serio/rpckbd.c | 2 +
drivers/input/tablet/Kconfig | 10 +-
drivers/input/tablet/aiptek.c | 2 +
drivers/input/tablet/wacom.h | 3 +
drivers/input/tablet/wacom_sys.c | 76 ++-
drivers/input/touchscreen/Kconfig | 53 ++
drivers/input/touchscreen/Makefile | 7 +
drivers/input/touchscreen/ads7846.c | 22 +-
drivers/input/touchscreen/corgi_ts.c | 2 +
drivers/input/touchscreen/jornada720_ts.c | 4 +
drivers/input/touchscreen/mainstone-wm97xx.c | 302 ++++++++++
drivers/input/touchscreen/usbtouchscreen.c | 31 +-
drivers/input/touchscreen/wm9705.c | 353 +++++++++++
drivers/input/touchscreen/wm9712.c | 462 ++++++++++++++
drivers/input/touchscreen/wm9713.c | 460 ++++++++++++++
drivers/input/touchscreen/wm97xx-core.c | 829 ++++++++++++++++++++++++++
drivers/macintosh/mac_hid.c | 6 +
include/linux/input.h | 8 +-
include/linux/keyboard.h | 1 +
include/linux/serio.h | 1 +
include/linux/spi/ads7846.h | 3 +-
include/linux/wm97xx.h | 314 ++++++++++
48 files changed, 3915 insertions(+), 116 deletions(-)
create mode 100644 drivers/input/joystick/zhenhua.c
create mode 100644 drivers/input/serio/at32psif.c
create mode 100644 drivers/input/touchscreen/mainstone-wm97xx.c
create mode 100644 drivers/input/touchscreen/wm9705.c
create mode 100644 drivers/input/touchscreen/wm9712.c
create mode 100644 drivers/input/touchscreen/wm9713.c
create mode 100644 drivers/input/touchscreen/wm97xx-core.c
create mode 100644 include/linux/wm97xx.hDmitry Torokhov
maintainerPATCH 1/37 Input: remove private member from input_dev structure
Everyone should be using input_{get|set}_drvdata() by now. Alias them to dev_{get|set}_drvdata() and remove ->private.
--- drivers/input/input-polldev.c | 6 +++--- include/linux/input.h | 8 ++------ 2 files changed, 5 insertions(+), 9 deletions(-)
drivers/input/input-polldev.c +3 -3
@@ -73,7 +73,7 @@ static void input_polled_device_work(struct work_struct *work)static int input_open_polled_device (struct input_dev *input) { -struct input_polled_dev *dev = input->private; +struct input_polled_dev *dev =input_get_drvdata (input);int error; error =input_polldev_start_workqueue ();
@@ -91,7 +91,7 @@ static int input_open_polled_device(struct input_dev *input)static void input_close_polled_device (struct input_dev *input) { -struct input_polled_dev *dev = input->private; +struct input_polled_dev *dev =input_get_drvdata (input);cancel_delayed_work_sync (&dev->work);input_polldev_stop_workqueue ();
@@ -151,10 +151,10 @@ int input_register_polled_device(struct input_polled_dev *dev) {struct input_dev *input = dev->input; +input_set_drvdata (input, dev);INIT_DELAYED_WORK (&dev->work, input_polled_device_work);if (!dev->poll_interval) dev->poll_interval =500 ; - input->private = dev; input->open = input_open_polled_device; input->close = input_close_polled_device;
include/linux/input.h +2 -6
@@ -1025,10 +1025,6 @@ struct ff_effect {* @node: used to place the device onto input_dev_list */ struct input_dev { -/* private: */ -void *private;/* do not use */ -/* public: */ -const char *name;const char *phys;const char *uniq;
@@ -1238,12 +1234,12 @@ static inline void input_put_device(struct input_dev *dev)static inline void *input_get_drvdata (struct input_dev *dev) { -return dev->private; +return dev_get_drvdata (&dev->dev); }static inline void input_set_drvdata (struct input_dev *dev,void *data) { - dev->private = data; +dev_set_drvdata (&dev->dev, data); }int __must_check input_register_device (struct input_dev *);
Signature · 1 line
1.5.5.rc2.6.gf58d
Helge Deller
maintainerPATCH 2/37 Input: locomokbd - add 'off' button support for Sharp Collie/Poodle
In reply to Dmitry TorokhovEnables the Sharp Zaurus Collie and Poodle devices to be turned off by pressing the "Cancel" button for a few seconds (as designed by Sharp).
Additional small cleanups:
- removal of unused #defines and variables
- add missing __devinit/__devexit/__devinitconst annotations
- reorganized copyright notice
--- drivers/input/keyboard/locomokbd.c | 73 +++++++++++++++++++++++------------ 1 files changed, 48 insertions(+), 25 deletions(-)
drivers/input/keyboard/locomokbd.c +48 -25
@@ -1,14 +1,12 @@/* -* Copyright (c) 2005 John Lenz +* LoCoMo keyboard driver for Linux-based ARM PDAs: +* - SHARP Zaurus Collie (SL-5500) +* - SHARP Zaurus Poodle (SL-5600) * +* Copyright (c) 2005 John Lenz * Based on from xtkbd.c -*/ - -/* -* LoCoMo keyboard driver for Linux/ARM -*/ - -/* +* +* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or
@@ -47,7 +45,8 @@ MODULE_LICENSE("GPL");#define KEY_CONTACT KEY_F18#define KEY_CENTER KEY_F15 -static unsigned char locomokbd_keycode[LOCOMOKBD_NUMKEYS ] = { +static const unsigned char +locomokbd_keycode[LOCOMOKBD_NUMKEYS ]__devinitconst = {0 ,KEY_ESC ,KEY_ACTIVITY ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,/* 0 - 9 */ 0 ,0 ,0 ,0 ,0 ,0 ,0 ,KEY_MENU ,KEY_HOME ,KEY_CONTACT ,/* 10 - 19 */ 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,/* 20 - 29 */
@@ -67,22 +66,21 @@ static unsigned char locomokbd_keycode[LOCOMOKBD_NUMKEYS] = {#define KB_COLS 8#define KB_ROWMASK (r) (1 << (r))#define SCANCODE (c,r) ( ((c)<<4) + (r) + 1 ) -#define NR_SCANCODES 128#define KB_DELAY 8#define SCAN_INTERVAL (HZ/10) -#define LOCOMOKBD_PRESSED 1struct locomokbd {unsigned char keycode[LOCOMOKBD_NUMKEYS ];struct input_dev *input;char phys[32 ]; -struct locomo_dev *ldev;unsigned long base;spinlock_t lock;struct timer_list timer; +unsigned long suspend_jiffies; +unsigned int count_cancel; };/* helper functions for reading the keyboard matrix */
@@ -128,7 +126,7 @@ static inline void locomokbd_reset_col(unsigned long membase, int col)/* Scan the hardware keyboard and push any changes up through the input layer */ static void locomokbd_scankeyboard (struct locomokbd *locomokbd) { -unsigned int row, col, rowd, scancode; +unsigned int row, col, rowd;unsigned long flags;unsigned int num_pressed;unsigned long membase = locomokbd->base;
@@ -145,13 +143,33 @@ static void locomokbd_scankeyboard(struct locomokbd *locomokbd) rowd = ~locomo_readl (membase +LOCOMO_KIB );for (row =0 ; row <KB_ROWS ; row++) { +unsigned int scancode, pressed, key; + scancode =SCANCODE (col, row); -if (rowd &KB_ROWMASK (row)) { - num_pressed +=1 ; -input_report_key (locomokbd->input, locomokbd->keycode[scancode],1 ); - }else { -input_report_key (locomokbd->input, locomokbd->keycode[scancode],0 ); - } + pressed = rowd &KB_ROWMASK (row); + key = locomokbd->keycode[scancode]; + +input_report_key (locomokbd->input, key, pressed); +if (likely (!pressed)) +continue ; + + num_pressed++; + +/* The "Cancel/ESC" key is labeled "On/Off" on +* Collie and Poodle and should suspend the device +* if it was pressed for more than a second. */ +if (unlikely (key ==KEY_ESC )) { +if (!time_after (jiffies, + locomokbd->suspend_jiffies +HZ )) +continue ; +if (locomokbd->count_cancel++ + != (HZ /SCAN_INTERVAL +1 )) +continue ; +input_event (locomokbd->input,EV_PWR , +KEY_SUSPEND ,1 ); + locomokbd->suspend_jiffies = jiffies; + }else + locomokbd->count_cancel =0 ; }locomokbd_reset_col (membase, col); }
@@ -162,6 +180,8 @@ static void locomokbd_scankeyboard(struct locomokbd *locomokbd)/* if any keys are pressed, enable the timer */ if (num_pressed)mod_timer (&locomokbd->timer, jiffies +SCAN_INTERVAL ); +else + locomokbd->count_cancel =0 ;spin_unlock_irqrestore (&locomokbd->lock, flags); }
@@ -186,10 +206,11 @@ static irqreturn_t locomokbd_interrupt(int irq, void *dev_id)static void locomokbd_timer_callback (unsigned long data) {struct locomokbd *locomokbd = (struct locomokbd *) data; +locomokbd_scankeyboard (locomokbd); } -static int locomokbd_probe (struct locomo_dev *dev) +static int __devinit locomokbd_probe (struct locomo_dev *dev) {struct locomokbd *locomokbd;struct input_dev *input_dev;
@@ -211,7 +232,6 @@ static int locomokbd_probe(struct locomo_dev *dev) goto err_free_mem; } - locomokbd->ldev = dev;locomo_set_drvdata (dev, locomokbd); locomokbd->base = (unsigned long ) dev->mapbase;
@@ -222,6 +242,8 @@ static int locomokbd_probe(struct locomo_dev *dev) locomokbd->timer.function = locomokbd_timer_callback; locomokbd->timer.data = (unsigned long ) locomokbd; + locomokbd->suspend_jiffies = jiffies; + locomokbd->input = input_dev;strcpy (locomokbd->phys,"locomokbd/input0" );
@@ -233,9 +255,10 @@ static int locomokbd_probe(struct locomo_dev *dev) input_dev->id.version =0x0100 ; input_dev->dev.parent = &dev->dev; - input_dev->evbit[0 ] =BIT_MASK (EV_KEY ) |BIT_MASK (EV_REP ); + input_dev->evbit[0 ] =BIT_MASK (EV_KEY ) |BIT_MASK (EV_REP ) | +BIT_MASK (EV_PWR ); input_dev->keycode = locomokbd->keycode; - input_dev->keycodesize =sizeof (unsigned char ); + input_dev->keycodesize =sizeof (locomokbd_keycode[0 ]); input_dev->keycodemax =ARRAY_SIZE (locomokbd_keycode);memcpy (locomokbd->keycode, locomokbd_keycode,sizeof (locomokbd->keycode));
@@ -268,7 +291,7 @@ static int locomokbd_probe(struct locomo_dev *dev)return err; } -static int locomokbd_remove (struct locomo_dev *dev) +static int __devexit locomokbd_remove(struct locomo_dev *dev) {struct locomokbd *locomokbd =locomo_get_drvdata (dev);
@@ -292,7 +315,7 @@ static struct locomo_driver keyboard_driver = { }, .devid = LOCOMO_DEVID_KEYBOARD, .probe = locomokbd_probe, - .remove = locomokbd_remove, + .remove = __devexit_p(locomokbd_remove), };static int __init locomokbd_init (void )
Signature · 1 line
1.5.5.rc2.6.gf58d
David Brownell
maintainerPATCH 3/37 Input: ads7846 - simplify support of external vREF (and ads7843)
In reply to Dmitry TorokhovThis updates the ads7846 driver to handle external vREF (required on boards using ads7843 chips) without module parameters, and also removes a needless variable with its associated bogus gcc warning.
--- drivers/input/touchscreen/ads7846.c | 22 ++++++++++------------ include/linux/spi/ads7846.h | 3 ++- 2 files changed, 12 insertions(+), 13 deletions(-)
drivers/input/touchscreen/ads7846.c +10 -12
@@ -87,6 +87,7 @@ struct ads7846 {#endif u16 model; +u16 vref_mv;u16 vref_delay_usecs;u16 x_plate_ohms;u16 pressure_max;
@@ -184,9 +185,6 @@ struct ads7846 {* The range is GND..vREF. The ads7843 and ads7835 must use external vREF; * ads7846 lets that pin be unconnected, to use internal vREF. */ -static unsigned vREF_mV; -module_param (vREF_mV, uint,0 ); -MODULE_PARM_DESC (vREF_mV,"external vREF voltage, in milliVolts" );struct ser_req {u8 ref_on;
@@ -213,7 +211,6 @@ static int ads7846_read12_ser(struct device *dev, unsigned command)struct ads7846 *ts =dev_get_drvdata (dev);struct ser_req *req =kzalloc (sizeof *req,GFP_KERNEL );int status; -int uninitialized_var (sample );int use_internal;if (!req)
@@ -270,13 +267,13 @@ static int ads7846_read12_ser(struct device *dev, unsigned command)if (status ==0 ) {/* on-wire is a must-ignore bit, a BE12 value, then padding */ - sample =be16_to_cpu (req->sample); - sample = sample >>3 ; - sample &=0x0fff ; + status =be16_to_cpu (req->sample); + status = status >>3 ; + status &=0x0fff ; }kfree (req); -return status ? status : sample; +return status; }#if defined(CONFIG_HWMON ) || defined(CONFIG_HWMON_MODULE )
@@ -317,7 +314,7 @@ static inline unsigned vaux_adjust(struct ads7846 *ts, ssize_t v)unsigned retval = v;/* external resistors may scale vAUX into 0..vREF */ - retval *= vREF_mV; + retval *= ts->vref_mv; retval = retval >>12 ;return retval; }
@@ -375,14 +372,14 @@ static int ads784x_hwmon_register(struct spi_device *spi, struct ads7846 *ts)/* hwmon sensors need a reference voltage */ switch (ts->model) {case 7846 : -if (!vREF_mV) { +if (!ts->vref_mv) {dev_dbg (&spi->dev,"assuming 2.5V internal vREF\n" ); - vREF_mV =2500 ; + ts->vref_mv =2500 ; }break ;case 7845 :case 7843 : -if (!vREF_mV) { +if (!ts->vref_mv) {dev_warn (&spi->dev,"external vREF for ADS%d not specified\n" , ts->model);
@@ -875,6 +872,7 @@ static int __devinit ads7846_probe(struct spi_device *spi) ts->spi = spi; ts->input = input_dev; + ts->vref_mv = pdata->vref_mv;hrtimer_init (&ts->timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); ts->timer.function = ads7846_timer;
include/linux/spi/ads7846.h +2 -1
@@ -14,7 +14,8 @@ enum ads7846_filter {struct ads7846_platform_data {u16 model;/* 7843, 7845, 7846. */ u16 vref_delay_usecs;/* 0 for external vref; etc */ -int keep_vref_on:1 ;/* set to keep vref on for differential +u16 vref_mv;/* external vref value, milliVolts */ +bool keep_vref_on;/* set to keep vref on for differential * measurements as well */ /* Settling time of the analog signals; a function of Vcc and the
Signature · 1 line
1.5.5.rc2.6.gf58d
Mark Brown
maintainerPATCH 4/37 Input: add support for WM97xx familty touchscreens
In reply to Dmitry TorokhovAdd support for the touchscreen controllers provided by Wolfson Microelectronics WM97xx series chips in both polled and streaming modes.
These drivers have been maintained out of tree since 2003. During that time the driver the primary maintainer was Liam Girdwood and a number of people have made contributions including Dmitry Baryshkov, Stanley Cai, Rodolfo Giometti, Russell King, Marc Kleine-Budde, Ian Molton, Vincent Sanders, Andrew Zabolotny, Graeme Gregory, Mike Arthur and myself. Apologies to anyone I have omitted.
--- MAINTAINERS | 10 + drivers/input/touchscreen/Kconfig | 14 + drivers/input/touchscreen/Makefile | 3 + drivers/input/touchscreen/wm97xx-core.c | 789 +++++++++++++++++++++++++++++++ include/linux/wm97xx.h | 311 ++++++++++++ 5 files changed, 1127 insertions(+), 0 deletions(-) create mode 100644 drivers/input/touchscreen/wm97xx-core.c create mode 100644 include/linux/wm97xx.h
MAINTAINERS +10 -0
@@ -4343,6 +4343,16 @@ L: [email protected] W: http://oops.ghostprotocols.net:81/blog S: Maintained +WM97XX TOUCHSCREEN DRIVERS +P: Mark Brown +M: [email protected] +P: Liam Girdwood +M: [email protected] +L: [email protected] +T: git git://opensource.wolfsonmicro.com/linux-2.6-touch +W: http://opensource.wolfsonmicro.com/node/7 +S: Supported + X.25 NETWORK LAYER P: Henner Eisen M: [email protected]
drivers/input/touchscreen/Kconfig +14 -0
@@ -185,6 +185,20 @@ config TOUCHSCREEN_UCB1400 To compile this driver as a module, choose M here: the module will be called ucb1400_ts. +config TOUCHSCREEN_WM97XX + tristate "Support for WM97xx AC97 touchscreen controllers" + depends on AC97_BUS + help + Say Y here if you have a Wolfson Microelectronics WM97xx + touchscreen connected to your system. Note that this option + only enables core driver, you will also need to select + support for appropriate chip below. + + If unsure, say N. + + To compile this driver as a module, choose M here: the + module will be called wm97xx-ts. + config TOUCHSCREEN_USB_COMPOSITE tristate "USB Touchscreen Driver" depends on USB_ARCH_HAS_HCD
drivers/input/touchscreen/Makefile +3 -0
@@ -4,6 +4,8 @@ # Each configuration option enables a list of files. +wm97xx-ts-y := wm97xx-core.o + obj-$(CONFIG_TOUCHSCREEN_ADS7846) += ads7846.o obj-$(CONFIG_TOUCHSCREEN_BITSY) += h3600_ts_input.o obj-$(CONFIG_TOUCHSCREEN_CORGI) += corgi_ts.o
@@ -19,3 +21,4 @@ obj-$(CONFIG_TOUCHSCREEN_PENMOUNT) += penmount.o obj-$(CONFIG_TOUCHSCREEN_TOUCHRIGHT) += touchright.o obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o obj-$(CONFIG_TOUCHSCREEN_UCB1400) += ucb1400_ts.o +obj-$(CONFIG_TOUCHSCREEN_WM97XX) += wm97xx-ts.o
drivers/input/touchscreen/wm97xx-core.c new file +789 -0
789 lines not on this page · raw message
include/linux/wm97xx.h new file +311 -0
311 lines not on this page · raw message
Signature · 1 line
1.5.5.rc2.6.gf58d
Mark Brown
maintainerPATCH 5/37 Input: WM97xx - add chip driver for WM9705 touchscreen
In reply to Dmitry Torokhov--- drivers/input/touchscreen/Kconfig | 9 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/wm9705.c | 353 ++++++++++++++++++++++++++++++++++++ 3 files changed, 363 insertions(+), 0 deletions(-) create mode 100644 drivers/input/touchscreen/wm9705.c
drivers/input/touchscreen/Kconfig +9 -0
@@ -199,6 +199,15 @@ config TOUCHSCREEN_WM97XX To compile this driver as a module, choose M here: the module will be called wm97xx-ts. +config TOUCHSCREEN_WM9705 + bool "WM9705 Touchscreen interface support" + depends on TOUCHSCREEN_WM97XX + help + Say Y here if you have a Wolfson Microelectronics WM9705 + touchscreen controller connected to your system. + + If unsure, say N. + config TOUCHSCREEN_USB_COMPOSITE tristate "USB Touchscreen Driver" depends on USB_ARCH_HAS_HCD
drivers/input/touchscreen/Makefile +1 -0
@@ -22,3 +22,4 @@ obj-$(CONFIG_TOUCHSCREEN_TOUCHRIGHT) += touchright.o obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o obj-$(CONFIG_TOUCHSCREEN_UCB1400) += ucb1400_ts.o obj-$(CONFIG_TOUCHSCREEN_WM97XX) += wm97xx-ts.o +wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9705) += wm9705.o
drivers/input/touchscreen/wm9705.c new file +353 -0
353 lines not on this page · raw message
Signature · 1 line
1.5.5.rc2.6.gf58d
Mark Brown
maintainerPATCH 6/37 Input: WM97xx - add chip driver for WM9712 touchscreen
In reply to Dmitry Torokhov--- drivers/input/touchscreen/Kconfig | 9 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/wm9712.c | 462 ++++++++++++++++++++++++++++++++++++ 3 files changed, 472 insertions(+), 0 deletions(-) create mode 100644 drivers/input/touchscreen/wm9712.c
drivers/input/touchscreen/Kconfig +9 -0
@@ -208,6 +208,15 @@ config TOUCHSCREEN_WM9705 If unsure, say N. +config TOUCHSCREEN_WM9712 + bool "WM9712 Touchscreen interface support" + depends on TOUCHSCREEN_WM97XX + help + Say Y here if you have a Wolfson Microelectronics WM9712 + touchscreen controller connected to your system. + + If unsure, say N. + config TOUCHSCREEN_USB_COMPOSITE tristate "USB Touchscreen Driver" depends on USB_ARCH_HAS_HCD
drivers/input/touchscreen/Makefile +1 -0
@@ -23,3 +23,4 @@ obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o obj-$(CONFIG_TOUCHSCREEN_UCB1400) += ucb1400_ts.o obj-$(CONFIG_TOUCHSCREEN_WM97XX) += wm97xx-ts.o wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9705) += wm9705.o +wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9712) += wm9712.o
drivers/input/touchscreen/wm9712.c new file +462 -0
462 lines not on this page · raw message
Signature · 1 line
1.5.5.rc2.6.gf58d
Mark Brown
maintainerPATCH 7/37 Input: WM97xx - add chip driver for WM97123 touchscreen
In reply to Dmitry Torokhov--- drivers/input/touchscreen/Kconfig | 9 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/wm9713.c | 460 ++++++++++++++++++++++++++++++++++++ 3 files changed, 470 insertions(+), 0 deletions(-) create mode 100644 drivers/input/touchscreen/wm9713.c
drivers/input/touchscreen/Kconfig +9 -0
@@ -217,6 +217,15 @@ config TOUCHSCREEN_WM9712 If unsure, say N. +config TOUCHSCREEN_WM9713 + bool "WM9713 Touchscreen interface support" + depends on TOUCHSCREEN_WM97XX + help + Say Y here if you have a Wolfson Microelectronics WM9713 touchscreen + controller connected to your system. + + If unsure, say N. + config TOUCHSCREEN_USB_COMPOSITE tristate "USB Touchscreen Driver" depends on USB_ARCH_HAS_HCD
drivers/input/touchscreen/Makefile +1 -0
@@ -24,3 +24,4 @@ obj-$(CONFIG_TOUCHSCREEN_UCB1400) += ucb1400_ts.o obj-$(CONFIG_TOUCHSCREEN_WM97XX) += wm97xx-ts.o wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9705) += wm9705.o wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9712) += wm9712.o +wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9713) += wm9713.o
drivers/input/touchscreen/wm9713.c new file +460 -0
460 lines not on this page · raw message
Signature · 1 line
1.5.5.rc2.6.gf58d
Mark Brown
maintainerPATCH 8/37 Input: WM97xx - add support for streaming mode on Mainstone
In reply to Dmitry Torokhov--- drivers/input/touchscreen/Kconfig | 12 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/mainstone-wm97xx.c | 302 ++++++++++++++++++++++++++ 3 files changed, 315 insertions(+), 0 deletions(-) create mode 100644 drivers/input/touchscreen/mainstone-wm97xx.c
drivers/input/touchscreen/Kconfig +12 -0
@@ -226,6 +226,18 @@ config TOUCHSCREEN_WM9713 If unsure, say N. +config TOUCHSCREEN_WM97XX_MAINSTONE + tristate "WM97xx Mainstone accelerated touch" + depends on TOUCHSCREEN_WM97XX && ARCH_PXA + help + Say Y here for support for streaming mode with WM97xx touchscreens + on Mainstone systems. + + If unsure, say N. + + To compile this driver as a module, choose M here: the + module will be called mainstone-wm97xx. + config TOUCHSCREEN_USB_COMPOSITE tristate "USB Touchscreen Driver" depends on USB_ARCH_HAS_HCD
drivers/input/touchscreen/Makefile +1 -0
@@ -25,3 +25,4 @@ obj-$(CONFIG_TOUCHSCREEN_WM97XX) += wm97xx-ts.o wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9705) += wm9705.o wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9712) += wm9712.o wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9713) += wm9713.o +obj-$(CONFIG_TOUCHSCREEN_WM97XX_MAINSTONE) += mainstone-wm97xx.o
drivers/input/touchscreen/mainstone-wm97xx.c new file +302 -0
302 lines not on this page · raw message
Signature · 1 line
1.5.5.rc2.6.gf58d
Tobias Mueller
maintainerPATCH 9/37 Input: appletouch - add product IDs for the 4th generation MacBooks
In reply to Dmitry Torokhov--- drivers/input/mouse/appletouch.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-)
drivers/input/mouse/appletouch.c +12 -1
@@ -62,6 +62,10 @@#define GEYSER4_ISO_PRODUCT_ID 0x021B#define GEYSER4_JIS_PRODUCT_ID 0x021C +#define GEYSER4_HF_ANSI_PRODUCT_ID 0x0229 +#define GEYSER4_HF_ISO_PRODUCT_ID 0x022A +#define GEYSER4_HF_JIS_PRODUCT_ID 0x022B +#define ATP_DEVICE (prod) \ .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \ USB_DEVICE_ID_MATCH_INT_CLASS | \
@@ -93,6 +97,10 @@ static struct usb_device_id atp_table [] = { { ATP_DEVICE(GEYSER4_ISO_PRODUCT_ID) }, { ATP_DEVICE(GEYSER4_JIS_PRODUCT_ID) }, + { ATP_DEVICE(GEYSER4_HF_ANSI_PRODUCT_ID) }, + { ATP_DEVICE(GEYSER4_HF_ISO_PRODUCT_ID) }, + { ATP_DEVICE(GEYSER4_HF_JIS_PRODUCT_ID) }, + /* Terminating entry */ { } };
@@ -217,7 +225,10 @@ static inline int atp_is_geyser_3(struct atp *dev) (productId ==GEYSER3_JIS_PRODUCT_ID ) || (productId ==GEYSER4_ANSI_PRODUCT_ID ) || (productId ==GEYSER4_ISO_PRODUCT_ID ) || - (productId ==GEYSER4_JIS_PRODUCT_ID ); + (productId ==GEYSER4_JIS_PRODUCT_ID ) || + (productId ==GEYSER4_HF_ANSI_PRODUCT_ID ) || + (productId ==GEYSER4_HF_ISO_PRODUCT_ID ) || + (productId ==GEYSER4_HF_JIS_PRODUCT_ID ); }/*
Signature · 1 line
1.5.5.rc2.6.gf58d
Dmitry Baryshkov
maintainerPATCH 10/37 Input: tosakbd - fix suspend
In reply to Dmitry Torokhov--- drivers/input/keyboard/tosakbd.c | 21 ++++++++++++++++++--- 1 files changed, 18 insertions(+), 3 deletions(-)
drivers/input/keyboard/tosakbd.c +18 -3
@@ -52,7 +52,7 @@ KEY_X, KEY_F, KEY_SPACE, KEY_APOSTROPHE, TOSA_KEY_MAIL, KEY_LEFT, KEY_DOWN, KEY_struct tosakbd {unsigned int keycode[ARRAY_SIZE (tosakbd_keycode)];struct input_dev *input; - +int suspended;spinlock_t lock;/* protect kbd scanning */ struct timer_list timer; };
@@ -133,6 +133,9 @@ static void tosakbd_scankeyboard(struct platform_device *dev)spin_lock_irqsave (&tosakbd->lock, flags); +if (tosakbd->suspended) + goto out; +for (col =0 ; col <TOSA_KEY_STROBE_NUM ; col++) {/* * Discharge the output driver capacitatance
@@ -174,6 +177,7 @@ static void tosakbd_scankeyboard(struct platform_device *dev)if (num_pressed)mod_timer (&tosakbd->timer, jiffies +SCAN_INTERVAL ); + out:spin_unlock_irqrestore (&tosakbd->lock, flags); }
@@ -200,6 +204,7 @@ static irqreturn_t tosakbd_interrupt(int irq, void *__dev)static void tosakbd_timer_callback (unsigned long __dev) {struct platform_device *dev = (struct platform_device *)__dev; +tosakbd_scankeyboard (dev); }
@@ -207,6 +212,13 @@ static void tosakbd_timer_callback(unsigned long __dev)static int tosakbd_suspend (struct platform_device *dev,pm_message_t state) {struct tosakbd *tosakbd =platform_get_drvdata (dev); +unsigned long flags; + +spin_lock_irqsave (&tosakbd->lock, flags); +PGSR1 = (PGSR1 & ~TOSA_GPIO_LOW_STROBE_BIT ); +PGSR2 = (PGSR2 & ~TOSA_GPIO_HIGH_STROBE_BIT ); + tosakbd->suspended =1 ; +spin_unlock_irqrestore (&tosakbd->lock, flags);del_timer_sync (&tosakbd->timer);
@@ -215,6 +227,9 @@ static int tosakbd_suspend(struct platform_device *dev, pm_message_t state)static int tosakbd_resume (struct platform_device *dev) { +struct tosakbd *tosakbd =platform_get_drvdata (dev); + + tosakbd->suspended =0 ;tosakbd_scankeyboard (dev);return 0 ;
@@ -365,8 +380,8 @@ fail:return error; } -static int __devexit tosakbd_remove(struct platform_device *dev) { - +static int __devexit tosakbd_remove(struct platform_device *dev) +{int i;struct tosakbd *tosakbd =platform_get_drvdata (dev);
Signature · 1 line
1.5.5.rc2.6.gf58d
Anssi Hannula
maintainerPATCH 11/37 Input: xpad - match xbox 360 devices with interface info
In reply to Dmitry TorokhovMatch Xbox 360 controllers using the interface info, i.e. interface class 255 (Vendor specific), subclass 93 and protocol 1, instead of specifying the device ids individually. As the class is vendor-specific, we have to still match against vendor id as well, though.
--- drivers/input/joystick/xpad.c | 21 ++++++++++++++++----- 1 files changed, 16 insertions(+), 5 deletions(-)
drivers/input/joystick/xpad.c +16 -5
@@ -91,6 +91,7 @@#define XTYPE_XBOX 0#define XTYPE_XBOX360 1 +#define XTYPE_UNKNOWN 2static int dpad_to_buttons;module_param (dpad_to_buttons, bool,S_IRUGO );
@@ -138,7 +139,7 @@ static const struct xpad_device { { 0x1430, 0x8888, "TX6500+ Dance Pad (first generation)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, { 0x045e, 0x028e, "Microsoft X-Box 360 pad", MAP_DPAD_TO_AXES, XTYPE_XBOX360 }, { 0xffff, 0xffff, "Chinese-made Xbox Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, - { 0x0000, 0x0000, "Generic X-Box pad", MAP_DPAD_UNKNOWN, XTYPE_XBOX } + { 0x0000, 0x0000, "Generic X-Box pad", MAP_DPAD_UNKNOWN, XTYPE_UNKNOWN } }; static const signed short xpad_btn[] = {
@@ -173,12 +174,20 @@ static const signed short xpad_abs_pad[] = { -1 /* terminating entry */ }; -/* Xbox 360 has a vendor-specific (sub)class, so we cannot match it with only -* USB_INTERFACE_INFO, more to that this device has 4 InterfaceProtocols, -* but we need only one of them. */ +/* Xbox 360 has a vendor-specific class, so we cannot match it with only +* USB_INTERFACE_INFO (also specifically refused by USB subsystem), so we +* match against vendor id as well. Also, some Xbox 360 devices have multiple +* interface protocols, we only need protocol 1. */ +#define XPAD_XBOX360_VENDOR (vend) \ + .match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_INT_INFO, \ + .idVendor = (vend), \ + .bInterfaceClass = USB_CLASS_VENDOR_SPEC, \ + .bInterfaceSubClass = 93, \ + .bInterfaceProtocol = 1 +static struct usb_device_id xpad_table [] = { {USB_INTERFACE_INFO ('X' ,'B' ,0 ) },/* X-Box USB-IF not approved class */ - {USB_DEVICE_INTERFACE_PROTOCOL (0x045e ,0x028e ,1 ) },/* X-Box 360 controller */ + {XPAD_XBOX360_VENDOR (0x045e ) },/* Microsoft X-Box 360 controllers */ { } };
@@ -645,6 +654,8 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id xpad->xtype = xpad_device[i].xtype;if (xpad->dpad_mapping ==MAP_DPAD_UNKNOWN ) xpad->dpad_mapping = dpad_to_buttons; +if (xpad->xtype ==XTYPE_UNKNOWN ) + xpad->xtype = (intf->cur_altsetting->desc.bInterfaceClass ==USB_CLASS_VENDOR_SPEC ); xpad->dev = input_dev;usb_make_path (udev, xpad->phys,sizeof (xpad->phys));strlcat (xpad->phys,"/input0" ,sizeof (xpad->phys));
Signature · 1 line
1.5.5.rc2.6.gf58d
Anssi Hannula
maintainerPATCH 12/37 Input: xpad - fix dpad handling of unknown devices
In reply to Dmitry TorokhovFor devices not specifically listed in xpad.c, xpad->dpad_mapping is initially set to MAP_DPAD_UNKNOWN. In xpad_probe() it gets changed to either MAP_DPAD_TO_BUTTONS or MAP_DPAD_TO_AXES, depending on the module parameter dpad_to_buttons.
However, MAP_DPAD_UNKNOWN is defined as -1, while the field is u8. This results in actual value of 255, causing the MAP_DPAD_UNKNOWN check in xpad_probe() to fail.
Fix that by defining MAP_DPAD_UNKNOWN as 2 instead.
Also, setting module parameter dpad_to_buttons to 1 should obviously map dpad to buttons, while the default behaviour (0) should be to map dpad to axes. However, dpad_to_buttons is directly assigned to xpad->dpad_mapping, and as MAP_DPAD_TO_BUTTONS is 0, the actual behaviour is reversed.
Fix that by negating dpad_to_buttons in assignment.
--- drivers/input/joystick/xpad.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/input/joystick/xpad.c +2 -2
@@ -87,7 +87,7 @@but we map them to axes when possible to simplify things */ #define MAP_DPAD_TO_BUTTONS 0#define MAP_DPAD_TO_AXES 1 -#define MAP_DPAD_UNKNOWN -1 +#define MAP_DPAD_UNKNOWN 2#define XTYPE_XBOX 0#define XTYPE_XBOX360 1
@@ -653,7 +653,7 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id xpad->dpad_mapping = xpad_device[i].dpad_mapping; xpad->xtype = xpad_device[i].xtype;if (xpad->dpad_mapping ==MAP_DPAD_UNKNOWN ) - xpad->dpad_mapping = dpad_to_buttons; + xpad->dpad_mapping = !dpad_to_buttons;if (xpad->xtype ==XTYPE_UNKNOWN ) xpad->xtype = (intf->cur_altsetting->desc.bInterfaceClass ==USB_CLASS_VENDOR_SPEC ); xpad->dev = input_dev;
Signature · 1 line
1.5.5.rc2.6.gf58d
Anssi Hannula
maintainerPATCH 13/37 Input: xpad - fix inverted Y and RY axes
In reply to Dmitry TorokhovThe commit ae91d10aab2762f81733e9194cb56eff99c8d808 inverted Y and RY axes on xbox360 so that up is positive and down is negative. This is wrong, as axes on game controllers have up as negative per convention. Also, even xpad itself reports HAT0X with up as negative.
Fix that by inverting them again.
Also, according to http://bugzilla.kernel.org/show_bug.cgi?id=10337 the original xbox controllers also have the Y and RY axes inverted. Fix that by inverting them as well.
--- drivers/input/joystick/xpad.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/input/joystick/xpad.c +4 -4
@@ -236,13 +236,13 @@ static void xpad_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char *dinput_report_abs (dev,ABS_X , (__s16 )le16_to_cpup ((__le16 *)(data +12 )));input_report_abs (dev,ABS_Y , - (__s16 )le16_to_cpup ((__le16 *)(data +14 ))); + ~(__s16 )le16_to_cpup ((__le16 *)(data +14 )));/* right stick */ input_report_abs (dev,ABS_RX , (__s16 )le16_to_cpup ((__le16 *)(data +16 )));input_report_abs (dev,ABS_RY , - (__s16 )le16_to_cpup ((__le16 *)(data +18 ))); + ~(__s16 )le16_to_cpup ((__le16 *)(data +18 )));/* triggers left/right */ input_report_abs (dev,ABS_Z , data[10 ]);
@@ -330,13 +330,13 @@ static void xpad360_process_packet(struct usb_xpad *xpad,input_report_abs (dev,ABS_X , (__s16 )le16_to_cpup ((__le16 *)(data +6 )));input_report_abs (dev,ABS_Y , - (__s16 )le16_to_cpup ((__le16 *)(data +8 ))); + ~(__s16 )le16_to_cpup ((__le16 *)(data +8 )));/* right stick */ input_report_abs (dev,ABS_RX , (__s16 )le16_to_cpup ((__le16 *)(data +10 )));input_report_abs (dev,ABS_RY , - (__s16 )le16_to_cpup ((__le16 *)(data +12 ))); + ~(__s16 )le16_to_cpup ((__le16 *)(data +12 )));/* triggers left/right */ input_report_abs (dev,ABS_Z , data[4 ]);
Signature · 1 line
1.5.5.rc2.6.gf58d
Anssi Hannula
maintainerPATCH 14/37 Input: xpad - add more xbox 360 controller ids
In reply to Dmitry TorokhovAdd Mad Catz and 0x0e6f xbox360 controllers which are already found in xpad_device[] table in xpad.c into the vendor id list. Also add Logitech into the vendor list for Logitech Chillstream gamepads. Also add the RedOctane Guitar Hero X-plorer.
--- drivers/input/joystick/xpad.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
drivers/input/joystick/xpad.c +6 -0
@@ -110,6 +110,7 @@ static const struct xpad_device { { 0x045e, 0x0287, "Microsoft Xbox Controller S", MAP_DPAD_TO_AXES, XTYPE_XBOX }, { 0x0c12, 0x8809, "RedOctane Xbox Dance Pad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, { 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, + { 0x046d, 0xc242, "Logitech Chillstream Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX360 }, { 0x046d, 0xca84, "Logitech Xbox Cordless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, { 0x046d, 0xca88, "Logitech Compact Controller for Xbox", MAP_DPAD_TO_AXES, XTYPE_XBOX }, { 0x05fd, 0x1007, "Mad Catz Controller (unverified)", MAP_DPAD_TO_AXES, XTYPE_XBOX },
@@ -136,6 +137,7 @@ static const struct xpad_device { { 0x0f30, 0x8888, "BigBen XBMiniPad Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, { 0x102c, 0xff0c, "Joytech Wireless Advanced Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, { 0x12ab, 0x8809, "Xbox DDR dancepad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, + { 0x1430, 0x4748, "RedOctane Guitar Hero X-plorer", MAP_DPAD_TO_AXES, XTYPE_XBOX360 }, { 0x1430, 0x8888, "TX6500+ Dance Pad (first generation)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, { 0x045e, 0x028e, "Microsoft X-Box 360 pad", MAP_DPAD_TO_AXES, XTYPE_XBOX360 }, { 0xffff, 0xffff, "Chinese-made Xbox Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
@@ -188,6 +190,10 @@ static const signed short xpad_abs_pad[] = {static struct usb_device_id xpad_table [] = { {USB_INTERFACE_INFO ('X' ,'B' ,0 ) },/* X-Box USB-IF not approved class */ {XPAD_XBOX360_VENDOR (0x045e ) },/* Microsoft X-Box 360 controllers */ + {XPAD_XBOX360_VENDOR (0x046d ) },/* Logitech X-Box 360 style controllers */ + {XPAD_XBOX360_VENDOR (0x0738 ) },/* Mad Catz X-Box 360 controllers */ + {XPAD_XBOX360_VENDOR (0x0e6f ) },/* 0x0e6f X-Box 360 controllers */ + {XPAD_XBOX360_VENDOR (0x1430 ) },/* RedOctane X-Box 360 controllers */ { } };
Signature · 1 line
1.5.5.rc2.6.gf58d
Anssi Hannula
maintainerPATCH 15/37 Input: xpad - do not report nonexistent buttons for xbox360
In reply to Dmitry TorokhovThe buttons BTN_C and BTN_Z are only used in the original xbox controller, not in xbox360 controller. Therefore only add them to keybit when the controller is a non-360 one.
--- drivers/input/joystick/xpad.c | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-)
drivers/input/joystick/xpad.c +14 -4
@@ -144,12 +144,19 @@ static const struct xpad_device { { 0x0000, 0x0000, "Generic X-Box pad", MAP_DPAD_UNKNOWN, XTYPE_UNKNOWN } }; -static const signed short xpad_btn[] = { -BTN_A ,BTN_B ,BTN_C ,BTN_X ,BTN_Y ,BTN_Z ,/* "analog" buttons */ +/* buttons shared with xbox and xbox360 */ +static const signed short xpad_common_btn[] = { +BTN_A ,BTN_B ,BTN_X ,BTN_Y ,/* "analog" buttons */ BTN_START ,BTN_BACK ,BTN_THUMBL ,BTN_THUMBR ,/* start/back/sticks */ -1 /* terminating entry */ }; +/* original xbox controllers only */ +static const signed short xpad_btn[] = { +BTN_C ,BTN_Z ,/* "analog" buttons */ +-1 /* terminating entry */ +}; +/* only used if MAP_DPAD_TO_BUTTONS */ static const signed short xpad_btn_pad[] = {BTN_LEFT ,BTN_RIGHT ,/* d-pad left, right */
@@ -679,11 +686,14 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id input_dev->evbit[0 ] =BIT_MASK (EV_KEY ) |BIT_MASK (EV_ABS );/* set up buttons */ -for (i =0 ; xpad_btn[i] >=0 ; i++) -set_bit (xpad_btn[i], input_dev->keybit); +for (i =0 ; xpad_common_btn[i] >=0 ; i++) +set_bit (xpad_common_btn[i], input_dev->keybit);if (xpad->xtype ==XTYPE_XBOX360 )for (i =0 ; xpad360_btn[i] >=0 ; i++)set_bit (xpad360_btn[i], input_dev->keybit); +else +for (i =0 ; xpad_btn[i] >=0 ; i++) +set_bit (xpad_btn[i], input_dev->keybit);if (xpad->dpad_mapping ==MAP_DPAD_TO_BUTTONS )for (i =0 ; xpad_btn_pad[i] >=0 ; i++)set_bit (xpad_btn_pad[i], input_dev->keybit);
Signature · 1 line
1.5.5.rc2.6.gf58d
Anssi Hannula
maintainerPATCH 16/37 Input: xpad - enable force feedback on xbox 360 controllers only
In reply to Dmitry TorokhovCommit 4994cd8dadcf9d484ab3ec19f3c7c7a4e5353c1c introduced a regression which causes xpad to report force feedback cababilities for non-360 controllers too, even while there is no actual support for those.
Fix that by adding a check for XTYPE_XBOX360 to xpad_init_ff().
--- drivers/input/joystick/xpad.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/input/joystick/xpad.c +3 -0
@@ -499,6 +499,9 @@ static int xpad_play_effect(struct input_dev *dev, void *data,static int xpad_init_ff (struct usb_xpad *xpad) { +if (xpad->xtype !=XTYPE_XBOX360 ) +return 0 ; +input_set_capability (xpad->dev,EV_FF ,FF_RUMBLE );return input_ff_create_memless (xpad->dev,NULL , xpad_play_effect);
Signature · 1 line
1.5.5.rc2.6.gf58d
Anssi Hannula
maintainerPATCH 17/37 Input: xpad - drop obsolete driver versioning
In reply to Dmitry TorokhovThe driver version numbers and changelog have not been updated in a long while to reflect actual changes. Remove the version number and add a notice that later changes can be tracked in SCM.
--- drivers/input/joystick/xpad.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
drivers/input/joystick/xpad.c +4 -3
@@ -1,5 +1,5 @@/* -* X-Box gamepad - v0.0.6 +* X-Box gamepad driver * * Copyright (c) 2002 Marko Friedemann <[email protected]> * 2004 Oliver Schwartz <[email protected]>,
@@ -68,6 +68,8 @@* - dance pads will map D-PAD to buttons, not axes * - pass the module paramater 'dpad_to_buttons' to force * the D-PAD to map to buttons if your pad is not detected +* +* Later changes can be tracked in SCM. */ #include <linux/kernel.h>
@@ -77,7 +79,6 @@#include <linux/module.h> #include <linux/usb/input.h> -#define DRIVER_VERSION "v0.0.6"#define DRIVER_AUTHOR "Marko Friedemann <[email protected]>"#define DRIVER_DESC "X-Box pad driver"
@@ -771,7 +772,7 @@ static int __init usb_xpad_init(void) {int result =usb_register (&xpad_driver);if (result ==0 ) -info (DRIVER_DESC ":" DRIVER_VERSION ); +info (DRIVER_DESC );return result; }
Signature · 1 line
1.5.5.rc2.6.gf58d
Brian Magnuson
maintainerPATCH 18/37 Input: xpad - add support for wireless xbox360 controllers
In reply to Dmitry Torokhov--- drivers/input/joystick/xpad.c | 164 +++++++++++++++++++++++++++++++++++++---- 1 files changed, 148 insertions(+), 16 deletions(-)
drivers/input/joystick/xpad.c +148 -16
@@ -92,7 +92,8 @@#define XTYPE_XBOX 0#define XTYPE_XBOX360 1 -#define XTYPE_UNKNOWN 2 +#define XTYPE_XBOX360W 2 +#define XTYPE_UNKNOWN 3static int dpad_to_buttons;module_param (dpad_to_buttons, bool,S_IRUGO );
@@ -109,6 +110,7 @@ static const struct xpad_device { { 0x045e, 0x0289, "Microsoft X-Box pad v2 (US)", MAP_DPAD_TO_AXES, XTYPE_XBOX }, { 0x045e, 0x0285, "Microsoft X-Box pad (Japan)", MAP_DPAD_TO_AXES, XTYPE_XBOX }, { 0x045e, 0x0287, "Microsoft Xbox Controller S", MAP_DPAD_TO_AXES, XTYPE_XBOX }, + { 0x045e, 0x0719, "Xbox 360 Wireless Receiver", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W }, { 0x0c12, 0x8809, "RedOctane Xbox Dance Pad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, { 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, { 0x046d, 0xc242, "Logitech Chillstream Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX360 },
@@ -186,22 +188,25 @@ static const signed short xpad_abs_pad[] = {/* Xbox 360 has a vendor-specific class, so we cannot match it with only * USB_INTERFACE_INFO (also specifically refused by USB subsystem), so we -* match against vendor id as well. Also, some Xbox 360 devices have multiple -* interface protocols, we only need protocol 1. */ -#define XPAD_XBOX360_VENDOR (vend) \ +* match against vendor id as well. Wired Xbox 360 devices have protocol 1, +* wireless controllers have protocol 129. */ +#define XPAD_XBOX360_VENDOR_PROTOCOL (vend,pr) \ .match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_INT_INFO, \ .idVendor = (vend), \ .bInterfaceClass = USB_CLASS_VENDOR_SPEC, \ .bInterfaceSubClass = 93, \ - .bInterfaceProtocol = 1 + .bInterfaceProtocol = (pr) +#define XPAD_XBOX360_VENDOR (vend) \ + { XPAD_XBOX360_VENDOR_PROTOCOL(vend,1) }, \ + { XPAD_XBOX360_VENDOR_PROTOCOL(vend,129) }static struct usb_device_id xpad_table [] = { {USB_INTERFACE_INFO ('X' ,'B' ,0 ) },/* X-Box USB-IF not approved class */ - {XPAD_XBOX360_VENDOR (0x045e ) },/* Microsoft X-Box 360 controllers */ - {XPAD_XBOX360_VENDOR (0x046d ) },/* Logitech X-Box 360 style controllers */ - {XPAD_XBOX360_VENDOR (0x0738 ) },/* Mad Catz X-Box 360 controllers */ - {XPAD_XBOX360_VENDOR (0x0e6f ) },/* 0x0e6f X-Box 360 controllers */ - {XPAD_XBOX360_VENDOR (0x1430 ) },/* RedOctane X-Box 360 controllers */ +XPAD_XBOX360_VENDOR (0x045e ),/* Microsoft X-Box 360 controllers */ +XPAD_XBOX360_VENDOR (0x046d ),/* Logitech X-Box 360 style controllers */ +XPAD_XBOX360_VENDOR (0x0738 ),/* Mad Catz X-Box 360 controllers */ +XPAD_XBOX360_VENDOR (0x0e6f ),/* 0x0e6f X-Box 360 controllers */ +XPAD_XBOX360_VENDOR (0x1430 ),/* RedOctane X-Box 360 controllers */ { } };
@@ -211,10 +216,15 @@ struct usb_xpad {struct input_dev *dev;/* input device interface */ struct usb_device *udev;/* usb device */ +int pad_present; +struct urb *irq_in;/* urb for interrupt in report */ unsigned char *idata;/* input data */ dma_addr_t idata_dma; +struct urb *bulk_out; +unsigned char *bdata; +#if defined(CONFIG_JOYSTICK_XPAD_FF ) || defined(CONFIG_JOYSTICK_XPAD_LEDS )struct urb *irq_out;/* urb for interrupt out report */ unsigned char *odata;/* output data */
@@ -359,6 +369,39 @@ static void xpad360_process_packet(struct usb_xpad *xpad,input_sync (dev); } +/* +* xpad360w_process_packet +* +* Completes a request by converting the data into events for the +* input subsystem. It is version for xbox 360 wireless controller. +* +* Byte.Bit +* 00.1 - Status change: The controller or headset has connected/disconnected +* Bits 01.7 and 01.6 are valid +* 01.7 - Controller present +* 01.6 - Headset present +* 01.1 - Pad state (Bytes 4+) valid +* +*/ + +static void xpad360w_process_packet (struct usb_xpad *xpad,u16 cmd,unsigned char *data) +{ +/* Presence change */ +if (data[0 ] &0x08 ) { +if (data[1 ] &0x80 ) { + xpad->pad_present =1 ; +usb_submit_urb (xpad->bulk_out,GFP_ATOMIC ); + }else + xpad->pad_present =0 ; + } + +/* Valid pad data */ +if (!(data[1 ] &0x1 )) +return ; + +xpad360_process_packet (xpad, cmd, &data[4 ]); +} +static void xpad_irq_in (struct urb *urb) {struct usb_xpad *xpad = urb->context;
@@ -381,10 +424,16 @@ static void xpad_irq_in(struct urb *urb) goto exit; } -if (xpad->xtype ==XTYPE_XBOX360 ) +switch (xpad->xtype) { +case XTYPE_XBOX360 :xpad360_process_packet (xpad,0 , xpad->idata); -else +break ; +case XTYPE_XBOX360W : +xpad360w_process_packet (xpad,0 , xpad->idata); +break ; +default :xpad_process_packet (xpad,0 , xpad->idata); + } exit: retval =usb_submit_urb (urb,GFP_ATOMIC );
@@ -422,6 +471,23 @@ exit: __FUNCTION__, retval); } +static void xpad_bulk_out (struct urb *urb) +{ +switch (urb->status) { +case 0 : +/* success */ +break ; +case -ECONNRESET : +case -ENOENT : +case -ESHUTDOWN : +/* this urb is terminated, clean up */ +dbg ("%s - urb shutting down with status: %d" , __FUNCTION__, urb->status); +break ; +default : +dbg ("%s - nonzero urb status received: %d" , __FUNCTION__, urb->status); + } +} +static int xpad_init_output (struct usb_interface *intf,struct usb_xpad *xpad) {struct usb_endpoint_descriptor *ep_irq_out;
@@ -600,6 +666,10 @@ static int xpad_open(struct input_dev *dev) {struct usb_xpad *xpad =input_get_drvdata (dev); +/* URB was submitted in probe */ +if (xpad->xtype ==XTYPE_XBOX360W ) +return 0 ; + xpad->irq_in->dev = xpad->udev;if (usb_submit_urb (xpad->irq_in,GFP_KERNEL ))return -EIO ;
@@ -611,7 +681,8 @@ static void xpad_close(struct input_dev *dev) {struct usb_xpad *xpad =input_get_drvdata (dev); -usb_kill_urb (xpad->irq_in); +if (xpad->xtype !=XTYPE_XBOX360W ) +usb_kill_urb (xpad->irq_in);xpad_stop_output (xpad); }
@@ -671,8 +742,15 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id xpad->xtype = xpad_device[i].xtype;if (xpad->dpad_mapping ==MAP_DPAD_UNKNOWN ) xpad->dpad_mapping = !dpad_to_buttons; -if (xpad->xtype ==XTYPE_UNKNOWN ) - xpad->xtype = (intf->cur_altsetting->desc.bInterfaceClass ==USB_CLASS_VENDOR_SPEC ); +if (xpad->xtype ==XTYPE_UNKNOWN ) { +if (intf->cur_altsetting->desc.bInterfaceClass ==USB_CLASS_VENDOR_SPEC ) { +if (intf->cur_altsetting->desc.bInterfaceProtocol ==129 ) + xpad->xtype =XTYPE_XBOX360W ; +else + xpad->xtype =XTYPE_XBOX360 ; + }else + xpad->xtype =XTYPE_XBOX ; + } xpad->dev = input_dev;usb_make_path (udev, xpad->phys,sizeof (xpad->phys));strlcat (xpad->phys,"/input0" ,sizeof (xpad->phys));
@@ -692,7 +770,7 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id/* set up buttons */ for (i =0 ; xpad_common_btn[i] >=0 ; i++)set_bit (xpad_common_btn[i], input_dev->keybit); -if (xpad->xtype ==XTYPE_XBOX360 ) +if ((xpad->xtype ==XTYPE_XBOX360 ) || (xpad->xtype ==XTYPE_XBOX360W ))for (i =0 ; xpad360_btn[i] >=0 ; i++)set_bit (xpad360_btn[i], input_dev->keybit);else
@@ -734,8 +812,57 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id goto fail4;usb_set_intfdata (intf, xpad); + +/* +* Submit the int URB immediatly rather than waiting for open +* because we get status messages from the device whether +* or not any controllers are attached. In fact, it's +* exactly the message that a controller has arrived that +* we're waiting for. +*/ +if (xpad->xtype ==XTYPE_XBOX360W ) { + xpad->irq_in->dev = xpad->udev; + error =usb_submit_urb (xpad->irq_in,GFP_KERNEL ); +if (error) + goto fail4; + +/* +* Setup the message to set the LEDs on the +* controller when it shows up +*/ + xpad->bulk_out =usb_alloc_urb (0 ,GFP_KERNEL ); +if (!xpad->bulk_out) + goto fail5; + + xpad->bdata =kzalloc (XPAD_PKT_LEN ,GFP_KERNEL ); +if (!xpad->bdata) + goto fail6; + + xpad->bdata[2 ] =0x08 ; +switch (intf->cur_altsetting->desc.bInterfaceNumber) { +case 0 : + xpad->bdata[3 ] =0x42 ; +break ; +case 2 : + xpad->bdata[3 ] =0x43 ; +break ; +case 4 : + xpad->bdata[3 ] =0x44 ; +break ; +case 6 : + xpad->bdata[3 ] =0x45 ; + } + + ep_irq_in = &intf->cur_altsetting->endpoint[1 ].desc; +usb_fill_bulk_urb (xpad->bulk_out, udev, +usb_sndbulkpipe (udev, ep_irq_in->bEndpointAddress), + xpad->bdata,XPAD_PKT_LEN , xpad_bulk_out, xpad); + } +return 0 ; + fail6:usb_free_urb (xpad->bulk_out); + fail5:usb_kill_urb (xpad->irq_in); fail4:usb_free_urb (xpad->irq_in); fail3:xpad_deinit_output (xpad); fail2:usb_buffer_free (udev,XPAD_PKT_LEN , xpad->idata, xpad->idata_dma);
@@ -754,6 +881,11 @@ static void xpad_disconnect(struct usb_interface *intf)xpad_led_disconnect (xpad);input_unregister_device (xpad->dev);xpad_deinit_output (xpad); +if (xpad->xtype ==XTYPE_XBOX360W ) { +usb_kill_urb (xpad->bulk_out); +usb_free_urb (xpad->bulk_out); +usb_kill_urb (xpad->irq_in); + }usb_free_urb (xpad->irq_in);usb_buffer_free (xpad->udev,XPAD_PKT_LEN , xpad->idata, xpad->idata_dma);
Signature · 1 line
1.5.5.rc2.6.gf58d
Oliver Neukum
maintainerPATCH 19/37 Input: xpad - don't use GFP_ATOMIC
In reply to Dmitry TorokhovGFP_ATOMIC should not be used when GFP_KERNEL can be used.
--- drivers/input/joystick/xpad.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/input/joystick/xpad.c +2 -2
@@ -497,7 +497,7 @@ static int xpad_init_output(struct usb_interface *intf, struct usb_xpad *xpad)return 0 ; xpad->odata =usb_buffer_alloc (xpad->udev,XPAD_PKT_LEN , -GFP_ATOMIC , &xpad->odata_dma ); +GFP_KERNEL , &xpad->odata_dma);if (!xpad->odata) goto fail1;
@@ -729,7 +729,7 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id goto fail1; xpad->idata =usb_buffer_alloc (udev,XPAD_PKT_LEN , -GFP_ATOMIC , &xpad->idata_dma); +GFP_KERNEL , &xpad->idata_dma);if (!xpad->idata) goto fail1;
Signature · 1 line
1.5.5.rc2.6.gf58d
Oliver Neukum
maintainerPATCH 20/37 Input: usbtouchscreen - don't use DMA on stack
In reply to Dmitry TorokhovDMA on the stack is not allowed. The buffer must be kmalloced.
--- drivers/input/touchscreen/usbtouchscreen.c | 31 +++++++++++++++++---------- 1 files changed, 19 insertions(+), 12 deletions(-)
drivers/input/touchscreen/usbtouchscreen.c +19 -12
@@ -396,9 +396,12 @@ static int gunze_read_data(struct usbtouch_usb *dev, unsigned char *pkt)static int dmc_tsc10_init (struct usbtouch_usb *usbtouch) {struct usb_device *dev = usbtouch->udev; -int ret; -unsigned char buf[2 ]; +int ret = -ENOMEM ; +unsigned char *buf; + buf =kmalloc (2 ,GFP_KERNEL ); +if (!buf) + goto err_nobuf;/* reset */ buf[0 ] = buf[1 ] =0xFF ; ret = usb_control_msg(dev, usb_rcvctrlpipe (dev, 0),
@@ -406,9 +409,11 @@ static int dmc_tsc10_init(struct usbtouch_usb *usbtouch)USB_DIR_IN |USB_TYPE_VENDOR |USB_RECIP_DEVICE , 0, 0, buf, 2, USB_CTRL_SET_TIMEOUT);if (ret <0 ) -return ret; -if (buf[0 ] !=0x06 || buf[1 ] !=0x00 ) -return -ENODEV ; + goto err_out; +if (buf[0 ] !=0x06 || buf[1 ] !=0x00 ) { + ret = -ENODEV ; + goto err_out; + }/* set coordinate output rate */ buf[0 ] = buf[1 ] =0xFF ;
@@ -417,20 +422,22 @@ static int dmc_tsc10_init(struct usbtouch_usb *usbtouch)USB_DIR_IN |USB_TYPE_VENDOR |USB_RECIP_DEVICE , TSC10_RATE_150, 0, buf, 2, USB_CTRL_SET_TIMEOUT);if (ret <0 ) -return ret; + goto err_out;if ((buf[0 ] !=0x06 || buf[1 ] !=0x00 ) && - (buf[0 ] !=0x15 || buf[1 ] !=0x01 )) -return -ENODEV ; + (buf[0 ] !=0x15 || buf[1 ] !=0x01 )) { + ret = -ENODEV ; + goto err_out; + }/* start sending data */ ret =usb_control_msg (dev,usb_rcvctrlpipe (dev,0 ),TSC10_CMD_DATA1 ,USB_DIR_OUT |USB_TYPE_VENDOR |USB_RECIP_DEVICE ,0 ,0 ,NULL ,0 ,USB_CTRL_SET_TIMEOUT ); -if (ret <0 ) -return ret; - -return 0 ; +err_out: +kfree (buf); +err_nobuf: +return ret; }
Signature · 1 line
1.5.5.rc2.6.gf58d
Karl Dahlke
maintainerPATCH 21/37 Input: put ledstate in the keyboard notifier
In reply to Dmitry TorokhovLed state should be part of the key event, like shiftstate, and not grabbed asynchronously after the fact.
[[email protected]: various fixes]
--- drivers/char/keyboard.c | 2 ++ include/linux/keyboard.h | 1 + 2 files changed, 3 insertions(+), 0 deletions(-)
drivers/char/keyboard.c +2 -0
@@ -1237,6 +1237,7 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw) } param.shift = shift_final = (shift_state | kbd->slockstate) ^ kbd->lockstate; + param.ledstate = kbd->ledflagstate; key_map = key_maps[shift_final];if (atomic_notifier_call_chain (&keyboard_notifier_list,KBD_KEYCODE , ¶m) ==NOTIFY_STOP || !key_map) {
@@ -1285,6 +1286,7 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw) (*k_handler[type])(vc, keysym &0xff , !down); + param.ledstate = kbd->ledflagstate;atomic_notifier_call_chain (&keyboard_notifier_list,KBD_POST_KEYSYM , ¶m);if (type !=KT_SLOCK )
include/linux/keyboard.h +1 -0
@@ -33,6 +33,7 @@ struct keyboard_notifier_param {struct vc_data *vc;/* VC on which the keyboard press was done */ int down;/* Pressure of the key? */ int shift;/* Current shift mask */ +int ledstate;/* Current led state */ unsigned int value;/* keycode, unicode value or keysym */ };
Signature · 1 line
1.5.5.rc2.6.gf58d
Hans-Christian Egtvedt
maintainerPATCH 22/37 Input: add PS/2 serio driver for AVR32 devices
In reply to Dmitry TorokhovAdd support for the PSIF peripheral on AVR32 AP7 devices. It is implemented as a serio driver and will behave like a serio 8042 device.
The driver has been tested with a Dell keyboard capable of running on 3.3 volts and a Logitech mouse on the STK1000 + STK1002 starter kit. The Logitech mouse was hacked by cutting the cord and using a bi-directional voltage converter to get the required 5 volt I/O level.
For more information about the PSIF module, see the datasheet for AT32AP700X at
http://www.atmel.com/dyn/products/datasheets.asp?family_id=682
--- drivers/input/serio/Kconfig | 10 + drivers/input/serio/Makefile | 1 + drivers/input/serio/at32psif.c | 375 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 386 insertions(+), 0 deletions(-) create mode 100644 drivers/input/serio/at32psif.c
drivers/input/serio/Kconfig +10 -0
@@ -88,6 +88,16 @@ config SERIO_RPCKBD To compile this driver as a module, choose M here: the module will be called rpckbd. +config SERIO_AT32PSIF + tristate "AVR32 PSIF PS/2 keyboard and mouse controller" + depends on AVR32 + help + Say Y here if you want to use the PSIF peripheral on AVR32 devices + and connect a PS/2 keyboard and/or mouse to it. + + To compile this driver as a module, choose M here: the module will + be called at32psif. + config SERIO_AMBAKMI tristate "AMBA KMI keyboard controller" depends on ARM_AMBA
drivers/input/serio/Makefile +1 -0
@@ -12,6 +12,7 @@ obj-$(CONFIG_SERIO_CT82C710) += ct82c710.o obj-$(CONFIG_SERIO_RPCKBD) += rpckbd.o obj-$(CONFIG_SERIO_SA1111) += sa1111ps2.o obj-$(CONFIG_SERIO_AMBAKMI) += ambakmi.o +obj-$(CONFIG_SERIO_AT32PSIF) += at32psif.o obj-$(CONFIG_SERIO_Q40KBD) += q40kbd.o obj-$(CONFIG_SERIO_GSCPS2) += gscps2.o obj-$(CONFIG_HP_SDC) += hp_sdc.o
drivers/input/serio/at32psif.c new file +375 -0
375 lines not on this page · raw message
Signature · 1 line
1.5.5.rc2.6.gf58d
Re: [PATCH 22/37] Input: add PS/2 serio driver for AVR32 devices
Quoted 8 lines · Hans-Christian Egtvedt
Add support for the PSIF peripheral on AVR32 AP7 devices. It is implemented as a serio driver and will behave like a serio 8042 device.
The driver has been tested with a Dell keyboard capable of running on 3.3 volts and a Logitech mouse on the STK1000 + STK1002 starter kit. The Logitech mouse was hacked by cutting the cord and using a bi-directional voltage converter to get the required 5 volt I/O level.
Quoted 6 lines
For more information about the PSIF module, see the datasheet for AT32AP700X at
http://www.atmel.com/dyn/products/datasheets.asp?family_id=682Signed-off-by Hans-Christian Egtvedt <[email protected]>Signed-off-by Dmitry Torokhov <[email protected]>---
<snipp serio driver for AVR32>
Quoted 1 line
+MODULE_AUTHOR("Hans-Christian Egtvedt <[email protected]>");
This address has been changed, please apply the attached patch.
Review
Quoted 2 lines
(quoted diff) +2
-0+MODULE_DESCRIPTION("Atmel AVR32 PSIF PS/2 driver"); +MODULE_LICENSE("GPL");
PS! I think my old address even bounces a message, sorry about that :(
Signature · 2 lines
With kind regards, Hans-Christian Egtvedt, Applications Engineer
Quoted 1 line
From
8a3056b55d3268a03b932830c79b242c5f264cedMon Sep 17 00:00:00 2001
From: Hans-Christian Egtvedt <[email protected]>
Date: Mon, 21 Apr 2008 15:30:55 +0200
Subject: [PATCH 1/1] Change MODULE_AUTHOR in at32psif serio driver to valid email address
--- drivers/input/serio/at32psif.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/input/serio/at32psif.c +1 -1
@@ -302,6 +302,6 @@ static void __exit psif_exit(void)module_init (psif_init);module_exit (psif_exit); -MODULE_AUTHOR ("Hans-Christian Egtvedt <[email protected]>" ); +MODULE_AUTHOR ("Hans-Christian Egtvedt <[email protected]>" );MODULE_DESCRIPTION ("Atmel AVR32 PSIF PS/2 driver" );MODULE_LICENSE ("GPL" );
Signature · 1 line
1.5.4.3
Re: [PATCH 22/37] Input: add PS/2 serio driver for AVR32 devices
Quoted 18 lines · Hans-Christian Egtvedt
Quoted 8 lines · Hans-Christian Egtvedt
Add support for the PSIF peripheral on AVR32 AP7 devices. It is implemented as a serio driver and will behave like a serio 8042 device.
The driver has been tested with a Dell keyboard capable of running on 3.3 volts and a Logitech mouse on the STK1000 + STK1002 starter kit. The Logitech mouse was hacked by cutting the cord and using a bi-directional voltage converter to get the required 5 volt I/O level.
Quoted 6 lines
For more information about the PSIF module, see the datasheet for AT32AP700X at
http://www.atmel.com/dyn/products/datasheets.asp?family_id=682Signed-off-by Hans-Christian Egtvedt <[email protected]>Signed-off-by Dmitry Torokhov <[email protected]>---
<snipp serio driver for AVR32>
Quoted 9 lines
Quoted 1 line
+MODULE_AUTHOR("Hans-Christian Egtvedt <[email protected]>");
This address has been changed, please apply the attached patch.
Review
Quoted 2 lines
(quoted diff) +2
-0+MODULE_DESCRIPTION("Atmel AVR32 PSIF PS/2 driver"); +MODULE_LICENSE("GPL");PS! I think my old address even bounces a message, sorry about that :(
Applied, thanks.
Signature · 1 line
Dmitry
David Brownell
maintainerPATCH 23/37 Input: gpio_keys - irq handling cleanup
In reply to Dmitry TorokhovCleanup IRQ handling in gpio_keys: bail after handling the IRQ, and report IRQ_NONE if we never handle it.
--- drivers/input/keyboard/gpio_keys.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/input/keyboard/gpio_keys.c +2 -1
@@ -43,10 +43,11 @@ static irqreturn_t gpio_keys_isr(int irq, void *dev_id)input_event (input, type, button->code, !!state);input_sync (input); +return IRQ_HANDLED ; } } -return IRQ_HANDLED ; +return IRQ_NONE ; }static int __devinit gpio_keys_probe (struct platform_device *pdev)
Signature · 1 line
1.5.5.rc2.6.gf58d
David Brownell
maintainerPATCH 24/37 Input: omap-keypad - fix build warning
In reply to Dmitry TorokhovFix the following build warning:
drivers/input/keyboard/omap-keypad.c: In function 'omap_kp_probe':drivers/input/keyboard/omap-keypad.c:418: warning: 'row_idx' is used uninitialized in this function drivers/input/keyboard/omap-keypad.c:421: warning: 'col_idx' is used uninitialized in this function
These variables are useful when cpu_is_omap24xx(), and otherwise just for useless cleanup.
--- drivers/input/keyboard/omap-keypad.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
drivers/input/keyboard/omap-keypad.c +5 -2
@@ -352,6 +352,9 @@ static int __init omap_kp_probe(struct platform_device *pdev) }omap_set_gpio_direction (row_gpios[row_idx],1 ); } + }else { + col_idx =0 ; + row_idx =0 ; }setup_timer (&omap_kp->timer, omap_kp_timer, (unsigned long )omap_kp);
@@ -415,10 +418,10 @@ err4: err3:device_remove_file (&pdev->dev, &dev_attr_enable); err2: -for (i = row_idx-1 ; i >=0 ; i--) +for (i = row_idx -1 ; i >=0 ; i--)omap_free_gpio (row_gpios[i]); err1: -for (i = col_idx-1 ; i >=0 ; i--) +for (i = col_idx -1 ; i >=0 ; i--)omap_free_gpio (col_gpios[i]);kfree (omap_kp);
Signature · 1 line
1.5.5.rc2.6.gf58d
Michael Gruber
maintainerPATCH 25/37 Input: xpad - set proper buffer length for outgoing requests
In reply to Dmitry TorokhovThe messages for led/rumble are exactly 3 and 8 bytes respectively. Hence set up the transfer_buffer_length accordingly.
--- drivers/input/joystick/xpad.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/input/joystick/xpad.c +2 -0
@@ -558,6 +558,7 @@ static int xpad_play_effect(struct input_dev *dev, void *data, xpad->odata[5 ] =0x00 ; xpad->odata[6 ] =0x00 ; xpad->odata[7 ] =0x00 ; + xpad->irq_out->transfer_buffer_length =8 ;usb_submit_urb (xpad->irq_out,GFP_KERNEL ); }
@@ -594,6 +595,7 @@ static void xpad_send_led_command(struct usb_xpad *xpad, int command) xpad->odata[0 ] =0x01 ; xpad->odata[1 ] =0x03 ; xpad->odata[2 ] = command; + xpad->irq_out->transfer_buffer_length =3 ;usb_submit_urb (xpad->irq_out,GFP_KERNEL );mutex_unlock (&xpad->odata_mutex); }
Signature · 1 line
1.5.5.rc2.6.gf58d
Oliver Neukum
maintainerPATCH 26/37 Input: wacom - implement suspend and autosuspend
In reply to Dmitry TorokhovThis implements suspend and autosuspend support for wacom devices. It works by using the usb last busy functionality triggered in the completion callback.
--- drivers/input/tablet/wacom.h | 3 + drivers/input/tablet/wacom_sys.c | 76 +++++++++++++++++++++++++++++++++----- 2 files changed, 69 insertions(+), 10 deletions(-)
drivers/input/tablet/wacom.h +3 -0
@@ -101,8 +101,11 @@ struct wacom {dma_addr_t data_dma;struct input_dev *dev;struct usb_device *usbdev; +struct usb_interface *intf;struct urb *irq;struct wacom_wac * wacom_wac; +struct mutex lock; + int open:1;char phys[32 ]; };
drivers/input/tablet/wacom_sys.c +66 -10
118 lines not on this page · raw message
Signature · 1 line
1.5.5.rc2.6.gf58d
Guryanov Dmitry
maintainerPATCH 27/37 Input: aiptek - add support for Genius G-PEN 560 tablet
In reply to Dmitry TorokhovUSBHID driver only supports relative mode with this tablet so let aiptek module handle it.
--- drivers/hid/usbhid/hid-quirks.c | 4 ++++ drivers/input/tablet/Kconfig | 10 +++++----- drivers/input/tablet/aiptek.c | 2 ++ 3 files changed, 11 insertions(+), 5 deletions(-)
drivers/hid/usbhid/hid-quirks.c +4 -0
@@ -405,6 +405,9 @@#define USB_VENDOR_ID_YEALINK 0x6993#define USB_DEVICE_ID_YEALINK_P1K_P4K_B2K 0xb001 +#define USB_VENDOR_ID_KYE 0x0458 +#define USB_DEVICE_ID_KYE_GPEN_560 0x5003 +/* * Alphabetically sorted blacklist by quirk type. */
@@ -703,6 +706,7 @@ static const struct hid_blacklist { { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_63, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_64, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_NATIONAL_SEMICONDUCTOR, USB_DEVICE_ID_N_S_HARMONY, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_GPEN_560, HID_QUIRK_IGNORE }, { 0, 0 } };
drivers/input/tablet/Kconfig +5 -5
@@ -25,14 +25,14 @@ config TABLET_USB_ACECAD module will be called acecad. config TABLET_USB_AIPTEK - tristate "Aiptek 6000U/8000U tablet support (USB)" + tristate "Aiptek 6000U/8000U and Genius G_PEN tablet support (USB)" depends on USB_ARCH_HAS_HCD select USB help - Say Y here if you want to use the USB version of the Aiptek 6000U - or Aiptek 8000U tablet. Make sure to say Y to "Mouse support" - (CONFIG_INPUT_MOUSEDEV) and/or "Event interface support" - (CONFIG_INPUT_EVDEV) as well. + Say Y here if you want to use the USB version of the Aiptek 6000U, + Aiptek 8000U or Genius G-PEN 560 tablet. Make sure to say Y to + "Mouse support" (CONFIG_INPUT_MOUSEDEV) and/or "Event interface + support" (CONFIG_INPUT_EVDEV) as well. To compile this driver as a module, choose M here: the module will be called aiptek.
drivers/input/tablet/aiptek.c +2 -0
@@ -184,6 +184,7 @@*/ #define USB_VENDOR_ID_AIPTEK 0x08ca +#define USB_VENDOR_ID_KYE 0x0458#define USB_REQ_GET_REPORT 0x01#define USB_REQ_SET_REPORT 0x09
@@ -832,6 +833,7 @@ static const struct usb_device_id aiptek_ids[] = { {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x22)}, {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x23)}, {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x24)}, + {USB_DEVICE(USB_VENDOR_ID_KYE, 0x5003)}, {} };
Signature · 1 line
1.5.5.rc2.6.gf58d
Martin Kebert
maintainerPATCH 28/37 Input: add Zhen Hua driver
In reply to Dmitry TorokhovThis is a driver for Zhen Hua PPM-4CH RC transmitter (commonly used in cheap Ready To Fly RC helicopters by Walkera) which using "Zhen Hua 5-byte protocol" for using them as a four axis joystick via serial port. Transmitter connected to serial port (19200 8N1) sending periodically 5 bytes where first byte is for synchronization and next four bytes are values of axis.
--- drivers/input/joystick/Kconfig | 12 ++ drivers/input/joystick/Makefile | 1 + drivers/input/joystick/zhenhua.c | 243 ++++++++++++++++++++++++++++++++++++++ include/linux/serio.h | 1 + 4 files changed, 257 insertions(+), 0 deletions(-) create mode 100644 drivers/input/joystick/zhenhua.c
drivers/input/joystick/Kconfig +12 -0
@@ -193,6 +193,18 @@ config JOYSTICK_TWIDJOY To compile this driver as a module, choose M here: the module will be called twidjoy. +config JOYSTICK_ZHENHUA + tristate "5-byte Zhenhua RC transmitter" + select SERIO + help + Say Y here if you have a Zhen Hua PPM-4CH transmitter which is + supplied with a ready to fly micro electric indoor helicopters + such as EasyCopter, Lama, MiniCopter, DragonFly or Jabo and want + to use it via serial cable as a joystick. + + To compile this driver as a module, choose M here: the + module will be called zhenhua. + config JOYSTICK_DB9 tristate "Multisystem, Sega Genesis, Saturn joysticks and gamepads" depends on PARPORT
drivers/input/joystick/Makefile +1 -0
@@ -27,5 +27,6 @@ obj-$(CONFIG_JOYSTICK_TURBOGRAFX) += turbografx.o obj-$(CONFIG_JOYSTICK_TWIDJOY) += twidjoy.o obj-$(CONFIG_JOYSTICK_WARRIOR) += warrior.o obj-$(CONFIG_JOYSTICK_XPAD) += xpad.o +obj-$(CONFIG_JOYSTICK_ZHENHUA) += zhenhua.o obj-$(CONFIG_JOYSTICK_IFORCE) += iforce/
drivers/input/joystick/zhenhua.c new file +243 -0
243 lines not on this page · raw message
include/linux/serio.h +1 -0
@@ -211,5 +211,6 @@ static inline void serio_unpin_driver(struct serio *serio)#define SERIO_TOUCHWIN 0x33#define SERIO_TAOSEVM 0x34#define SERIO_FUJITSU 0x35 +#define SERIO_ZHENHUA 0x36#endif
Signature · 1 line
1.5.5.rc2.6.gf58d
Jiri Kosina
maintainerPATCH 29/37 Input: fix ordering in joystick Makefile
In reply to Dmitry TorokhovMake entries in drivers/input/joystick/Makefile properly alphabetically ordered.
--- drivers/input/joystick/Makefile | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/input/joystick/Makefile +2 -1
@@ -15,9 +15,11 @@ obj-$(CONFIG_JOYSTICK_GF2K) += gf2k.o obj-$(CONFIG_JOYSTICK_GRIP) += grip.o obj-$(CONFIG_JOYSTICK_GRIP_MP) += grip_mp.o obj-$(CONFIG_JOYSTICK_GUILLEMOT) += guillemot.o +obj-$(CONFIG_JOYSTICK_IFORCE) += iforce/ obj-$(CONFIG_JOYSTICK_INTERACT) += interact.o obj-$(CONFIG_JOYSTICK_JOYDUMP) += joydump.o obj-$(CONFIG_JOYSTICK_MAGELLAN) += magellan.o +obj-$(CONFIG_JOYSTICK_MAPLE) += maplecontrol.o obj-$(CONFIG_JOYSTICK_SIDEWINDER) += sidewinder.o obj-$(CONFIG_JOYSTICK_SPACEBALL) += spaceball.o obj-$(CONFIG_JOYSTICK_SPACEORB) += spaceorb.o
@@ -29,4 +31,3 @@ obj-$(CONFIG_JOYSTICK_WARRIOR) += warrior.o obj-$(CONFIG_JOYSTICK_XPAD) += xpad.o obj-$(CONFIG_JOYSTICK_ZHENHUA) += zhenhua.o -obj-$(CONFIG_JOYSTICK_IFORCE) += iforce/
Signature · 1 line
1.5.5.rc2.6.gf58d
Re: [PATCH 29/37] Input: fix ordering in joystick Makefile
Quoted 4 lines · Jiri Kosina
Make entries in
drivers/input/joystick/Makefileproperly alphabetically ordered.Signed-off-by Jiri Kosina <[email protected]>Signed-off-by Dmitry Torokhov <[email protected]>
Hi Dmitry,
this patch of mine assumed that the driver for SEGA Dreamcast controller
[1] is merged, but it doesn't seem to be present in the lineup you have sent ... ?
Thanks,
[1] ftp://ftp.kernel.org/pub/linux/kernel/people/jikos/temporary-input-queue/upstream/0013-Input-maple-add-driver-for-Sega-Dreamcast-controll.patch
Signature · 2 lines
Jiri Kosina SUSE Labs
Dmitry Torokhov
maintainerRe: [PATCH 29/37] Input: fix ordering in joystick Makefile
Hi Jiri,
Quoted 7 lines · Jiri Kosina
Quoted 4 lines · Jiri Kosina
Make entries in
drivers/input/joystick/Makefileproperly alphabetically ordered.Signed-off-by Jiri Kosina <[email protected]>Signed-off-by Dmitry Torokhov <[email protected]>
Quoted 6 lines
Hi Dmitry,
this patch of mine assumed that the driver for SEGA Dreamcast controller
[1] is merged, but it doesn't seem to be present in the lineup you have sent ... ?
The maple driver is not quite ready yet, I sent my comments to Adrian and he is going to send me a new patch soon. Unfortunately I screwed up the merge process trying to carve it out of the patch stream. I will fix it before sending request to Linus.
Signature · 1 line
Dmitry
Re: [PATCH 29/37] Input: fix ordering in joystick Makefile
In reply to Jiri KosinaQuoted 2 lines · Jiri Kosina
Make entries in
drivers/input/joystick/Makefileproperly alphabetically ordered.
It also adds an entry for CONFIG_JOYSTICK_MAPLE?
BTW: The From: and To: headers in your emails were not correct.
Quoted 30 lines
Signed-off-by Jiri Kosina <[email protected]>Signed-off-by Dmitry Torokhov <[email protected]>--- drivers/input/joystick/Makefile | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)drivers/input/joystick/Makefile +2
-1@@ -15,9 +15,11 @@ obj-$(CONFIG_JOYSTICK_GF2K) += gf2k.o obj-$(CONFIG_JOYSTICK_GRIP) += grip.o obj-$(CONFIG_JOYSTICK_GRIP_MP) += grip_mp.o obj-$(CONFIG_JOYSTICK_GUILLEMOT) += guillemot.o +obj-$(CONFIG_JOYSTICK_IFORCE) += iforce/ obj-$(CONFIG_JOYSTICK_INTERACT) += interact.o obj-$(CONFIG_JOYSTICK_JOYDUMP) += joydump.o obj-$(CONFIG_JOYSTICK_MAGELLAN) += magellan.o +obj-$(CONFIG_JOYSTICK_MAPLE) += maplecontrol.o obj-$(CONFIG_JOYSTICK_SIDEWINDER) += sidewinder.o obj-$(CONFIG_JOYSTICK_SPACEBALL) += spaceball.o obj-$(CONFIG_JOYSTICK_SPACEORB) += spaceorb.o@@ -29,4 +31,3 @@ obj-$(CONFIG_JOYSTICK_WARRIOR) += warrior.o obj-$(CONFIG_JOYSTICK_XPAD) += xpad.o obj-$(CONFIG_JOYSTICK_ZHENHUA) += zhenhua.o -obj-$(CONFIG_JOYSTICK_IFORCE) += iforce/Signature · 1 line
1.5.5.rc2.6.gf58d
Dmitry Torokhov
maintainerRe: [PATCH 29/37] Input: fix ordering in joystick Makefile
Quoted 5 lines · Adrian Bunk
Quoted 2 lines · Jiri Kosina
Make entries in
drivers/input/joystick/Makefileproperly alphabetically ordered.It also adds an entry for
CONFIG_JOYSTICK_MAPLE?
Doh! Thank you for noticing, I will adjust it, maple is not quite there yet.
Quoted 3 lines
BTW: The From: and To: headers in your emails were not correct.
My fault. I was trying to use git-format-patch and formail and screwed up. Why doesn't git-format-patch allow specify To: but only Cc:?
Signature · 1 line
Dmitry
Re: [PATCH 29/37] Input: fix ordering in joystick Makefile
Quoted 6 lines · Dmitry Torokhov
On Mon, Apr 21, 2008 at 05:22:45PM +0300, Adrian Bunk wrote:
...Quoted 1 line
BTW: The From: and To: headers in your emails were not correct.
My fault. I was trying to use git-format-patch and formail and screwed up. Why doesn't git-format-patch allow specify To: but only Cc:?
Note that the From: headers had a different problem:
From: Jiri Kosina <[email protected]>
^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^
Quoted 1 line
Dmitry
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedMark Brown
maintainerPATCH 30/37 Input: wm97xx-core - only schedule interrupt handler if not already scheduled
In reply to Dmitry TorokhovAs well as clarifying the fact that the driver can cope if a second interrupt occurs before the IRQ work is scheduled this also ensures that calls to the machine irq_enable() are balanced, making that easier to implement. Normally this is redundant due to the interrupt disabling but some unusal board configurations can trigger it.
--- drivers/input/touchscreen/wm97xx-core.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-)
drivers/input/touchscreen/wm97xx-core.c +7 -7
@@ -328,18 +328,18 @@ static void wm97xx_pen_irq_worker(struct work_struct *work)* * We have to disable the codec interrupt in the handler because it * can take upto 1ms to clear the interrupt source. We schedule a task -* in a work queue to do the actual interaction with the chip (it -* doesn't matter if we end up reenqueing it before it is executed -* since we don't touch the chip until it has run). The interrupt is -* then enabled again in the slow handler when the source has been -* cleared. +* in a work queue to do the actual interaction with the chip. The +* interrupt is then enabled again in the slow handler when the source +* has been cleared. */ static irqreturn_t wm97xx_pen_interrupt (int irq,void *dev_id) {struct wm97xx *wm = dev_id; - wm->mach_ops->irq_enable (wm,0 ); -queue_work (wm->ts_workq, &wm->pen_event_work); +if (!work_pending (&wm->pen_event_work)) { + wm->mach_ops->irq_enable (wm,0 ); +queue_work (wm->ts_workq, &wm->pen_event_work); + }return IRQ_HANDLED ; }
Signature · 1 line
1.5.5.rc2.6.gf58d
Mark Brown
maintainerPATCH 31/37 Input: wm97xx-core - use IRQF_SAMPLE_RANDOM
In reply to Dmitry TorokhovThe touchscreen interrupt is driven by human input which can reasonably be used to provide entropy.
--- drivers/input/touchscreen/wm97xx-core.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/input/touchscreen/wm97xx-core.c +2 -1
@@ -355,7 +355,8 @@ static int wm97xx_init_pen_irq(struct wm97xx *wm)* provided. */ BUG_ON (!wm->mach_ops->irq_enable); -if (request_irq (wm->pen_irq, wm97xx_pen_interrupt,IRQF_SHARED , +if (request_irq (wm->pen_irq, wm97xx_pen_interrupt, +IRQF_SHARED |IRQF_SAMPLE_RANDOM ,"wm97xx-pen" , wm)) {dev_err (wm->dev,"Failed to register pen down interrupt, polling" );
Signature · 1 line
1.5.5.rc2.6.gf58d
Mark Brown
maintainerPATCH 32/37 Input: wm97xx-core - support use as a wakeup source
In reply to Dmitry TorokhovThe WM97xx touch screen controllers can be used to generate a wakeup event when the system is suspended. Provide a new core API call wm97xx_set_suspend_mode() allowing machine drivers to enable this. If no suspend_mode is provided then the touch panel will be powered down when the system is suspended.
--- drivers/input/touchscreen/wm97xx-core.c | 39 +++++++++++++++++++++++++++++++ include/linux/wm97xx.h | 3 ++ 2 files changed, 42 insertions(+), 0 deletions(-)
drivers/input/touchscreen/wm97xx-core.c +39 -0
@@ -262,6 +262,23 @@ void wm97xx_config_gpio(struct wm97xx *wm, u32 gpio, enum wm97xx_gpio_dir dir,EXPORT_SYMBOL_GPL (wm97xx_config_gpio);/* +* Configure the WM97XX_PRP value to use while system is suspended. +* If a value other than 0 is set then WM97xx pen detection will be +* left enabled in the configured mode while the system is in suspend, +* the device has users and suspend has not been disabled via the +* wakeup sysfs entries. +* +* @wm: WM97xx device to configure +* @mode: WM97XX_PRP value to configure while suspended +*/ +void wm97xx_set_suspend_mode (struct wm97xx *wm,u16 mode) +{ + wm->suspend_mode = mode; +device_init_wakeup (&wm->input_dev->dev, mode !=0 ); +} +EXPORT_SYMBOL_GPL (wm97xx_set_suspend_mode); + +/* * Handle a pen down interrupt. */ static void wm97xx_pen_irq_worker (struct work_struct *work)
@@ -689,10 +706,32 @@ static int wm97xx_remove(struct device *dev)static int wm97xx_suspend (struct device *dev,pm_message_t state) {struct wm97xx *wm =dev_get_drvdata (dev); +u16 reg; +int suspend_mode; + +if (device_may_wakeup (&wm->input_dev->dev)) + suspend_mode = wm->suspend_mode; +else + suspend_mode =0 ;if (wm->input_dev->users)cancel_delayed_work_sync (&wm->ts_reader); +/* Power down the digitiser (bypassing the cache for resume) */ + reg =wm97xx_reg_read (wm,AC97_WM97XX_DIGITISER2 ); + reg &= ~WM97XX_PRP_DET_DIG ; +if (wm->input_dev->users) + reg |= suspend_mode; + wm->ac97->bus->ops->write (wm->ac97,AC97_WM97XX_DIGITISER2 , reg); + +/* WM9713 has an additional power bit - turn it off if there +* are no users or if suspend mode is zero. */ +if (wm->id ==WM9713_ID2 && + (!wm->input_dev->users || !suspend_mode)) { + reg =wm97xx_reg_read (wm,AC97_EXTENDED_MID ) |0x8000 ; +wm97xx_reg_write (wm,AC97_EXTENDED_MID , reg); + } +return 0 ; }
include/linux/wm97xx.h +3 -0
@@ -282,6 +282,7 @@ struct wm97xx { unsigned pen_is_down:1; /* Pen is down */ unsigned aux_waiting:1; /* aux measurement waiting */ unsigned pen_probably_down:1; /* used in polling mode */ +u16 suspend_mode;/* PRP in suspend mode */ };/*
@@ -297,6 +298,8 @@ void wm97xx_config_gpio(struct wm97xx *wm, u32 gpio,enum wm97xx_gpio_sticky sticky, enum wm97xx_gpio_wake wake); +void wm97xx_set_suspend_mode (struct wm97xx *wm,u16 mode); +/* codec AC97 IO access */ int wm97xx_reg_read (struct wm97xx *wm,u16 reg);void wm97xx_reg_write (struct wm97xx *wm,u16 reg,u16 val);
Signature · 1 line
1.5.5.rc2.6.gf58d
Julia Lawall
maintainerPATCH 33/37 Input: drivers/char/keyboard.c - use time_after
In reply to Dmitry TorokhovThe functions time_before, time_before_eq, time_after, and time_after_eq are more robust for comparing jiffies against other values.
--- drivers/char/keyboard.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/char/keyboard.c +3 -1
@@ -42,6 +42,7 @@#include <linux/input.h> #include <linux/reboot.h> #include <linux/notifier.h> +#include <linux/jiffies.h> extern void ctrl_alt_del (void );
@@ -928,7 +929,8 @@ static void k_brl(struct vc_data *vc, unsigned char value, char up_flag)if (up_flag) {if (brl_timeout) {if (!committing || - jiffies - releasestart > (brl_timeout *HZ ) /1000 ) { +time_after (jiffies, + releasestart +msecs_to_jiffies (brl_timeout))) { committing = pressed; releasestart = jiffies; }
Signature · 1 line
1.5.5.rc2.6.gf58d
Kay Sievers
maintainerPATCH 34/37 Input: add MODULE_ALIAS() to hotpluggable platform modules
In reply to Dmitry TorokhovSince 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable "input" platform drivers, to re-enable auto loading.
--- drivers/input/keyboard/aaed2000_kbd.c | 4 ++++ drivers/input/keyboard/bf54x-keys.c | 2 ++ drivers/input/keyboard/corgikbd.c | 2 ++ drivers/input/keyboard/gpio_keys.c | 2 ++ drivers/input/keyboard/jornada680_kbd.c | 2 ++ drivers/input/keyboard/jornada720_kbd.c | 4 ++++ drivers/input/keyboard/omap-keypad.c | 2 ++ drivers/input/keyboard/pxa27x_keypad.c | 4 ++++ drivers/input/keyboard/spitzkbd.c | 1 + drivers/input/keyboard/tosakbd.c | 2 ++ drivers/input/misc/cobalt_btns.c | 3 +++ drivers/input/mouse/gpio_mouse.c | 4 ++++ drivers/input/serio/rpckbd.c | 2 ++ drivers/input/touchscreen/corgi_ts.c | 2 ++ drivers/input/touchscreen/jornada720_ts.c | 4 ++++ 15 files changed, 40 insertions(+), 0 deletions(-)
drivers/input/keyboard/aaed2000_kbd.c +4 -0
@@ -156,11 +156,15 @@ static int __devexit aaedkbd_remove(struct platform_device *pdev)return 0 ; } +/* work with hotplug and coldplug */ +MODULE_ALIAS ("platform:aaed2000-keyboard" ); +static struct platform_driver aaedkbd_driver = { .probe = aaedkbd_probe, .remove =__devexit_p (aaedkbd_remove), .driver = { .name ="aaed2000-keyboard" , + .owner =THIS_MODULE , }, };
drivers/input/keyboard/bf54x-keys.c +2 -0
@@ -359,6 +359,7 @@ struct platform_driver bfin_kpad_device_driver = { .remove = __devexit_p(bfin_kpad_remove), .driver = { .name = DRV_NAME, + .owner = THIS_MODULE, } };
@@ -378,3 +379,4 @@ module_exit(bfin_kpad_exit);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Michael Hennerich <[email protected]>" );MODULE_DESCRIPTION ("Keypad driver for BF54x Processors" ); +MODULE_ALIAS ("platform:bf54x-keys" );
drivers/input/keyboard/corgikbd.c +2 -0
@@ -392,6 +392,7 @@ static struct platform_driver corgikbd_driver = { .resume = corgikbd_resume, .driver = { .name = "corgi-keyboard", + .owner = THIS_MODULE, }, };
@@ -411,3 +412,4 @@ module_exit(corgikbd_exit);MODULE_AUTHOR ("Richard Purdie <[email protected]>" );MODULE_DESCRIPTION ("Corgi Keyboard Driver" );MODULE_LICENSE ("GPLv2" ); +MODULE_ALIAS ("platform:corgi-keyboard" );
drivers/input/keyboard/gpio_keys.c +2 -0
@@ -214,6 +214,7 @@ struct platform_driver gpio_keys_device_driver = { .resume = gpio_keys_resume, .driver = { .name = "gpio-keys", + .owner = THIS_MODULE, } };
@@ -233,3 +234,4 @@ module_exit(gpio_keys_exit);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Phil Blundell <[email protected]>" );MODULE_DESCRIPTION ("Keyboard driver for CPU GPIOs" ); +MODULE_ALIAS ("platform:gpio-keys" );
drivers/input/keyboard/jornada680_kbd.c +2 -0
@@ -254,6 +254,7 @@ static int __devexit jornada680kbd_remove(struct platform_device *pdev)static struct platform_driver jornada680kbd_driver = { .driver = { .name ="jornada680_kbd" , + .owner =THIS_MODULE , }, .probe = jornada680kbd_probe, .remove =__devexit_p (jornada680kbd_remove),
@@ -275,3 +276,4 @@ module_exit(jornada680kbd_exit);MODULE_AUTHOR ("Kristoffer Ericson <[email protected]>" );MODULE_DESCRIPTION ("HP Jornada 620/660/680/690 Keyboard Driver" );MODULE_LICENSE ("GPLv2" ); +MODULE_ALIAS ("platform:jornada680_kbd" );
drivers/input/keyboard/jornada720_kbd.c +4 -0
@@ -162,9 +162,13 @@ static int __devexit jornada720_kbd_remove(struct platform_device *pdev)return 0 ; } +/* work with hotplug and coldplug */ +MODULE_ALIAS ("platform:jornada720_kbd" ); +static struct platform_driver jornada720_kbd_driver = { .driver = { .name ="jornada720_kbd" , + .owner =THIS_MODULE , }, .probe = jornada720_kbd_probe, .remove =__devexit_p (jornada720_kbd_remove),
drivers/input/keyboard/omap-keypad.c +2 -0
@@ -467,6 +467,7 @@ static struct platform_driver omap_kp_driver = { .resume = omap_kp_resume, .driver = { .name = "omap-keypad", + .owner = THIS_MODULE, }, };
@@ -487,3 +488,4 @@ module_exit(omap_kp_exit);MODULE_AUTHOR ("Timo Teräs" );MODULE_DESCRIPTION ("OMAP Keypad Driver" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS ("platform:omap-keypad" );
drivers/input/keyboard/pxa27x_keypad.c +4 -0
@@ -545,6 +545,9 @@ static int __devexit pxa27x_keypad_remove(struct platform_device *pdev)return 0 ; } +/* work with hotplug and coldplug */ +MODULE_ALIAS ("platform:pxa27x-keypad" ); +static struct platform_driver pxa27x_keypad_driver = { .probe = pxa27x_keypad_probe, .remove =__devexit_p (pxa27x_keypad_remove),
@@ -552,6 +555,7 @@ static struct platform_driver pxa27x_keypad_driver = { .resume = pxa27x_keypad_resume, .driver = { .name = "pxa27x-keypad", + .owner = THIS_MODULE, }, };
drivers/input/keyboard/spitzkbd.c +1 -0
@@ -494,3 +494,4 @@ module_exit(spitzkbd_exit);MODULE_AUTHOR ("Richard Purdie <[email protected]>" );MODULE_DESCRIPTION ("Spitz Keyboard Driver" );MODULE_LICENSE ("GPLv2" ); +MODULE_ALIAS ("platform:spitz-keyboard" );
drivers/input/keyboard/tosakbd.c +2 -0
@@ -409,6 +409,7 @@ static struct platform_driver tosakbd_driver = { .resume = tosakbd_resume, .driver = { .name = "tosa-keyboard", + .owner = THIS_MODULE, }, };
@@ -428,3 +429,4 @@ module_exit(tosakbd_exit);MODULE_AUTHOR ("Dirk Opfer <[email protected]>" );MODULE_DESCRIPTION ("Tosa Keyboard Driver" );MODULE_LICENSE ("GPL v2" ); +MODULE_ALIAS ("platform:tosa-keyboard" );
drivers/input/misc/cobalt_btns.c +3 -0
@@ -148,6 +148,9 @@ static int __devexit cobalt_buttons_remove(struct platform_device *pdev)return 0 ; } +/* work with hotplug and coldplug */ +MODULE_ALIAS ("platform:Cobalt buttons" ); +static struct platform_driver cobalt_buttons_driver = { .probe = cobalt_buttons_probe, .remove =__devexit_p (cobalt_buttons_remove),
drivers/input/mouse/gpio_mouse.c +4 -0
@@ -171,10 +171,14 @@ static int __devexit gpio_mouse_remove(struct platform_device *pdev)return 0 ; } +/* work with hotplug and coldplug */ +MODULE_ALIAS ("platform:gpio_mouse" ); +struct platform_driver gpio_mouse_device_driver = { .remove =__devexit_p (gpio_mouse_remove), .driver = { .name ="gpio_mouse" , + .owner =THIS_MODULE , } };
drivers/input/serio/rpckbd.c +2 -0
@@ -45,6 +45,7 @@MODULE_AUTHOR ("Vojtech Pavlik, Russell King" );MODULE_DESCRIPTION ("Acorn RiscPC PS/2 keyboard controller driver" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS ("platform:kart" );static int rpckbd_write (struct serio *port,unsigned char val) {
@@ -140,6 +141,7 @@ static struct platform_driver rpckbd_driver = { .remove = __devexit_p(rpckbd_remove), .driver = { .name = "kart", + .owner = THIS_MODULE, }, };
drivers/input/touchscreen/corgi_ts.c +2 -0
@@ -361,6 +361,7 @@ static struct platform_driver corgits_driver = { .resume = corgits_resume, .driver = { .name = "corgi-ts", + .owner = THIS_MODULE, }, };
@@ -380,3 +381,4 @@ module_exit(corgits_exit);MODULE_AUTHOR ("Richard Purdie <[email protected]>" );MODULE_DESCRIPTION ("Corgi TouchScreen Driver" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS ("platform:corgi-ts" );
drivers/input/touchscreen/jornada720_ts.c +4 -0
@@ -160,11 +160,15 @@ static int __devexit jornada720_ts_remove(struct platform_device *pdev)return 0 ; } +/* work with hotplug and coldplug */ +MODULE_ALIAS ("platform:jornada_ts" ); +static struct platform_driver jornada720_ts_driver = { .probe = jornada720_ts_probe, .remove =__devexit_p (jornada720_ts_remove), .driver = { .name ="jornada_ts" , + .owner =THIS_MODULE , }, };
Signature · 7 lines
1.5.5.rc2.6.gf58d -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Michael Hennerich
maintainerPATCH 35/37 Input: bf54x-keys - add infrastructure for keypad wakeups
In reply to Dmitry Torokhov--- drivers/input/keyboard/bf54x-keys.c | 35 ++++++++++++++++++++++++++++++++--- 1 files changed, 32 insertions(+), 3 deletions(-)
drivers/input/keyboard/bf54x-keys.c +32 -3
@@ -312,6 +312,8 @@ static int __devinit bfin_kpad_probe(struct platform_device *pdev)bfin_write_KPAD_CTL (bfin_read_KPAD_CTL () |KPAD_EN ); +device_init_wakeup (&pdev->dev,1 ); + printk(KERN_ERR DRV_NAME ": Blackfin BF54x Keypad registered IRQ %d\n", bf54x_kpad->irq);
@@ -354,13 +356,40 @@ static int __devexit bfin_kpad_remove(struct platform_device *pdev)return 0 ; } +#ifdef CONFIG_PM +static int bfin_kpad_suspend (struct platform_device *pdev,pm_message_t state) +{ +struct bf54x_kpad *bf54x_kpad =platform_get_drvdata (pdev); + +if (device_may_wakeup (&pdev->dev)) +enable_irq_wake (bf54x_kpad->irq); + +return 0 ; +} + +static int bfin_kpad_resume (struct platform_device *pdev) +{ +struct bf54x_kpad *bf54x_kpad =platform_get_drvdata (pdev); + +if (device_may_wakeup (&pdev->dev)) +disable_irq_wake (bf54x_kpad->irq); + +return 0 ; +} +#else +# define bfin_kpad_suspend NULL +# define bfin_kpad_resume NULL +#endif +struct platform_driver bfin_kpad_device_driver = { - .probe = bfin_kpad_probe, - .remove =__devexit_p (bfin_kpad_remove), .driver = { .name =DRV_NAME , .owner =THIS_MODULE , - } + }, + .probe = bfin_kpad_probe, + .remove =__devexit_p (bfin_kpad_remove), + .suspend = bfin_kpad_suspend, + .resume = bfin_kpad_resume, };static int __init bfin_kpad_init (void )
Signature · 1 line
1.5.5.rc2.6.gf58d
Roel Kluin
maintainerPATCH 36/37 Input: i8042 - fix incorrect usage of strncpy and strncat
In reply to Dmitry TorokhovFix incorrect length argument for strncpy and strncat by replacing them with strlcpy and strlcat
--- drivers/input/serio/i8042-x86ia64io.h | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
drivers/input/serio/i8042-x86ia64io.h +6 -6
@@ -370,10 +370,10 @@ static int i8042_pnp_kbd_probe(struct pnp_dev *dev, const struct pnp_device_id *if (pnp_irq_valid (dev,0 )) i8042_pnp_kbd_irq =pnp_irq (dev,0 ); -strncpy (i8042_pnp_kbd_name, did->id,sizeof (i8042_pnp_kbd_name)); +strlcpy (i8042_pnp_kbd_name, did->id,sizeof (i8042_pnp_kbd_name));if (strlen (pnp_dev_name (dev))) { -strncat (i8042_pnp_kbd_name,":" ,sizeof (i8042_pnp_kbd_name)); -strncat (i8042_pnp_kbd_name,pnp_dev_name (dev),sizeof (i8042_pnp_kbd_name)); +strlcat (i8042_pnp_kbd_name,":" ,sizeof (i8042_pnp_kbd_name)); +strlcat (i8042_pnp_kbd_name,pnp_dev_name (dev),sizeof (i8042_pnp_kbd_name)); } i8042_pnp_kbd_devices++;
@@ -391,10 +391,10 @@ static int i8042_pnp_aux_probe(struct pnp_dev *dev, const struct pnp_device_id *if (pnp_irq_valid (dev,0 )) i8042_pnp_aux_irq =pnp_irq (dev,0 ); -strncpy (i8042_pnp_aux_name, did->id,sizeof (i8042_pnp_aux_name)); +strlcpy (i8042_pnp_aux_name, did->id,sizeof (i8042_pnp_aux_name));if (strlen (pnp_dev_name (dev))) { -strncat (i8042_pnp_aux_name,":" ,sizeof (i8042_pnp_aux_name)); -strncat (i8042_pnp_aux_name,pnp_dev_name (dev),sizeof (i8042_pnp_aux_name)); +strlcat (i8042_pnp_aux_name,":" ,sizeof (i8042_pnp_aux_name)); +strlcat (i8042_pnp_aux_name,pnp_dev_name (dev),sizeof (i8042_pnp_aux_name)); } i8042_pnp_aux_devices++;
Signature · 1 line
1.5.5.rc2.6.gf58d
Peter Zijlstra
maintainerPATCH 37/37 Input: mac_hid - add lockdep annotation to emumousebtn
In reply to Dmitry TorokhovThe mouse button emulation calls input device methods from an input device. This causes funny lock nesting which is harmless as each device has its own locks.
Give the nesting device its own lock classes so that lockdep will not consider them the same.
--- drivers/macintosh/mac_hid.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
drivers/macintosh/mac_hid.c +6 -0
@@ -103,6 +103,9 @@ int mac_hid_mouse_emulate_buttons(int caller, unsigned int keycode, int down)return 0 ; } +static struct lock_class_key emumousebtn_event_class; +static struct lock_class_key emumousebtn_mutex_class; +static int emumousebtn_input_register (void ) {int ret;
@@ -111,6 +114,9 @@ static int emumousebtn_input_register(void)if (!emumousebtn)return -ENOMEM ; +lockdep_set_class (emumousebtn->event_lock, &emumousebtn_event_class); +lockdep_set_class (emumousebtn->mutex, &emumousebtn_mutex_class); + emumousebtn->name ="Macintosh mouse button emulation" ; emumousebtn->id.bustype =BUS_ADB ; emumousebtn->id.vendor =0x0001 ;
Signature · 1 line
1.5.5.rc2.6.gf58d
Quoted 2 lines · Dmitry Torokhov
The following patches are what I would like to get in 2.6.26 in the next couple of days. Please shout if you see any problems.
Dmitry,
What about the second version of the SW_RADIO event rename patch (which keeps the old name like you asked)? You didn't either ACK or NACK that one...
Signature · 4 lines
"One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
Hi Henrique,
Quoted 10 lines · Henrique de Moraes Holschuh
Quoted 2 lines · Dmitry Torokhov
The following patches are what I would like to get in 2.6.26 in the next couple of days. Please shout if you see any problems.
Dmitry,
What about the second version of the
SW_RADIOevent rename patch (which keeps the old name like you asked)? You didn't either ACK or NACK that one...
Ah, sorry. I am not very fond of having multiple aliases, but if you think that the new name will help to avoid confusion in the future I am OK with it. You may add:
I expect it to go through rfkill/net tree with the rest of rfkill changes.
Signature · 1 line
Dmitry
Quoted 3 lines · Dmitry Torokhov
Ah, sorry. I am not very fond of having multiple aliases, but if you think that the new name will help to avoid confusion in the future I am OK with it. You may add:
It will really help avoid confusion, yes.
Quoted 1 line
Acked-by Dmitry Torokhov <[email protected]>
Thanks.
Quoted 2 lines
I expect it to go through rfkill/net tree with the rest of rfkill changes.
Noted.
Signature · 4 lines
"One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
Quoted 2 lines
Input: xpad - add support for wireless xbox360 controllers
via the commit above (99de0912) a build bug sneaked in:
drivers/input/joystick/xpad.c: In function 'xpad_probe':drivers/input/joystick/xpad.c:865: error: 'xpad_bulk_out' undeclared (first usein this function) drivers/input/joystick/xpad.c:865: error: (Each undeclared identifier is reported only once drivers/input/joystick/xpad.c:865: error: for each function it appears in.)
as found by randconfig testing:
http://redhat.com/~mingo/misc/config-Sat_Apr_26_13_24_31_CEST_2008.bad
Ingo
Dmitry Torokhov
maintainerHi Ingo,
Quoted 10 lines · Ingo Molnar
Quoted 2 lines
Input: xpad - add support for wireless xbox360 controllers
via the commit above (
99de0912) a build bug sneaked in:
drivers/input/joystick/xpad.c: In function 'xpad_probe':drivers/input/joystick/xpad.c:865: error: 'xpad_bulk_out' undeclared (first usein this function)drivers/input/joystick/xpad.c:865: error: (Each undeclared identifier is reported only oncedrivers/input/joystick/xpad.c:865: error: for each function it appears in.)
Oops, sorry about that. The patch below should fix this problem.
Signature · 66 lines
Dmitry Input: xpad - fix build failure If both CONFIG_JOYSTICK_XPAD_FF and CONFIG_JOYSTICK_XPAD_LEDS are unset xpad_bulk_out is not defined and build fails. Move it out of the #ifdef block so it is always defined. Reported-by: Ingo Molnar <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]> --- drivers/input/joystick/xpad.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) Index: work/drivers/input/joystick/xpad.c =================================================================== --- work.orig/drivers/input/joystick/xpad.c +++ work/drivers/input/joystick/xpad.c @@ -444,6 +444,23 @@ exit: __FUNCTION__, retval); } +static void xpad_bulk_out(struct urb *urb) +{ + switch (urb->status) { + case 0: + /* success */ + break; + case -ECONNRESET: + case -ENOENT: + case -ESHUTDOWN: + /* this urb is terminated, clean up */ + dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status); + break; + default: + dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status); + } +} + #if defined(CONFIG_JOYSTICK_XPAD_FF) || defined(CONFIG_JOYSTICK_XPAD_LEDS) static void xpad_irq_out(struct urb *urb) { @@ -475,23 +492,6 @@ exit: __FUNCTION__, retval); } -static void xpad_bulk_out(struct urb *urb) -{ - switch (urb->status) { - case 0: - /* success */ - break; - case -ECONNRESET: - case -ENOENT: - case -ESHUTDOWN: - /* this urb is terminated, clean up */ - dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status); - break; - default: - dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status); - } -} - static int xpad_init_output(struct usb_interface *intf, struct usb_xpad *xpad) { struct usb_endpoint_descriptor *ep_irq_out;