aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/keyboard
AgeCommit message (Collapse)AuthorFilesLines
2010-01-31Input: add imx-keypad driver to support the IMX Keypad PortAlberto Panizzo3-0/+604
The IMX family of Application Processors is shipped with a Keypad Port supported by this driver. The peripheral can control up to an 8x8 matrix key pad where all the scanning is done via software. The hardware provides two interrupts: one for key presses (KDI) and one for all key releases (KRI). There is also a simple circuit for glitch reduction (said for synchronization) made by two series of 3 D-latches clocked by the keypad-clock that stabilize the interrupts sources. KDI and KRI are fired only if the respective conditions are maintained for at last 4 keypad-clock cycle. Since those circuits are poor for a correct debounce process (the keypad-clock frequency is 32K and bounces longer than 94us are not masked) the driver, when an interrupt arrives, samples the matrix with a period of 10ms until the readins are stable for IMX_KEYPAD_SCANS_FOR_STABILITY times (currently set at 3). After getting stable result appropriate events are sent through the input stack. If some keys are maintained pressed, the driver continues to scan the matrix with a longer period (60ms) to catch possible multiple key presses without overloading the cpu. This process ends when all keys are released. This driver is tested to build in kernel or as a module and follow the specification of Freescale Application processors: i.MX25 i.MX27 i.MX31 i.MX35 i.MX51 especially tested on i.MX31. Signed-off-by: Alberto Panizzo <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2010-01-21Merge commit 'v2.6.33-rc5' into nextDmitry Torokhov6-56/+70
2010-01-21Input: sh_keysc - add mode 4 and mode 5 supportMagnus Damm1-3/+3
Add Mode 4 and Mode 5 support to the SH_KEYSC driver. These modes allow slightly larger key pad matrixes. While at it, make use of resource_size(). Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2010-01-19Input: ADP5588 - add support for ADP5587 devicesMichael Hennerich2-4/+6
The ADP5587 is quite similar to the ADP5588 but features a greater I/O voltage range and lacks the Dual Light Sensor Interface. This new part is also supported by this driver. Signed-off-by: Michael Hennerich <[email protected]> Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2010-01-15Merge branch 'for-linus' of ↵Linus Torvalds2-36/+41
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: sentelic - fix left/right horizontal scroll mapping Input: pmouse - move Sentelic probe down the list Input: add compat support for sysfs and /proc capabilities output Input: i8042 - add Dritek quirk for Acer Aspire 5610. Input: xbox - do not use GFP_KERNEL under spinlock Input: psmouse - fix Synaptics detection when protocol is disabled Input: bcm5974 - report ABS_MT events Input: davinci_keyscan - add device_enable method to platform data Input: evdev - be less aggressive about sending SIGIO notifies Input: atkbd - fix canceling event_work in disconnect Input: serio - fix potential deadlock when unbinding drivers Input: gf2k - fix &&/|| confusion in gf2k_connect()
2010-01-13Input: ep93xx_keypad - cleanup and use matrix_keypad helpersH Hartley Sweeten1-25/+15
Use struct matrix_keymap_data to supply the keymap from the platform code and matrix_keypad_build_keymap() to initialize the keymap. Signed-off-by: H Hartley Sweeten <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2010-01-09Input: make i2c device ids constantMárton Németh1-1/+1
The id_table field of the struct i2c_driver is defined as constant in <linux/i2c.h> so it makes sense to mark the initialization data also constant. Signed-off-by: Márton Németh <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2010-01-06Input: atkbd - switch to dev_err() and friendsDmitry Torokhov1-137/+146
dev_err(), dev_warn() and dev_dbg() ensure consistency in driver messages. Also switch to using bool where appropriate and fix some formatting issues. Signed-off-by: Dmitry Torokhov <[email protected]>
2010-01-06Input: davinci_keyscan - add device_enable method to platform dataMiguel Aguilar1-0/+8
Add a function pointer in the platform data of the DaVinci Keyscan driver called device_enable, in order to perform board specific actions when the device is initialized, like setup the PINMUX configuration. Signed-off-by: Miguel Aguilar <[email protected]> Signed-off-by: Kevin Hilman <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2010-01-06Input: atkbd - fix canceling event_work in disconnectDmitry Torokhov1-2/+8
We need to first unregister input device and only then cancel event work since events can arrive (and cause event work to get scheduled again) until input_unregister_device() returns. Signed-off-by: Dmitry Torokhov <[email protected]>
2010-01-06Input: serio - fix potential deadlock when unbinding driversEric W. Biederman1-34/+25
sysfs_remove_group() waits for sysfs attributes to be removed, therefore we do not need to worry about driver-specific attributes being accessed after driver has been detached from the device. In fact, attempts to take serio->drv_mutex in attribute methods may lead to the following deadlock: sysfs_read_file() fill_read_buffer() sysfs_get_active_two() psmouse_attr_show_helper() serio_pin_driver() serio_disconnect_driver() mutex_lock(&serio->drv_mutex); <--------> mutex_lock(&serio_drv_mutex); psmouse_disconnect() sysfs_remove_group(... psmouse_attr_group); .... sysfs_deactivate(); wait_for_completion(); Fix this by removing calls to serio_[un]pin_driver() and functions themselves and using driver-private mutexes to serialize access to attribute's set() methods that may change device state. Signed-off-by: Eric W. Biederman <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2009-12-31Merge branch 'for-linus' of ↵Linus Torvalds3-18/+27
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: iforce - wait for command completion when closing the device Input: twl4030-pwrbutton - switch to using threaded IRQ Input: twl4030_keypad - switch to using threaded IRQ Input: lifebook - add CONFIG_DMI dependency Input: wistron - fix test for CONFIG_PM Input: psmouse - fix compile warning in hgpk module Input: matrix-keypad - handle cases when GPIOs can't be wakeup sources Input: iforce - fix oops on device disconnect Input: ff-memless - add notion of direction to for rumble effects Input: ff-memless - another fix for signed to unsigned overflow Input: ff-memless - start playing FF effects immediately Input: serio - do not mark kseriod freezable anymore Input: speed up suspend/shutdown for PS/2 mice and keyboards
2009-12-29Input: twl4030_keypad - switch to using threaded IRQFelipe Balbi1-9/+2
Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2009-12-24Input: matrix-keypad - handle cases when GPIOs can't be wakeup sourcesDmitry Torokhov1-7/+22
On certain boards not all GPIOs may be used as wakeup sources, in which case some of enable_irq_wake() calls will fail. On resume calling disable_irq_wake() will warn about unbalanced IRQ wake disable. Solve this by checking whether enable_irq_wake() succeeded or not and no not call disable_irq_wake() for these GPIOs/IRQs that have not been enabled. Reported-by: Pavel Machek <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2009-12-24Input: speed up suspend/shutdown for PS/2 mice and keyboardsDmitry Torokhov1-2/+3
Instead of doing full-blown reset while suspending or shutting down the box use lighter form of reset that should take less time. Tested-by: Alan Stern <[email protected]> Tested-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2009-12-16Merge branch 'for-linus' of ↵Linus Torvalds1-101/+49
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: (22 commits) Input: ALPS - add interleaved protocol support (Dell E6x00 series) Input: keyboard - don't override beep with a bell Input: altera_ps2 - fix test of unsigned in altera_ps2_probe() Input: add mc13783 touchscreen driver Input: ep93xx_keypad - update driver to new core support Input: wacom - separate pen from express keys on Graphire Input: wacom - add defines for data packet report IDs Input: wacom - add support for new LCD tablets Input: wacom - add defines for packet lengths of various devices Input: wacom - ensure the device is initialized properly upon resume Input: at32psif - do not sleep in atomic context Input: i8042 - add Gigabyte M1022M to the noloop list Input: i8042 - allow installing platform filters for incoming data Input: i8042 - fix locking in interrupt routine Input: ALPS - do not set REL_X/REL_Y capabilities on the touchpad Input: document use of input_event() function Input: sa1111ps2 - annotate probe() and remove() methods Input: ambakmi - annotate probe() and remove() methods Input: gscps2 - fix probe() and remove() annotations Input: altera_ps2 - add annotations to probe and remove methods ...
2009-12-15Input: ep93xx_keypad - update driver to new core supportH Hartley Sweeten1-101/+49
This driver was merged before the ep93xx core support was added for the keypad clock and acquiring/releasing the necessary gpio's. Now that the proper support is in the ep93xx core this driver needs to be updated to work correctly. Summary of changes: 1) Remove some unused members from the platform data. 2) Remove the custom KEY macro and use the ones available in <linux/input/matrix_keypad.h> 3) Remove the keypad_{readl/writel} macros and just use __raw_{readl/writel} directly. 4) Update the clk_set_rate() call to work with the core support. 5) Cleanup the probe routine and remove some unneeded messages. 6) Use the ep93xx core functions to acquire and release the gpio's. 7) Fix the clk_get() call to get the keypad clock. Signed-off-by: H Hartley Sweeten <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2009-12-15const: constify remaining dev_pm_opsAlexey Dobriyan2-2/+2
Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-12-13mfd: Rename all twl4030_i2c*Balaji T K1-2/+2
This patch renames function names like twl4030_i2c_write_u8, twl4030_i2c_read_u8 to twl_i2c_write_u8, twl_i2c_read_u8 and also common variable in twl-core.c Signed-off-by: Rajendra Nayak <[email protected]> Signed-off-by: Balaji T K <[email protected]> Signed-off-by: Santosh Shilimkar <[email protected]> Acked-by: Kevin Hilman <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Rename twl4030* driver files to enable re-useSantosh Shilimkar1-1/+1
The upcoming TWL6030 is companion chip for OMAP4 like the current TWL4030 for OMAP3. The common modules like RTC, Regulator creates opportunity to re-use the most of the code from twl4030. This patch renames few common drivers twl4030* files to twl* to enable the code re-use. Signed-off-by: Rajendra Nayak <[email protected]> Signed-off-by: Balaji T K <[email protected]> Signed-off-by: Santosh Shilimkar <[email protected]> Acked-by: Kevin Hilman <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13input/keyboard: new driver for ADP5520 MFD PMICsMichael Hennerich3-0/+231
Signed-off-by: Michael Hennerich <[email protected]> Signed-off-by: Bryan Wu <[email protected]> Signed-off-by: Mike Frysinger <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-09Merge branch 'for-linus' of ↵Linus Torvalds7-335/+686
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: (51 commits) Input: appletouch - give up maintainership Input: dm355evm_kbd - switch to using sparse keymap library Input: wistron_btns - switch to using sparse keymap library Input: add generic support for sparse keymaps Input: fix memory leak in force feedback core Input: wistron - remove identification strings from DMI table Input: psmouse - remove identification strings from DMI tables Input: atkbd - remove identification strings from DMI table Input: i8042 - remove identification strings from DMI tables DMI: allow omitting ident strings in DMI tables Input: psmouse - do not carry DMI data around Input: matrix-keypad - switch to using dev_pm_ops Input: keyboard - fix lack of locking when traversing handler->h_list Input: gpio_keys - scan gpio state at probe and resume time Input: keyboard - add locking around event handling Input: usbtouchscreen - add support for ET&T TC5UH touchscreen controller Input: xpad - add two new Xbox 360 devices Input: polled device - do not start polling if interval is zero Input: polled device - schedule first poll immediately Input: add S3C24XX touchscreen driver ...
2009-12-09Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6Linus Torvalds1-1/+1
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (137 commits) sh: include empty zero page in romImage sh: Make associative cache writes fatal on all SH-4A parts. sh: Drop associative writes for SH-4 cache flushes. sh: Partial revert of copy/clear_user_highpage() optimizations. sh: Add default uImage rule for se7724, ap325rxa, and migor. sh: allow runtime pm without suspend/resume callbacks sh: mach-ecovec24: Remove un-defined settings for VPU sh: mach-ecovec24: LCDC drive ability become high sh: fix sh7724 VEU3F resource size serial: sh-sci: Fix too early port disabling. sh: pfc: pr_info() -> pr_debug() cleanups. sh: pfc: Convert from ctrl_xxx() to __raw_xxx() I/O routines. sh: Improve kfr2r09 serial port setup code sh: Break out SuperH PFC code sh: Move KEYSC header file sh: convert /proc/cpu/aligmnent, /proc/cpu/kernel_alignment to seq_file sh: Add CPG save/restore code for sh7724 R-standby sh: Add SDHI power control support to Ecovec mfd: Add power control platform data to SDHI driver sh: mach-ecovec24: modify address map ...
2009-12-04Input: atkbd - remove identification strings from DMI tableDmitry Torokhov1-17/+9
The driver does not reference identification strings in DMI table and since these strings are no longer required by DMI core we can safely remove them and save some memory. Signed-off-by: Dmitry Torokhov <[email protected]>
2009-12-03Input: matrix-keypad - switch to using dev_pm_opsDmitry Torokhov1-7/+10
Acked-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2009-12-02Merge commit 'v2.6.32' into nextDmitry Torokhov1-0/+13
2009-11-30Input: gpio_keys - scan gpio state at probe and resume timeDaniel Mack1-11/+25
We need to read and report gpio state when we bind the driver to the device and upon resume so that userspace has correct state of the switches (and keys but they are less important since, even if they are happened to be pressed, we'd expect them to be released fairly soon). Signed-off-by: Daniel Mack <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2009-11-30sh: Move KEYSC header fileMagnus Damm1-1/+1
This patch moves the KEYSC header file from the SuperH specific asm directory to a place where it can be shared by multiple architectures. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-11-22Merge 7xx-iosplit-plat-merge with omap-fixesTony Lindgren1-3/+3
Merge branch '7xx-iosplit-plat-merge' into omap-for-linus
2009-11-20Input: gpio_keys - seperate individual button setup to make code neaterBen Dooks1-40/+53
Move the code that deals with setting up each individual button out into a new function to reduce the indentation and allow us to common up some of the error recovery code. Signed-off-by: Ben Dooks <[email protected]> Signed-off-by: Simtec Linux Team <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2009-11-20Input: gpio_keys - use <linux/gpio.h> instead of <asm/gpio.h>Ben Dooks1-2/+1
The gpio keys driver should be using <linux/gpio.h> instead of <asm/gpio.h> Signed-off-by: Ben Dooks <[email protected]> Signed-off-by: Simtec Linux Team <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2009-11-20Input: gpio_keys - use dev_ macros to report informationBen Dooks1-7/+9
The gpio_keys driver is binding to a platform device but using pr_err() to report errors. Change to using dev_err() so that all messages are prefixed by the device name. Signed-off-by: Ben Dooks <[email protected]> Signed-off-by: Simtec Linux Team <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2009-11-12Input: atkbd - restore LED state at reconnectDmitry Torokhov1-0/+13
Even though input core tells us to restore LED state and repeat rate at resume keyboard may be reconnected either by request from userspace (via sysfs) or just by pulling it from the box and plugging it back in. In these cases we still need to restore state ourselves. Signed-off-by: Dmitry Torokhov <[email protected]>
2009-11-10Merge branch '7xx-iosplit-plat' with omap-fixesTony Lindgren1-3/+3
2009-11-05Merge commit 'v2.6.32-rc6' into nextDmitry Torokhov2-41/+92
2009-11-02Input: gpio-keys - use IRQF_SHAREDDmitry Eremin-Solenikov1-0/+1
There is nothing that disallows gpio-keys to share it's IRQ line w/ other drivers. Make it use IRQF_SHARED in request_irq(). An example of other driver with which I'd like to share IRQ line for GPIO buttons is ledtrig-gpio. Signed-off-by: Dmitry Eremin-Solenikov <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2009-11-02Merge commit 'v2.6.32-rc5' into for-linusDmitry Torokhov5-12/+17
2009-10-21Input: atkbd - add a quirk for OQO 01+ multimedia keysJamie Lentin1-0/+36
OQO 01+ multimedia keys produce 6x on press, e0 6x upon release. As a result, Linux thinks that another key has been pressed (or is repeating), when it is actually a release of the same key. Mangle the release scancode when running on OQO so that driver recognizes it as such. Since the device does not have external PS/2 ports mangling is safe since there is no chance that an external keyboard is connected. Signed-off-by: Jamie Lentin <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2009-10-20omap: headers: Move remaining headers from include/mach to include/platTony Lindgren1-3/+3
Move the remaining headers under plat-omap/include/mach to plat-omap/include/plat. Also search and replace the files using these headers to include using the right path. This was done with: #!/bin/bash mach_dir_old="arch/arm/plat-omap/include/mach" plat_dir_new="arch/arm/plat-omap/include/plat" headers=$(cd $mach_dir_old && ls *.h) omap_dirs="arch/arm/*omap*/ \ drivers/video/omap \ sound/soc/omap" other_files="drivers/leds/leds-ams-delta.c \ drivers/mfd/menelaus.c \ drivers/mfd/twl4030-core.c \ drivers/mtd/nand/ams-delta.c" for header in $headers; do old="#include <mach\/$header" new="#include <plat\/$header" for dir in $omap_dirs; do find $dir -type f -name \*.[chS] | \ xargs sed -i "s/$old/$new/" done find drivers/ -type f -name \*omap*.[chS] | \ xargs sed -i "s/$old/$new/" for file in $other_files; do sed -i "s/$old/$new/" $file done done for header in $(ls $mach_dir_old/*.h); do git mv $header $plat_dir_new/ done Signed-off-by: Tony Lindgren <[email protected]>
2009-10-18Input: atkbd - consolidate force release quirks for volume keysHerton Ronaldo Krzesinski1-37/+14
Some machines share same key list for volume up/down release key quirks, use only one key list. Signed-off-by: Herton Ronaldo Krzesinski <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2009-10-14Input: atkbd - postpone restoring LED/repeat rate at resumeDmitry Torokhov1-4/+15
We need to postpone restoring LED state and typematic settings until keyboard is finished reconnecting upon resume. Normally driver core and PM infrastructure takes care of proper ordering and dependencies, but or case actual reconnect is done asynchronously from kseriod. So while driver core thinks that keyboard was resumed and it is time to let input core run it's resume handlers in reality keyboard is not ready yet. The solution is to keep rescheduling work that adjusts LED and rate settings until keyboard is fully enabled. Reported-by: Carlos R. Mafra <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2009-10-13Input: add DaVinci Keypad DriverMiguel Aguilar3-0/+348
This driver enables keypad support on DaVinci platforms. DM365 is the only platform that uses this driver at the moment. Signed-off-by: Miguel Aguilar <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2009-10-13Input: lkkbd - change formatting style to match the rest of the kernelDmitry Torokhov1-258/+238
- no spaces between function name and opening parenthesis - switch statements were indented too much This makes checkpatch (and me) happy. Signed-off-by: Dmitry Torokhov <[email protected]>
2009-10-13Input: atkbd - restore resetting LED state at startupDmitry Torokhov1-0/+26
Fix breakage caused by commit 9605fb48e1998935a5ee70c965f90ad1ac023add While the input core indeed takes care of restoring led state and typematic settings upon resume the driver still need to initialize them properly when registering a new device Reported-and-tested-by: Marin Mitov <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2009-10-11headers: remove sched.h from interrupt.hAlexey Dobriyan2-0/+2
After m68k's task_thread_info() doesn't refer to current, it's possible to remove sched.h from interrupt.h and not break m68k! Many thanks to Heiko Carstens for allowing this. Signed-off-by: Alexey Dobriyan <[email protected]>
2009-09-23Merge branch 'for-linus' of ↵Linus Torvalds7-25/+1312
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: add driver for Atmel AT42QT2160 Sensor Chip Input: max7359 - use threaded IRQs Input: add driver for Maxim MAX7359 key switch controller Input: add driver for ADP5588 QWERTY I2C Keypad Input: add touchscreen driver for MELFAS MCS-5000 controller Input: add driver for OpenCores Keyboard Controller Input: dm355evm_keys - remove dm355evm_keys_hardirq Input: synaptics_i2c - switch to using __cancel_delayed_work() Input: ad7879 - add support for AD7889 Input: atkbd - rely on input core to restore state on resume Input: add generic suspend and resume for input devices Input: libps2 - additional locking for i8042 ports
2009-09-22Input: add driver for Atmel AT42QT2160 Sensor ChipRaphael Derosso Pereira3-0/+408
This version only supports individual cells (no slide support yet). The code has been tested on proprietary development ARM board, but should work fine on other machines. Signed-off-by: Raphael Derosso Pereira <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2009-09-21Input: max7359 - use threaded IRQsDmitry Torokhov1-35/+13
Convert max7359 driver to use IRQ threading instead of using workqueue. Tested-by: Joonyoung Shim <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2009-09-21Input: add driver for Maxim MAX7359 key switch controllerKim Kyuwon3-0/+364
The Maxim MAX7359 is a I2C interfaced key switch controller which provides microprocessors with management of up to 64 key switches. This patch adds support for the MAX7359 key switch controller. Signed-off-by: Kim Kyuwon <[email protected]> Reviewed-by: Trilok Soni <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2009-09-21trivial: fix typo s/ketymap/keymap/ in commentThadeu Lima de Souza Cascardo1-1/+1
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>