Commit graph

1010 commits

Author SHA1 Message Date
Ingo Molnar d02859ecb3 Merge commit 'v2.6.26-rc8' into x86/xen
Conflicts:

	arch/x86/xen/enlighten.c
	arch/x86/xen/mmu.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-06-25 12:16:51 +02:00
Arnd Bergmann 986f8b8ccf hp_sdc_rtc: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2008-06-20 14:05:57 -06:00
Jonathan Corbet 2edbf8537e Input: cdev lock_kernel() pushdown
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-06-20 14:05:47 -06:00
Linus Torvalds 952f4a0a9b Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: appletouch - implement reset-resume logic
  Input: i8042 - retry failed CTR writes when resuming
  Input: i8042 - add Fujitsu-Siemens Amilo Pro V2030 to nomux table
  Input: pcspkr - remove negative dependency on snd-pcsp

Manually fixed up trivial conflict in drivers/usb/core/quirks.c
2008-06-17 18:10:40 -07:00
Dmitry Torokhov 15439dd37f Merge branch 'for-linus' into next
Conflicts:

	drivers/input/mouse/appletouch.c
2008-06-17 12:02:44 -04:00
Oliver Neukum 90d95ef617 Input: appletouch - implement reset-resume logic
On some boxes the touchpad needs to be reinitialized after resume to make
it function again. This fixes bugzilla #10825.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-06-17 11:56:55 -04:00
Jiri Kosina 2f6a77d565 Input: i8042 - retry failed CTR writes when resuming
There are systems that fail in i8042_resume() with

	i8042: Can't write CTR to resume

as i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR) fails even though the
controller claimed itself to be ready before.

One retry after failing write fixes the problems on the failing systems.

Reported-by: Helmut Schaa <hschaa@novell.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-06-17 11:47:27 -04:00
Ingo Molnar 688d22e23a Merge branch 'linus' into x86/xen 2008-06-16 11:21:27 +02:00
Jiri Kosina efd5184646 Input: i8042 - add Fujitsu-Siemens Amilo Pro V2030 to nomux table
Fujitsu Siemens Amilo Pro V2030 needs nomux table entry, in addition to
already existing entry for V2010 model (note that Fujitsu-Siemens changed
the capitalization in the DMI data for product).

Tested-by: Jiri Mleziva <jmleziva@tiscali.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-06-06 01:38:08 -04:00
Stas Sergeev 714c8a0610 Input: pcspkr - remove negative dependency on snd-pcsp
It should be possible to build pcspkr driver together with snd-pcsp,
even though tehy can not be used together.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-06-06 00:22:50 -04:00
Eric Miao 39ab9ddeb3 Input: pxa27x_keypad - add wakeup support
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-06-02 11:20:55 -04:00
Dmitry Torokhov e8ef434709 Input: serio - remove pending events when unregistering driver
That fixes an opps when driver is repeatedly loaded and unloaded in
a tight loop.

Tested-by: Roland Kletzing <devzero@web.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-06-02 00:41:57 -04:00
Dmitry Torokhov f6d65610df Input: atkbd - use ushort instead of uchar keymap
Since some of the keycodes defined in input.h have values greater
than 255 we should use unsigned shorts in keymaps.

Tested-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-06-02 00:39:45 -04:00
Pau Oliva Fora 5a18c343a6 Input: add HTC Shift Touchscreen Driver
Signed-off-by: Pau Oliva Fora <pau@eslack.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-06-02 00:38:35 -04:00
Linus Torvalds 7536d7be7b Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: rename SW_RADIO to SW_RFKILL_ALL
  Input: gtco - fix double kfree in error handling path
  Input: pxa27x_keypad - miscellaneous fixes
  Input: atkbd - mark keyboard as disabled when suspending/unloading
  Input: apanel - remove duplicate include
  Input: wm9713 - support five wire panels
  Input: wm97xx-core - fix race on PHY init
  Input: wm97xx-core - fix driver name
  Input: wm97xx-core - report a phys for WM97xx touchscreens
  Input: i8042 - make sure Dritek quirk is invoked at resume
  Input: i8042 - add Dritek quirk for Acer TravelMate 660
