aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc/cma3000_d0x_i2c.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2010-12-07Input: tca6416-keypad - add support for tca6408aTony SIM2-7/+16
Support 8-bit tca6408a I/O expander as a keypad. Signed-off-by: Tony SIM <chinyeow.sim.xt@renesas.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-12-07Input: wacom - add new Bamboo PT (0xdb)David Foley1-0/+3
Adds new Bamboo Pen & Touch model - Bamboo P & T Special Edition Medium (CTH661/L; Product ID = 0xdb). Tested-by: Tobias Verbeke <tobias.verbeke@gmail.com> Signed-off-by: David Foley <favux.is@gmail.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-12-06Input: add input driver for polled GPIO buttonsGabor Juhos4-0/+280
The existing gpio-keys driver can be usable only for GPIO lines with interrupt support. Several devices have buttons connected to a GPIO line which is not capable to generate interrupts. This patch adds a new input driver using the generic GPIO layer and the input-polldev to support such buttons. [Ben Gardiner <bengardiner@nanometrics.ca: fold code to use more of the original gpio_keys infrastructure; cleanups and other improvements.] Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> Tested-by: Ben Gardiner <bengardiner@nanometrics.ca> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-12-01Input: turbografx - fix reference countingNamhyung Kim1-0/+1
The ref-count of parport gained from parport_find_number() was not released in normal path. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-30Input: synaptics - fix handling of 2-button ClickPadsYan Li1-1/+2
Lenovo S10-3t's ClickPad is a 2-button ClickPad that reports BTN_LEFT and BTN_RIGHT as normal touchpad, unlike the 1-button ClickPad used in HP mini 210 that reports solely BTN_MIDDLE. In 0xc0-cap response, the 1-button ClickPad has the 20-bit set while 2-button ClickPad has the 8-bit set. This patch makes the kernel only handle 1-button ClickPad specially, and treat 2-button ClickPad in the same fashion as regular touchpads. This fixes kernel bug #18122 and MeeGo bug #4807. Signed-off-by: Yan Li <yan.i.li@intel.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-30Input: wacom - add IDs for two new Bamboo PTsDavid Foley1-0/+6
Add two new Bamboo Pen & Touch models: Bamboo Comic Medium (CTH661/S1; Product ID = 0xd8) Bamboo P & T Special Edition Small (CTH461/L; Product ID = 0xdA) Tested-by: IRIE Shinsuke <irieshinsuke@yahoo.co.jp> Tested-by: Andrea Cadeddu <mrernia@gmail.com> Signed-off-by: David Foley <favux.is@gmail.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-30Input: document struct input_absinfoDmitry Torokhov1-1/+20
Add documentation for struct input_absinfo that is used in EVIOCGABS and EVIOCSABS ioctl and specify units of measure used for reporting resolution for an axis. Acked-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-30Input: add keycodes for touchpad on/off keysBastien Nocera1-0/+4
Some laptops will have a "touchpad toggle" soft button, which expects user-space to turn off the touchpad themselves, some other devices will do this in hardware, but send key events telling us that the touchpad has been turned off/on. KEY_TOUCHPAD_ON/KEY_TOUCHPAD_OFF will be used by user-space to show a popup with the status of the touchpad. Signed-off-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-30Input: use pr_fmt and pr_<level>Joe Perches10-68/+72
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-30Input: i8042 - use pr_<level>, pr_fmt, fix dbg and __FILE__ useJoe Perches3-73/+63
Standardized message logging prefixes. Removed \n from dbg macro, added \n to each dbg call site. Removed direct use of __FILE__ from dbg, converted to pr_fmt(fmt) Added non-debug printf argument verification of dbg calls Removed "i8042.c" from printks, converted to pr_<level> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-30Input: add CMA3000 accelerometer driverHemanth V7-0/+781
Add support for CMA3000 Tri-axis accelerometer, which supports Motion detect, Measurement and Free fall modes. CMA3000 supports both I2C/SPI bus for communication, currently the driver supports I2C based communication. Signed-off-by: Hemanth V <hemanthv@ti.com> Reviewed-by: Jonathan Cameron <jic23@cam.ac.uk> Reviewed-by: Sergio Aguirre <saaguirre@ti.com> Reviewed-by: Shubhrajyoti <Shubhrajyoti@ti.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-22Input: iforce - clean up MakefileDmitry Torokhov1-12/+3
Use <module>-y notation to specify list of objects comprising iforce module and conditionally pull in USB and RS232 support. Also remove custom compiler flags and rely on general makefile rules for enabling warnings. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-22Input: clean up Makefile (use input-core-y)Dmitry Torokhov1-1/+1
The proper way to specify multi-source object is to use <name>-y instead of <name>-obj (which is deprecated) as it allows conditional inclusion of modules in the list. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-22Input: usbtouchscreen - add support for LG Flatron T1710BGlenn Sommer1-0/+1
I've recently got my hands on a LG Flatron T1710B touchscreen. As other LG products, this seems to use the ITM panel. Signed-off-by: Glenn Sommer <gsommer@datanordisk.dk> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-21Input: ct82c710 - remove a redundant serio_register_port()Axel Lin1-5/+3
We already call serio_register_port() in ct82c710_probe(), thus remove a redundant serio_register_port() in ct82c710_init(). Looks like this bug is introduced by 916d83cfe5da1cda454d8b0ae233f06b58bd7f91 "Input: ct82c710 - convert to the new platform device interface" [dtor@mail.ru: also move printk to where we register port] Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-21Input: ams_delta_serio - fix wrong kfree in ams_delta_serio_exitAxel Lin1-1/+0
serio_unregister_port() will call put_device() to free the memory. Thus remove kfree(ams_delta_serio) after serio_unregister_port(ams_delta_serio). Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-21Input: ps2mult - fix wrong kfree in ps2mult_connect error pathAxel Lin1-1/+1
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-20Input: serio HIL MLC - don't deref null, don't leak and return proper errorJesper Juhl2-9/+14
While reviewing various users of kernel memory allocation functions I came across drivers/input/serio/hil_mlc.c::hil_mlc_register() and noticed that: - it calls kzalloc() but fails to check for a NULL return before use. - it makes several allocations and if one fails it doesn't free the previous ones. - It doesn't return -ENOMEM in the failed memory allocation case (it just crashes). This patch corrects all of the above and also reworks the only caller of this function that I could find (drivers/input/serio/hp_sdc_mlc.c::hp_sdc_mlc_out()) so that it now checks the return value of hil_mlc_register() and properly propagates it on failure and I also restructured the code to remove some labels and goto's to make it, IMHO nicer to read. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Tested-by: Helge Deller <deller@gmx.de> Acked-by: Helge Deller <deller@gmx.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-19Input: add support for keyboards on ST SPEAr platformRajeev Kumar4-0/+495
Signed-off-by: Rajeev Kumar <rajeev-dlh.kumar@st.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-18Input: fix typo in keycode validation supporting large scancodesMattia Dongili1-1/+1
Check the input_keymap_entry keycode size (u32) instead of the device's (void*) when validating that keycode value can be stored in the keymap. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=22722 Signed-off-by: Mattia Dongili <malattia@linux.it> Tested-by: Norbert Preining <preining@logic.at> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-18Input: gameport - convert to use common workqueue instead of a threadDmitry Torokhov1-84/+68
Instead of creating an exclusive thread to handle gameport events (which happen rarely), let's switch to common workqueue. With the arrival of concurrency-managed workqueue infrastructure we are not concerned that our callers or callees also using workqueue (no deadlocks anymore) and it should reduce total number of threads in the system. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-18Input: serio - convert to common workqueue instead of a threadDmitry Torokhov1-86/+69
Instead of creating an exclusive thread to handle serio events (which happen rarely), let's switch to using common workqueue. With the arrival of concurrency-managed workqueue infrastructure we are not concerned that our callers or callees also using workqueue (no deadlocks anymore) and it should reduce total number of threads in the system. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-18Input: qt602240_ts - fix wrong sizeof in object table allocationChris Leech1-1/+1
The kcalloc call for the object table is using sizeof(struct qt602240_data) when it should be using sizeof(struct qt6602240_object), resulting in a larger allocation than is required. Signed-off-by: Chris Leech <christopher.leech@linux.intel.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-18Input: qt602240_ts - convert to using dev_pm_opsDmitry Torokhov1-7/+12
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-18Input: xpad - ensure xpad->bulk_out is initialized before submitting urbAxel Lin1-16/+16
As pointed out by Oliver Neukum: xpad->irq_in is currently submitted before xpad->bulk_out is allocated. That however is a race, because the callback for irq_in can call xpad360w_process_packet(), which will in turn submit the bulk URB. This patch moves initialization for xpad->bulk_out earlier, so we can ensure xpad->bulk_out is initialized before submitting urb. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-15Input: aiptek - tighten up permissions on sysfs attributesDmitry Torokhov1-14/+14
Sysfs attributes affecting device behavior should not be, by default, world-writeable. If distributions want to allow console users access these attributes they need to employ udev and friends to adjust permissions as needed. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-15Input: hgpk - fix powersave modePaul Fox1-9/+17
Recent testing of this codepath showed that it wasn't working, perhaps due to changes within the input layer. This fixes it. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-15Input: hgpk - recalibration tweaksDaniel Drake1-9/+22
Disable the recalibration guard where new recalibrations are triggered if we detect a packet too soon after calibrating - we found that this results in erroneous recalibrations, and if the recalibration failed then the rest of our badness-detection code will request another. Add a module option disabling all of the recalibration code, in case an OLPC deployment thinks all of the workarounds we have are doing more damage than good and wants to experiment with them all disabled. Based on work by Paul Fox. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-15Input: hgpk - detect simple mode overflowsDaniel Drake1-0/+5
Based on work by Paul Fox. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-15Input: sysrq - pass along lone Alt + SysRqDmitry Torokhov1-45/+124
When user presses and releases Alt + SysRq without pressing any of the hot keys re-inject the combination and pass it on to userspace instead of suppressing it - maybe he or she wanted to take print screen instead of invoking SysRq handler. Also pass along release events for keys that have been pressed before SysRq mode has been invoked so that keys do not appear to be "stuck". Acked-by: Jason Wessel <jason.wessel@windriver.com> Tested-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-11Input: mac mouse emulation - add lockingDmitry Torokhov1-0/+8
We need to add appropriate locking when toggling mac mouse emulation on and off to ensure that input device and handler are in consistent state. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-11Input: hgpk - extend jumpiness detectionDaniel Drake2-20/+88
In addition to forcing recalibrations upon detection of cursor jumps (and performing them quicker than before), detect and discard errant 'jump' packets caused by a firmware bug, which are then repeated with each one being approximately half the delta of the one previously (as if it is averaging out) Based on original work by Paul Fox. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-11Input: hgpk - rework spew detectionDaniel Drake2-32/+103
The old implementation of spew detection simply tracked the overall position delta of the cursor over every 100 packets. We found that this causes occasional false positives in spew detection, and also that the conditions of the spewy packets are perhaps more fixed than we once thought. Rework the spew detection to look for packets of specific small delta, and only recalibrating if the overall movement delta stays within expected bounds. Also discard duplicate packets in the advanced mode, which appear to be very common. If we don't, the spew detection kicks in far too early. If we get a large spew of duplicates, request a recalibration straight up. Based on earlier work by Paul Fox. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-11Input: hgpk - support GlideSensor and PenTablet modesDaniel Drake3-43/+441
Add a "hgpk_mode" sysfs attribute that allows selection between 3 options: Mouse (the existing option), GlideSensor and PenTablet. GlideSensor is an enhanced protocol for the regular touchpad mode that additionally reports pressure and uses absolute coordinates. We suspect that it may be more reliable than mouse mode in some environments. PenTablet mode puts the touchpad into resistive mode, you must then use a stylus as an input. We suspect this is the most reliable way to drive the touchpad. The GlideSensor and PenTablet devices expose themselves with the intention of being combined with the synaptics X11 input driver. Based on earlier work by Paul Fox. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-11Input: pcf_keypad - convert to dev_op_opsDmitry Torokhov1-4/+15
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-11Input: xpad - remove useless check in xpad_removeDmitry Torokhov1-19/+18
ixpad can never be NULL here; if it is NULL we would not have been bound to the interface and then why would we be called? Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-11Input: xpad - fix resource reclaim in xpad_probe error pathAxel Lin1-12/+18
Properly free the resources in error path by the reverse order of resource allocation. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-11Input: xpad - fix a memory leakAxel Lin1-2/+3
In xpad_led_disconnect(), what we really want is to kfree(xpad_led). In xpad_disconnect(), add a missing kfree(xpad->bdata) to fix the memory leak. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-11Input: xpad - return proper error in error pathAxel Lin1-10/+23
In current implementation, xpad_probe return 0 when usb_alloc_urb failed for xpad->bulk_out and kzalloc failed for xpad->bdata. This patch removes the initialization for error variable, assign the error code at the place the error happens instead. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-11Input: do not pass injected events back to the originating handlerDmitry Torokhov1-11/+26
Sometimes input handlers (as opposed to input devices) have a need to inject (or re-inject) events back into input core. For example sysrq filter may want to inject previously suppressed Alt-SysRq so that user can take a screen print. In this case we do not want to pass such events back to the same same handler that injected them to avoid loops. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-11Input: pcf8574_keypad - fix error handling in pcf8574_kp_probeDan Carpenter1-13/+10
It is not allowed to call input_free_device() after calling input_unregister_device() because input devices are refcounted and unregister will free the device if we were holding he last referenc. The preferred style in input/ is to make input_register_device() the last function in the probe which can fail. That way we don't need to call input_unregister_device(). Also do not need to call input_set_drvdata() as nothing in the driver uses the data. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-10Input: acecad - fix a memory leak in usb_acecad_probe error pathAxel Lin1-1/+2
Add a missing usb_free_urb() in usb_acecad_probe() error path. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-04Input: atkbd - add 'terminal' parameter for IBM Terminal keyboardsBenjamin LaHaise1-1/+11
Many of the IBM Terminal keyboards from the 1980s and early 1990s communicate using a protocol similar, but not identical to the AT keyboard protocol. (Models known to be like this include 6110344, 6110668, 1390876, 1386887, and possibly others.) When the connector is rewired or adapter to an AT-DIN or PS/2 connector, they can be connected to a standard PC, with three caveats: a) They can only use scancode set 3; requests to use anything else are quietly ignored. b) The AT Command to request Make, Break and Repeat codes is not properly interpreted. c) The top function keys on a 122 key keyboard, and the arrow/edit keys in the middle of the board send non-standard scancodes. C) is easily taken care of in userspace, by use of setkeycodes B) can be taken care of by a userspace hack (that makes the kernel complain in dmesg) A) is fixable in theory, but on the keyboard i tested on (6110668), it seems to be detected unoverridably as Set 2, causing userspace oddities that make it harder to fix C). Enclosed is a small patch to the kernel that fixes A) and B) in the kernel, making it much easier to fix C) in userspace. It adds a single kernel command line parameter that overrides the detection that sets these boards as set 2, and instead of sending the Make-break-repeat command to the keyboard, it sends the make-break command, which is properly recognized by these keyboards. Software level key repeating seems to make up for the lack of hardware repeat codes perfectly. Without manually setting the command line parameter (tentatively named atkbd.terminal), this code has no effect, and the driver works exactly as before. See also: http://www.seasip.info/VintagePC/ibm_1390876.html http://www.seasip.info/VintagePC/ibm_6110344.html http://geekhack.org/showwiki.php?title=Island:7306 Signed-off-by: Erika Quinn <erikas.aubade@gmail.com> Signed-off-by: Benjamin LaHaise <bcrl@kvack.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-04Input: i8042 - add Sony VAIOs to MUX blacklistJesse Barnes1-0/+11
The Sony VPCZ1 doesn't support active multiplexing and trying to enable it causes keyboard to stop working. Since most (all?) VAIOs do not have external PS/2 ports nor they implement active multiplexing properly, and trying to enable MUX usually messes up keyboard/touchpad, let's simply disable MUX probing based on board name (VAIO). Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-03kgdboc: reset input devices (keyboards) when exiting debuggerDmitry Torokhov1-0/+59
Use the newly exported input_reset_device() call to reset LED state and mark all keys/buttons as released on all keyboard-like devices when exiting the debugger. [jason.wessel@windriver.com: fix compile without keyboard input driver] Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-03Input: export input_reset_device() for use in KGDBDmitry Torokhov2-16/+38
KGDB, much like the resume process, needs to be able to mark all keys that were pressed at the time we dropped into the debuggers as "released", since it is unlikely that the keys stay pressed for the entire duration of the debug session. Also we need to make sure that input_reset_device() and input_dev_suspend() only attempt to change state of currenlt opened devices since closed devices may not be ready to accept IO requests. Tested-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-03Input: adp5588-keys - unify common header definesMichael Hennerich2-50/+39
Unify adp5588-gpio and adp5588-keys common header defines (as per Andrew Morton request). For consistency, move remaining defines and prefix accordingly. No functional changes. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-01Linux 2.6.37-rc1Linus Torvalds1-2/+2
2010-11-01CRIS: Add paths for CRISv10 serial driverJesper Nilsson1-0/+1
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2010-11-01spi/pl022: fix erroneous platform data in U300Linus Walleij1-1/+1
This fixes an erroneous use of LSB first in the U300 machine, the PL022 used in U300 is a standard ARM core that doesn't support this bit so it should never have been set. Cc: Kevin Wells <wellsk40@gmail.com>OA Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>