summaryrefslogtreecommitdiffstats
path: root/drivers/input/input.c
Commit message (Collapse)AuthorAgeFilesLines
* Input: make input_register_handler() return error codesDmitry Torokhov2006-09-141-5/+7
| | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: remove cruft that was needed for transition to sysfsDmitry Torokhov2006-09-141-10/+0
| | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: fix input module refcountingDmitry Torokhov2006-09-141-2/+2
| | | | | | | | | Now that input_free_device is basically an alias for input_put_device we need to acquire a reference to input module right when we allocate device because input_dev_release releases reference to input module unconditionally. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: constify input coreDmitry Torokhov2006-09-141-3/+4
| | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: send key up events at disconnectDmitry Torokhov2006-09-101-2/+5
| | | | | | | | Emit key up events for all pressed keys/buttons when disconnecting an input device. Cures "stuck" enter key effect when unloading keyboard module. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: implement new force feedback interfaceAnssi Hannula2006-07-191-0/+6
| | | | | | | | | | | | | | | | | Implement a new force feedback interface, in which all non-driver-specific operations are separated to a common module. This includes handling effect type validations, locking, etc. The effects are now file descriptor specific instead of the previous strange half-process half-fd specific behaviour. The effect memory of devices is not emptied if the root user opens and closes the device while another user is using effects. This is a minor change and most likely no force feedback aware programs are affected by this negatively. Otherwise the userspace interface is left unaltered. Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: add missing handler->start() callDmitry Torokhov2006-07-191-1/+4
| | | | | | | | The start() method need to be called every time we create a new handle. This includes not only registering new devices but also when registering new handlers. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: fix list iteration in input_release_device()Andrew Morton2006-07-151-3/+5
| | | | | Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: introduce input_inject_event() functionDmitry Torokhov2006-07-061-0/+27
| | | | | | | | | | Create input_inject_event() function which is to be used by input handlers as opposed to input_event() which is reserved for drivers implementing input devices. The difference is that if device is "grabbed" by some process input_inject_event() will ignore events unless sent from the handle that is currently owns the device. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: add start() method to input handlersDmitry Torokhov2006-07-061-2/+10
| | | | | | | | | The new start() method is called immediately after connect() and also when "grabbed" device is released by its owner. This will allow input handlers to re-synchronize state of once-grabbed device with the rest of devices. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: remove accept method from input_devDmitry Torokhov2006-07-061-9/+0
| | | | | | | This method used to enforce exclusive access to iforce devices, but presenlty there are no known users of this method. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: fix resetting name, phys and uniq when unregistering deviceDmitry Torokhov2006-06-271-1/+2
| | | | | | | | | It should be done before calling class_device_unregister() because it will destroy the device and free memory if there are no other references to the device. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Input: rearrange exportsDmitry Torokhov2006-06-261-15/+14
| | | | | | New style is to mark symbol as exported right after its definition. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: fix formatting to better follow CodingStyleDmitry Torokhov2006-06-261-12/+25
| | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: reset name, phys and uniq when unregisteringDmitry Torokhov2006-06-261-1/+18
| | | | | | | | | | Name, phys and uniq are quite often constant strings in moules implementing particular input device. If a module unregisters input device and then gets unloaded, the device could still be present in memory (pinned via sysfs), but aforementioned members would point to some random memory. Set them all to NULL when unregistering so sysfs handlers won't try dereferencing them. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: return correct size when reading modalias attributeRichard Purdie2006-06-261-1/+1
| | | | | Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: make EVIOCGSND return meaningful dataDmitry Torokhov2006-04-291-0/+3
| | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: move input_device_id to mod_devicetable.hDmitry Torokhov2006-04-261-4/+4
| | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: make modalias code respect allowed buffer sizeDmitry Torokhov2006-04-021-39/+71
| | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: convert /proc handling to seq_fileDmitry Torokhov2006-04-021-111/+168
| | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: limit attributes' output to PAGE_SIZEDmitry Torokhov2006-04-021-12/+24
| | | | | | | sysfs can't handle more than PAGE_SIZE data coming from attributes' show() methods; make sure we respect this limit. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Manual merge with Linus.Dmitry Torokhov2006-04-021-1/+1
|\ | | | | | | | | | | | | Conflicts: arch/powerpc/kernel/setup-common.c drivers/input/keyboard/hil_kbd.c drivers/input/mouse/hil_ptr.c
| * [PATCH] mark f_ops const in the inodeArjan van de Ven2006-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | Mark the f_ops members of inodes as const, as well as fix the ripple-through this causes by places that copy this f_ops and then "do stuff" with it. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | Input: input core - semaphore to mutex conversionJes Sorensen2006-02-191-7/+8
|/ | | | | | | Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* [PATCH] INPUT: add MODALIAS to the event environmentKay Sievers2006-01-131-18/+37
| | | | | | | input: add MODALIAS to the event environment Signed-off-by: Kay Sievers <kay.sievers@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Input: prepare for f_ops constnessArjan van de Ven2006-01-101-1/+1
| | | | | | | | Avoid doing assignments to a live ->fops so it can be marked as 'const'. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* [PATCH] Input: add modalias supportRusty Russell2006-01-041-0/+39
| | | | | | | | | | | | | | | | Here's the patch for modalias support for input classes. It uses comma-separated numbers, and doesn't describe all the potential keys (no module currently cares, and that would make the strings huge). The changes to input.h are to move the definitions needed by file2alias outside __KERNEL__. I chose not to move those definitions to mod_devicetable.h, because there are so many that it might break compile of something else in the kernel. The rest is fairly straightforward. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> CC: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] driver core: replace "hotplug" by "uevent"Kay Sievers2006-01-041-7/+7
| | | | | | | | | Leave the overloaded "hotplug" word to susbsystems which are handling real devices. The driver core does not "plug" anything, it just exports the state to userspace and generates events. Signed-off-by: Kay Sievers <kay.sievers@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] remove CONFIG_KOBJECT_UEVENT optionKay Sievers2006-01-041-1/+0
| | | | | | | | | It makes zero sense to have hotplug, but not the netlink events enabled today. Remove this option and merge the kobject_uevent.h header into the kobject.h header file. Signed-off-by: Kay Sievers <kay.sievers@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Input: handle failures in input_register_device()Dmitry Torokhov2005-11-201-27/+36
| | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* [PATCH] Input: fix 'uniq' reporting in hotplug handlerDmitry Torokhov2005-11-091-1/+1
| | | | | | | | Input: fix 'uniq' reporting in hotplug handler Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Input: fix input device deregistrationDmitry Torokhov2005-11-021-0/+1
| | | | | | | Remove main attribute group (name, phys, uniq) when unregistering input devices. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: do not register statically allocated devicesDmitry Torokhov2005-11-021-11/+15
| | | | | | | | Do not register statically allocated input devices to prevent OOPS when attaching input interfaces since it requires class device to be properly initialized. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: fix input_dev registration messageDmitry Torokhov2005-10-311-1/+1
| | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* [PATCH] input core: remove custom-made hotplug handlerDmitry Torokhov2005-10-281-145/+104
| | | | | | | | | | Input: remove custom-made hotplug handler Now that all input devices are registered with sysfs we can remove old custom-made hotplug handler and crate a standard one. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] INPUT: rename input_dev_class to input_class to be correct.Greg Kroah-Hartman2005-10-281-7/+7
| | | | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] INPUT: remove the input_class structure, as it is unused.Greg Kroah-Hartman2005-10-281-15/+3
| | | | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] INPUT: Fix oops when accessing sysfs files of nested input devicesGreg Kroah-Hartman2005-10-281-7/+12
| | | | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] INPUT: export input_dev_class so that input drivers can use it.Greg Kroah-Hartman2005-10-281-1/+2
| | | | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] INPUT: register the input class device soonerGreg Kroah-Hartman2005-10-281-3/+3
| | | | | | | This is needed so we can actually use the class device within the input handlers. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] Input: export input_dev data via sysfs attributesDmitry Torokhov2005-10-281-23/+133
| | | | | | | | | | | | | | | | Input: export various input device attributes via sysfs The following structure is exported: input0/ |-- name |-- phys |-- uniq |-- id/{bustype|vendor|product|version} `-- capabilities/{ev|abs|rel|key|led|msc|ff|sw} Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] Input: show sysfs path in /proc/bus/input/devicesDmitry Torokhov2005-10-281-0/+6
| | | | | | | | | Input: show sysfs path in /proc/bus/input/devices Show that sysfs and phys path are different objects. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] Input: prepare to sysfs integrationDmitry Torokhov2005-10-281-5/+72
| | | | | | | | | | | Input: prepare to sysfs integration Add struct class_device to input_dev; add input_allocate_dev() to dynamically allocate input devices; dynamically allocated devices are automatically registered with sysfs. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] Input: kill devfs referencesDmitry Torokhov2005-10-281-7/+0
| | | | | | | Input: remove references to devfs from input subsystem Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] Input: check switch bitmap when matching handlersDmitry Torokhov2005-09-241-0/+1
| | | | | | | | The wwitch bitmap was added to input_device_id structure and we should check it when matching handlers and input devices. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Input: Add a new switch event typeRichard Purdie2005-09-071-0/+11
| | | | | | | | | | The corgi keyboard has need of a switch event type with slightly type to the input system as recommended by the input maintainer. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Cc: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Input: cannot refer to __exit from within __init.Andrew Morton2005-07-011-1/+1
| | | | | Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: rearrange procfs code to reduce number of #ifdefsDmitry Torokhov2005-06-301-191/+198
| | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/dtor/input.git manuallyLinus Torvalds2005-06-271-5/+32
|\ | | | | | | Some manual fixups required due to clashes with the PF_FREEZE cleanups.
| * Input: do not corrupt system-wide procfs fops.Luke Kosewski2005-06-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | entry->proc_fops is a pointer to struct file_operations. When we call create_proc_entry(...), it pointis to proc_file_operations, deep in fs/proc/generic.c. By adding a 'poll' member to this struct we effectively force the 'poll' member on every file in /proc, which is wrong (they all fail select(...) calls). This patch changes a copy of entry->proc_fops and reassigns it rather than changing the original member. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
OpenPOWER on IntegriCloud