2008-05-30 10:17:19 -07:00
Dmitry Torokhov 501a525058 Input: gtco - fix double kfree in error handling path
The code would try to free 'report' twice upon input_register_device()
failure.

Reported-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-30 10:40:28 -04:00
Jiri Kosina c3a34f4390 Input: i8042 - add Intel D845PESV to nopnp list
This patch introduces i8042_dmi_nopnp_table to make it possible to perform
DMI matches for systems that need 'i8042.nopnp' to work correctly, and
introduces such an entry for Intel D845PESV -- this system doesn't
detect PS2 mouse reliably without this option, as reported by Robert
Lewis.

[dtor@mail.ru - make it compile if CONFIG_PNP is off - reported
 by Randy Dunlap]

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-29 16:19:58 -04:00
Antonio Ospite 471637a575 Input: pxa27x_keypad - miscellaneous fixes
1. Set input bits for direct keys codes
2. Set input bits for rotary encoder codes only if rotary
   encoder is enabled
3. Enable EV_REL only if rotary encoder is enabled and rel_codes
   are set up

Signed-off-by: Antonio Ospite <ao2@openezx.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-28 14:35:52 -04:00
Dmitry Torokhov 57f5b1590f Input: atkbd - mark keyboard as disabled when suspending/unloading
This will shut off garbage that may come from KBD port during resume.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-28 00:54:01 -04:00
Markus Armbruster e4dcff1f6e xen pvfb: Dynamic mode support (screen resizing)
The pvfb backend indicates dynamic mode support by creating node
feature_resize with a non-zero value in its xenstore directory.
xen-fbfront sends a resize notification event on mode change.  Fully
backwards compatible both ways.

Framebuffer size and initial resolution can be controlled through
kernel parameter xen_fbfront.video.  The backend enforces a separate
size limit, which it advertises in node videoram in its xenstore
directory.

xen-kbdfront gets the maximum screen resolution from nodes width and
height in the backend's xenstore directory instead of hardcoding it.

Additional goodie: support for larger framebuffers (512M on a 64-bit
system with 4K pages).

Changing the number of bits per pixels dynamically is not supported,
yet.

Ported from
http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/92f7b3144f41
http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/bfc040135633

Signed-off-by: Pat Campbell <plc@novell.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-05-27 10:11:36 +02:00
Markus Armbruster 1e892c959d xen pvfb: Module aliases to support module autoloading
These are mostly for completeness and consistency with the other
frontends, as PVFB is typically compiled in rather than a module.

Derived from
http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/5e294e29a43e

While there, add module descriptions.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-05-27 10:11:36 +02:00
Markus Armbruster 6ba0e7b36c xen pvfb: Pointer z-axis (mouse wheel) support
Add z-axis motion to pointer events.  Backward compatible, because
there's space for the z-axis in union xenkbd_in_event, and old
backends zero it.

Derived from
http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/57dfe0098000
http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/1edfea26a2a9
http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/c3ff0b26f664

Signed-off-by: Pat Campbell <plc@novell.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-05-27 10:11:36 +02:00
Huang Weiyi 87a54a2897 Input: apanel - remove duplicate include
Remove duplicate include file <linux/module.h>.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-27 01:38:45 -04:00
Mark Brown 43f83a8f99 Input: wm9713 - support five wire panels
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-27 01:37:26 -04:00
Mark Brown 5de4cd431d Input: wm97xx-core - fix race on PHY init
The chip phy_init() function must be called before the dig_enable() function
but dig_enable() is called when the device is opened and we only call
phy_init() after having reigstered the device, meaning the two can race.
Fix this by doing the phy_init() before we register the input device.

Thanks to Rodolfo Giometti <giometti@enneenne.com> for the report.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-27 01:37:19 -04:00
Mark Brown ef9db4929a Input: wm97xx-core - fix driver name
Fix driver name - thanks to Guennadi Liakhovetski <g.liakhovetski@gmx.de> for
reporting this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-27 01:37:08 -04:00
Mark Brown 6b32ca39d7 Input: wm97xx-core - report a phys for WM97xx touchscreens
phys is displayed in diagnostic output like that from evbug so ensure
that it is set to something.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-27 01:36:47 -04:00
Bruno Prémont d35895db7a Input: i8042 - make sure Dritek quirk is invoked at resume
Also do not fail i8042 entire initialization if enabling dritek extension
fails.

Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-27 01:36:04 -04:00
Al Viro 839cd31050 MODULE_LICENSE expects "GPL v2", not "GPLv2"
... and we have few enough places using the latter to make it
simpler to do search and replace...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-21 16:56:00 -07:00
Bruno Prémont 65e660aa3f Input: i8042 - add Dritek quirk for Acer TravelMate 660
The Acer TravelMate 660 series also requires the Dritek quirk to enable the
extra scancodes.

Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-20 13:47:28 -04:00
Adrian Bunk d1659fcc59 Input: remove CVS keywords
This patch removes CVS keywords that weren't updated for a long time
from comments.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-20 12:17:39 -04:00
Geert Uytterhoeven fd5b462f0b m68k: Return -ENODEV if no device is found
According to the tests in do_initcalls(), the proper error code in case no
device is found is -ENODEV, not -ENXIO or -EIO.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-18 13:28:50 -07:00
Geert Uytterhoeven eb98630ba0 m68k: Some input drivers do not check the platform
Some input drivers do not check whether they're actually running on the
correct platform, causing multi-platform kernels to crash if they are not.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-18 13:28:49 -07:00
Dmitry Baryshkov a33466e312 Input: gpio-keys debouncing support
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-16 16:54:14 -04:00
Magnus Damm 885c316d77 Input: add support for SuperH MigoR touchscreen
This is V2 of the MigoR touch screen driver. The chip we interface to
is unfortunately a custom designed microcontroller speaking some
undocumented protocol over i2c.

The board specific code is expected to register this device as an i2c
chip using struct i2c_board_info [] and i2c_register_board_info().

[dtor@mail.ru: don't enable touchscreen if there are no users]
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-16 15:06:20 -04:00
Dmitry Torokhov ccd3474569 Input: libps2 - remove delayed command execution
Delayed command execution is not used by anyone so let's remove it.

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-16 14:50:49 -04:00
Dmitry Torokhov 3e582db078 Input: gameport - remove rescan/reconnect facilities
They have never been used and are unlikely to be used in the future
so remove them altogether.

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-16 14:50:42 -04:00
Andres Salomon 2ff9814784 Input: hil_ptr - check return value of input_register_device()
[dtor@mail.ru: also signal correct return value to callers]
Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-16 14:50:37 -04:00
Sven Anders e9542dff39 Input: appletouch - simplify touchpad type detection
This patch simplifies type detection and removes unnecessary code.

Signed-off-by: Sven Anders <anders@anduras.de>
[jberg: don't typedef, checkpatch clean, remove useless comments, ...]
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-16 14:50:22 -04:00
Johannes Berg 7dce869f12 Input: appletouch - miscellaneous code cleanups
This patch does some code cleanups in appletouch:
 * useless comment removal
 * make almost checkpatch clean
 * make sparse clean

Signed-off-by: Sven Anders <anders@anduras.de>
[jberg: most of the changes including removing much of the original patch]
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-16 14:50:16 -04:00
Harvey Harrison 923104747d Input: use clamp_val() macro in ff-memless.c
Replace two opencoded nested min/max macros with clamp_val().

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-16 14:49:47 -04:00
Harvey Harrison c6a3ead2ab Input: wacom - make one-bit signed bitfields unsigned
Otherwise it can only take the values 0/-1 which doesn't seem to
have been intended.

drivers/input/tablet/wacom.h:108:12: error: dubious one-bit signed bitfield

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-16 14:49:39 -04:00
Ping Cheng e34b9d2f46 Input: wacom - cleanup handling of tablet IDs
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-16 14:49:32 -04:00
Harvey Harrison ea3e6c5926 Input: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-16 14:45:58 -04:00
Linus Torvalds a9545ee3c8 Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (37 commits)
  SH: catch negative denormal_subf1() retval in denormal_add()
  sh: Fix DMAC base address for SH7709S
  sh: update smc91x platform data for se7206.
  sh: Stub in cpu_to_node() and friends for NUMA build.
  sh: intc register modify fix
  sh: no high level trigger on some sh3 cpus
  sh: clean up sh7710 and sh7720 intc tables
  sh: add interrupt ack code to sh3
  sh: unify external irq pin code for sh3
  sh-sci: avoid writing to nonexistent registers
  sh-sci: sh7722 lacks scsptr registers
  sh-sci: improve sh7722 support
  sh: reset hardware from early printk
  sh: drain and wait for early printk
  sh: use sci_out() for early printk
  sh: add memory resources to /proc/iomem
  sh: add kernel bss resource
  sh: fix sh7705 interrupt vector typo
  sh: update smc91x platform data for se7722
  sh: update smc91x platform data for MigoR
  ...
2008-05-09 08:07:58 -07:00
Paul Mundt 105eabfd51 input: i8042: sh64 IRQ definitions depend on cayman board.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-05-08 19:51:42 +09:00
Stas Sergeev e5e1d3cb20 pcspkr: fix dependancies
fix pcspkr dependancies: make the pcspkr platform
drivers to depend on a platform device, and
not the other way around.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
CC: Vojtech Pavlik <vojtech@suse.cz>
CC: Michael Opdenacker <michael-lists@free-electrons.com>
[fixed for 2.6.26-rc1 by tiwai]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-07 12:42:03 +02:00
Geert Uytterhoeven 4933d07531 m68k: drivers/input/serio/hp_sdc.c needs <linux/semaphore.h>
drivers/input/serio/hp_sdc.c: In function 'hp_sdc_take':
drivers/input/serio/hp_sdc.c:198: error: implicit declaration of function 'up'

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-05 12:37:25 -07:00
Alan Cox f34d7a5b70 tty: The big operations rework
- Operations are now a shared const function block as with most other Linux
  objects

- Introduce wrappers for some optional functions to get consistent behaviour

- Wrap put_char which used to be patched by the tty layer

- Document which functions are needed/optional

- Make put_char report success/fail

- Cache the driver->ops pointer in the tty as tty->ops

- Remove various surplus lock calls we no longer need

- Remove proc_write method as noted by Alexey Dobriyan

- Introduce some missing sanity checks where certain driver/ldisc
  combinations would oops as they didn't check needed methods were present

[akpm@linux-foundation.org: fix fs/compat_ioctl.c build]
[akpm@linux-foundation.org: fix isicom]
[akpm@linux-foundation.org: fix arch/ia64/hp/sim/simserial.c build]
[akpm@linux-foundation.org: fix kgdb]
Signed-off-by: Alan Cox <alan@redhat.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-30 08:29:47 -07:00
Harvey Harrison 858ad08cf4 input: use get_unaligned_* helpers
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-29 08:06:27 -07:00
Denis V. Lunev c7705f3449 drivers: use non-racy method for proc entries creation (2)
Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data
be setup before gluing PDE to main tree.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Peter Osterlund <petero2@telia.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Neil Brown <neilb@suse.de>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-29 08:06:22 -07:00
Alexey Dobriyan 9c37066d88 proc: remove proc_bus
Remove proc_bus export and variable itself. Using pathnames works fine
and is slightly more understandable and greppable.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-29 08:06:18 -07:00
Al Viro 6b8588f718 usb input endianness annotations and fixes
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28 10:03:31 -07:00
Linus Torvalds e945e849e1 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc: video drivers: add facility level
  sparc: tcx.c make tcx_init and tcx_exit static
  sparc: ffb.c make ffb_init and ffb_exit static
  sparc: cg14.c make cg14_init and cg15_exit static
  sparc: bw2.c fix bw2_exit
  sparc64: Fix accidental syscall restart on child return from clone/fork/vfork.
  sparc64: Clean up handling of pt_regs trap type encoding.
  sparc: Remove old style signal frame support.
  sparc64: Kill bogus RT_ALIGNEDSZ macro from signal.c
  sparc: sunzilog.c remove unused argument
  sparc: fix drivers/video/tcx.c warning
  sparc64: Kill unused local ISA bus layer.
  input: Rewrite sparcspkr device probing.
  sparc64: Do not ignore 'pmu' device ranges.
  sparc64: Kill ISA_FLOPPY_WORKS code.
  sparc64: Kill CONFIG_SPARC32_COMPAT
  sparc64: Cleanups and corrections for arch/sparc64/Kconfig
  sparc64: Fix wedged irq regression.
2008-04-28 09:45:57 -07:00
Linus Torvalds cf867ac375 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: xpad - fix build failure
2008-04-27 10:10:37 -07:00
David S. Miller 9c1a5077fd input: Rewrite sparcspkr device probing.
Remove all dependencies on EBUS and ISA bus layers, which we'd like to
remove as they are superfluous.

While we're here, add support for proper frequency changing on BBC
beep devices.  Unlike the comments that were here, this device can
in fact use a programmable frequency.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-26 21:41:22 -07:00
Dmitry Torokhov 20430214cc 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 <mingo@elte.hu>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-27 00:10:11 -04:00
Linus Torvalds 37b05b1798 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (120 commits)
  usb: don't update devnum for wusb devices
  wusb: make ep0_reinit available for modules
  wusb: devices dont use a set address
  wusb: teach choose_address() about wireless devices
  wusb: add link wusb-usb device
  wusb: add authenticathed bit to usb_dev
  USB: remove unnecessary type casting of urb->context
  usb serial: more fixes and groundwork for tty changes
  USB: replace remaining __FUNCTION__ occurrences
  USB: usbfs: export the URB_NO_INTERRUPT flag to userspace
  USB: fix compile problems in ehci-hcd
  USB: ehci: qh_completions cleanup and bugfix
  USB: cdc-acm: signedness fix
  USB: add documentation about callbacks
  USB: don't explicitly reenable root-hub status interrupts
  USB: OHCI: turn off RD when remote wakeup is disabled
  USB: HCDs use the do_remote_wakeup flag
  USB: g_file_storage: ignore bulk-out data after invalid CBW
  USB: serial: remove endpoints setting checks from core and header
  USB: serial: remove unneeded number endpoints settings
  ...
2008-04-25 12:40:57 -07:00
Linus Torvalds ce1d5b23a8 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (40 commits)
  Input: wacom - add support for Cintiq 20WSX
  Input: ucb1400_ts - IRQ probe fix
  Input: at32psif - update MODULE_AUTHOR with new email
  Input: mac_hid - add lockdep annotation to emumousebtn
  Input: i8042 - fix incorrect usage of strncpy and strncat
  Input: bf54x-keys - add infrastructure for keypad wakeups
  Input: add MODULE_ALIAS() to hotpluggable platform modules
  Input: drivers/char/keyboard.c - use time_after
  Input: fix ordering in joystick Makefile
  Input: wm97xx-core - support use as a wakeup source
  Input: wm97xx-core - use IRQF_SAMPLE_RANDOM
  Input: wm97xx-core - only schedule interrupt handler if not already scheduled
  Input: add Zhen Hua driver
  Input: aiptek - add support for Genius G-PEN 560 tablet
  Input: wacom - implement suspend and autosuspend
  Input: xpad - set proper buffer length for outgoing requests
  Input: omap-keypad - fix build warning
  Input: gpio_keys - irq handling cleanup
  Input: add PS/2 serio driver for AVR32 devices
  Input: put ledstate in the keyboard notifier
  ...
2008-04-25 12:38:14 -07:00
Linus Torvalds 4b7227ca32 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-xen-next
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-xen-next: (52 commits)
  xen: add balloon driver
  xen: allow compilation with non-flat memory
  xen: fold xen_sysexit into xen_iret
  xen: allow set_pte_at on init_mm to be lockless
  xen: disable preemption during tlb flush
  xen pvfb: Para-virtual framebuffer, keyboard and pointer driver
  xen: Add compatibility aliases for frontend drivers
  xen: Module autoprobing support for frontend drivers
  xen blkfront: Delay wait for block devices until after the disk is added
  xen/blkfront: use bdget_disk
  xen: Make xen-blkfront write its protocol ABI to xenstore
  xen: import arch generic part of xencomm
  xen: make grant table arch portable
  xen: replace callers of alloc_vm_area()/free_vm_area() with xen_ prefixed one
  xen: make include/xen/page.h portable moving those definitions under asm dir
  xen: add resend_irq_on_evtchn() definition into events.c
  Xen: make events.c portable for ia64/xen support
  xen: move events.c to drivers/xen for IA64/Xen support
  xen: move features.c from arch/x86/xen/features.c to drivers/xen
  xen: add missing definitions in include/xen/interface/vcpu.h which ia64/xen needs
  ...
2008-04-25 12:32:10 -07:00
Oliver Neukum 6fc88f53aa USB: convert away from urb->status in xpad driver
USB is moving to transfering status as a parameter. To ease the transition
urb->status is to be touched only once in a function. The xpad driver has
been overlooked. Dmitry wants this to go through the USB tree.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:47 -07:00
Ping Cheng b345dc7da0 Input: wacom - add support for Cintiq 20WSX
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-24 23:34:05 -04:00
Markus Armbruster 4ee36dc08e xen pvfb: Para-virtual framebuffer, keyboard and pointer driver
This is a pair of Xen para-virtual frontend device drivers:
drivers/video/xen-fbfront.c provides a framebuffer, and
drivers/input/xen-kbdfront provides keyboard and mouse.

The backends run in dom0 user space.

The two drivers are not in two separate patches, because the
intermediate step (one driver, not the other) is somewhat problematic:
the backend in dom0 needs both drivers, and will refuse to complete
device initialization unless they're both present.

Signed-off-by: Markus Armbruster <armbru@redhat.com>

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-24 23:57:33 +02:00
Dmitry Torokhov 942bb7b5d6 Merge branch 'wm97xx' 2008-04-24 13:25:42 -04:00
Vernon Sauder 48bdce4a2e Input: ucb1400_ts - IRQ probe fix
The UCB1400 driver IRQ probe code fails to find an interrupt if all
the interrupts in the range 0-31 are nonprobe-able. This patch
removes the check of the return value so interrupts above 31 can be
detected.

Tested on InHand Fingertip4 PXA270 board.

Signed-off-by: Vernon Sauder <vsauder@inhand.com>
Acked-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-24 13:25:24 -04:00
Hans-Christian Egtvedt a22b4b2f40 Input: at32psif - update MODULE_AUTHOR with new email
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-24 13:25:18 -04:00
Roel Kluin 8c6deb9c8f Input: i8042 - fix incorrect usage of strncpy and strncat
Fix incorrect length argument for strncpy and strncat by replacing them with
strlcpy and strlcat

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-24 13:25:08 -04:00
Michael Hennerich d0478d0ad7 Input: bf54x-keys - add infrastructure for keypad wakeups
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-24 13:25:03 -04:00
Kay Sievers d7b5247bbc Input: add MODULE_ALIAS() to hotpluggable platform modules
Since 43cc71eed1, the platform modalias
is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable
"input" platform drivers, to re-enable auto loading.

[dbrownell@users.sourceforge.net: more drivers, registration fixes]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-24 13:24:59 -04:00
Jiri Kosina 81e329cddd Input: fix ordering in joystick Makefile
Make entries in drivers/input/joystick/Makefile properly alphabetically
ordered.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-24 13:13:42 -04:00
Stas Sergeev 5bae419952 pcsp - Don't build pcspkr when snd-pcsp is enabled
- Update CREDITS with the pc-speaker driver authors.
- Prevent pcspkr from being built together with snd-pcsp.
  Both pcspkr and snd-pcsp use the same platform driver name "pcspkr".

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
2008-04-24 12:00:42 +02:00
Linus Torvalds 429f731dea Merge branch 'semaphore' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc
* 'semaphore' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc:
  Deprecate the asm/semaphore.h files in feature-removal-schedule.
  Convert asm/semaphore.h users to linux/semaphore.h
  security: Remove unnecessary inclusions of asm/semaphore.h
  lib: Remove unnecessary inclusions of asm/semaphore.h
  kernel: Remove unnecessary inclusions of asm/semaphore.h
  include: Remove unnecessary inclusions of asm/semaphore.h
  fs: Remove unnecessary inclusions of asm/semaphore.h
  drivers: Remove unnecessary inclusions of asm/semaphore.h
  net: Remove unnecessary inclusions of asm/semaphore.h
  arch: Remove unnecessary inclusions of asm/semaphore.h
2008-04-21 15:41:27 -07:00
Linus Torvalds 85b375a613 Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (212 commits)
  [ARM] pxa: Phycore pcm-990-specific code for the PXA270 Quick Capture driver
  [ARM] pxa: V4L2 soc_camera driver for PXA270
  [ARM] pxa: restrict availability of pxa2xx PCMCIA drivers
  [ARM] 5005/1: BAST: Fix kset_name initialiser
  [ARM] 4967/1: Adds functions to set clkout rate for Samsung S3C2410
  [ARM] 4988/1: Add GPIO lib support to the EP93xx
  [ARM] Add initial sparsemem support
  [ARM] pxa: initialise PXA devices before platform init code
  [ARM] 5002/1: tosa: add two more leds
  [ARM] 5004/1: Tosa: make several unreferenced structures static.
  [ARM] 5003/1: Shut up sparse warnings
  [ARM] 4977/2: soc - pxa2xx-ac97 - Add missing clk_enable()
  [ARM] 4976/1: zylonite: Configure GPIO for WM9713 IRQ line
  [ARM] 4974/1: Drop unused leds-tosa.
  [ARM] 4973/1: Tosa: use leds-gpio driver.
  [ARM] 4972/1: Tosa: convert scoop GPIOs usage to generic gpio code
  [ARM] 4971/1: pxaficp_ir: provide startup and shutdown hooks
  [ARM] pxa: lubbock: move mis-placed SPI info
  [ARM] 4970/1: tosa: correct gpio used for wake up.
  [ARM] 4966/1: magician: add MFP pin configuration
  ...
2008-04-21 15:40:55 -07:00
Russell King adf6d34e46 Merge branch 'omap2-upstream' into devel 2008-04-19 17:17:29 +01:00
eric miao a683b14df8 [ARM] pxa: separate GPIOs and their mode definitions to pxa2xx-gpio.h
two reasons:
1. GPIO namings and their mode definitions are conceptually not part
   of the PXA register definitions

2. this is actually a temporary move in the transition of PXA2xx to
   use MFP-alike APIs (as what PXA3xx is now doing), so that legacy
   code will still work and new code can be added in step by step

Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19 11:29:04 +01:00
Matthew Wilcox 6188e10d38 Convert asm/semaphore.h users to linux/semaphore.h
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
2008-04-18 22:22:54 -04:00
Magnus Damm 6dea7814e1 Fix sh_keysc double free
Avoid double free situation from happening by removing input_free_device()
after input_unregister_device(). Suggested by Dmitry Torokhov.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18 09:50:02 -07:00
Magnus Damm 795e6bf335 sh: SuperH KEYSC platform driver
Add a platform driver for the SuperH KEYSC block.  The driver expects to get
mode, timing information and keypad layout from the board code as platform
data.  The board code is resonsible for pin configuration.

Both sh7343 and sh7722 should be supported, but only the sh7722 processor has
been tested so far.  SH_KEYSC_MODE_3 is yet to be tested.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18 09:50:00 -07:00
Mark Brown 34d278534d Input: wm97xx-core - support use as a wakeup source
The 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.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-17 09:24:58 -04:00
Mark Brown db7c10e708 Input: wm97xx-core - use IRQF_SAMPLE_RANDOM
The touchscreen interrupt is driven by human input which can reasonably
be used to provide entropy.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-17 09:24:48 -04:00
Mark Brown d808fbe5b4 Input: wm97xx-core - only schedule interrupt handler if not already scheduled
As 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.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-17 09:24:39 -04:00
Martin Kebert 3e24e2b5ae Input: add Zhen Hua driver
This 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.

Signed-off-by: Martin Kebert <gkmarty@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-15 13:26:52 -04:00
Guryanov Dmitry a32bcc45b9 Input: aiptek - add support for Genius G-PEN 560 tablet
USBHID driver only supports relative mode with this tablet so let aiptek
module handle it.

Signed-off-by: Dmitry Guryanov <guryanov@dgap.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-15 13:13:10 -04:00
Oliver Neukum e722409445 Input: wacom - implement suspend and autosuspend
This implements suspend and autosuspend support for wacom devices.
It works by using the usb last busy functionality triggered in the
completion callback.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-15 01:31:57 -04:00
Michael Gruber 04021e4e40 Input: xpad - set proper buffer length for outgoing requests
The messages for led/rumble are exactly 3 and 8 bytes respectively.
Hence set up the transfer_buffer_length accordingly.

Signed-off-by: Michael Gruber <lists.mg@googlemail.com>
Acked-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-15 01:31:47 -04:00
David Brownell da3e4c885e Input: omap-keypad - fix build warning
Fix 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.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-15 01:31:33 -04:00
David Brownell 1164ec1ae4 Input: gpio_keys - irq handling cleanup
Cleanup IRQ handling in gpio_keys:  bail after handling the IRQ, and
report IRQ_NONE if we never handle it.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-15 01:31:13 -04:00
Hans-Christian Egtvedt 9f9439e92a Input: add PS/2 serio driver for AVR32 devices
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.

For more information about the PSIF module, see the datasheet for AT32AP700X at
http://www.atmel.com/dyn/products/datasheets.asp?family_id=682

Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-15 01:30:47 -04:00
David Brownell ac37a0b0ba ARM: OMAP: 5912 OSK GPIO updates
Start cleaning up GPIO handling for OMAP5912 OSK board:

 - Initialize GPIOs using the cross-platform calls, not the old
   OMAP-private ones.

 - Move touchscreen setup out of ads7846 code into board-specfic
   setup code, where it belongs.

This doesn't depend on the patches to update OMAP to use the
gpiolib implementation framework.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2008-04-14 09:57:06 -07:00
Oliver Neukum 76d057ce5a Input: usbtouchscreen - don't use DMA on stack
DMA on the stack is not allowed. The buffer must be kmalloced.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-04 15:31:47 -04:00
Dmitry Torokhov f0fab8e04d Merge branch 'xbox' 2008-04-04 15:31:23 -04:00
Oliver Neukum 6eae9b0acd Input: xpad - don't use GFP_ATOMIC
GFP_ATOMIC should not be used when GFP_KERNEL can be used.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-03 16:19:33 -04:00
Brian Magnuson 99de0912be Input: xpad - add support for wireless xbox360 controllers
Signed-off-by: Brian Magnuson <bdmagnuson@gmail.com>
Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-03 16:19:23 -04:00
Anssi Hannula bf8cb31418 Input: xpad - drop obsolete driver versioning
The 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.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-03 16:19:10 -04:00
Anssi Hannula cfbe20106f Input: xpad - enable force feedback on xbox 360 controllers only
Commit 4994cd8dad 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().

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-03 16:18:57 -04:00
Anssi Hannula fc55e95214 Input: xpad - do not report nonexistent buttons for xbox360
The 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.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-03 16:18:44 -04:00
Anssi Hannula 8a7ae2a890 Input: xpad - add more xbox 360 controller ids
Add 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.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-03 16:18:35 -04:00
Anssi Hannula 97f09cb53d Input: xpad - fix inverted Y and RY axes
The commit ae91d10aab 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.

Cc: Brian Magnuson <bdmagnuson@gmail.com>
Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-03 16:18:23 -04:00
Anssi Hannula a0979923d7 Input: xpad - fix dpad handling of unknown devices
For 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.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-03 16:18:10 -04:00
Anssi Hannula 8a0f83eacc Input: xpad - match xbox 360 devices with interface info
Match 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.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-03 16:17:52 -04:00