aboutsummaryrefslogtreecommitdiff
path: root/drivers/input
AgeCommit message (Collapse)AuthorFilesLines
2013-07-01Input: tps6507x-ts - convert to polled input device infrastructureDmitry Torokhov1-78/+48
There is no need to roll our own polling scheme when we already have one implemented by the core. Tested-by: Manish Badarkhe <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-30Input: cyttsp4 - SPI driver for Cypress TMA4XX touchscreen devicesFerruh Yigit3-0/+215
Cypress TrueTouch(tm) Standard Product controllers, Generation4 devices, SPI adapter module. This driver adds communication support with TTSP controller using SPI bus. Signed-off-by: Ferruh Yigit <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Acked-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-30Input: cyttsp4 - I2C driver for Cypress TMA4XX touchscreen devicesFerruh Yigit3-0/+100
Cypress TrueTouch(tm) Standard Product controllers, Generation4 devices, I2C adapter module. This driver adds communication support with TTSP controller using I2C bus. Signed-off-by: Ferruh Yigit <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Acked-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-30Input: cyttsp4 - add core driver for Cypress TMA4XX touchscreen devicesFerruh Yigit4-0/+2654
Cypress TrueTouch(tm) Standard Product controllers, Generetion4 devices, Core driver. Core driver is interface between host and TTSP controller and processes data sent by controller. Responsibilities of module are IRQ handling, reading system information registers and sending multi-touch protocol type B events. Signed-off-by: Ferruh Yigit <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Acked-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-30Input: cyttsp - I2C driver split into two modulesFerruh Yigit6-74/+112
Existing I2C code is for TrueTouch Gen3 devices TrueTouch Gen4 device is using same protocol, will split driver into two pieces to use common code with both drivers. Read/Write functions parameter list modified, since shared code will be used by two separate drivers and these drivers are not sharing same structs, parameters updated to use common structures. Signed-off-by: Ferruh Yigit <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Acked-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-30Input: add OLPC AP-SP driverDaniel Drake3-0/+298
The OLPC XO-1.75 and XO-4 laptops include a PS/2 touchpad and an AT keyboard, yet they do not have a hardware PS/2 controller. Instead, a firmware runs on a dedicated core ("Security Processor", part of the SoC) that acts as a PS/2 controller through bit-banging. Communication between the main cpu (Application Processor) and the Security Processor happens via a standard command mechanism implemented by the SoC. Add a driver for this interface to enable keyboard/mouse input on this platform. Original author: Saadia Baloch Signed-off-by: Daniel Drake <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-28treewide: relase -> releaseGeert Uytterhoeven1-1/+1
Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-06-27Input: nspire-keypad - remove redundant dev_err call in nspire_keypad_probe()Wei Yongjun1-3/+1
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-27Merge branch 'for-next' of git://github.com/rydberg/linux into nextDmitry Torokhov15-92/+497
Pull in changes from Henrik: "a trivial MT documentation fix".
2013-06-25Input: tps6507x-ts - remove vref from platform dataDmitry Torokhov1-5/+0
Although defined in platform data, vref is not used anywhere. Also remove model, irq, and clear_penirq as they are not used either. Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-25Input: tps6507x-ts - use bool for booleansDmitry Torokhov1-7/+7
Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-25Input: tps6507x-ts - remove bogus unreachable codeAlan Cox1-20/+5
tsc->polling is write only and the poll local is meaningless Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-25Input: samsung-keypad - let device core setup the default pin configurationThomas Abraham1-50/+2
With device core now able to setup the default pin configuration, the pin configuration code based on the deprecated Samsung specific gpio bindings is removed. Signed-off-by: Thomas Abraham <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-23Merge branch 'for-linus' of ↵Linus Torvalds6-9/+27
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input subsystem updates from Dmitry Torokhov: "A few small fixups for cyttsp, wacom and xpad drivers" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: xpad - fix for "Mad Catz Street Fighter IV FightPad" controllers Input: wacom - add a new stylus (0x100802) for Intuos5 and Cintiqs Input: add missing dependencies on CONFIG_HAS_IOMEM Input: cyttsp - fix swapped mfg_stat and mfg_cmd registers Input: cyttsp - add missing handshake Input: cyttsp - fix memcpy size param
2013-06-23input: cros_ec_keyb_clear_keyboard() depends on CONFIG_PM_SLEEPGeert Uytterhoeven1-27/+27
If CONFIG_PM_SLEEP is not set: drivers/input/keyboard/cros_ec_keyb.c:211: warning: ‘cros_ec_keyb_clear_keyboard’ defined but not used Move the definition of cros_ec_keyb_clear_keyboard() inside the section protected by #ifdef CONFIG_PM_SLEEP to fix this. Signed-off-by: Geert Uytterhoeven <[email protected]> Acked-by: Simon Glass <[email protected]> Acked-by: Dmitry Torokhov <[email protected]>
2013-06-18Input: xpad - fix for "Mad Catz Street Fighter IV FightPad" controllersShawn Joseph1-1/+1
Added MAP_TRIGGERS_TO_BUTTONS for Mad Catz Street Fighter IV FightPad device. This controller model was already supported by the xpad driver, but none of the buttons work correctly without this change. Tested on kernel version 3.9.5. Signed-off-by: Shawn Joseph <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-18Input: wacom - add a new stylus (0x100802) for Intuos5 and CintiqsPing Cheng1-0/+2
Signed-off-by: Ping Cheng <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-18Input: wacom_i2c - implement hovering capabilityTatsunosuke Tobita1-4/+10
Although BTN_TOOL_PEN and BTN_TOOL_RUBBER functioned properly, the driver didn't have hover functionality, so it's been added. Also, "WACOM_RETRY_CNT" was not used, so it was removed. Signed-off-by: Tatsunosuke Tobita <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-18Input: pxa27x-keypad - make platform data constDmitry Torokhov1-24/+23
It should not be changed by the driver, so let's make it const pointer. Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-18Input: pxa27x-keypad - convert to using SIMPLE_DEV_PM_OPSDmitry Torokhov1-8/+5
Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-18Input: pxa27x-keypad - add device tree supportChao Xie1-4/+242
Signed-off-by: Chao Xie <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-18Input: pxa27x-keypad - use matrix_keymap for matrix keysChao Xie2-12/+24
pxa27x-keypad includes matrix keys. Make use of matrix_keymap for the matrix keys. Signed-off-by: Chao Xie <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-13Merge tag 'am335x_tsc-adc' of git://breakpoint.cc/bigeasy/linuxSamuel Ortiz1-85/+203
A complete refurbished series inclunding: - DT support for the MFD, TSC and ADC driver & platform device support, which has no users, has been killed. - iio_map from last series is gone and replaced by proper nodes in the device tree. - suspend fixes which means correct data structs are taken and no interrupt storm - fifo split which should problem with TSC & ADC beeing used at the same time - The ADC channels are now checked before blindly applied. That means the touch part reads X, Y and Z coordinates and does not mix them up. Same goes for the IIO ADC driver. - The IIO ADC driver now creates files named in_voltageX_raw where X represents the ADC line instead of a number starting at 0. A read from this file can return -EBUSY in case touch is busy and the ADC didn't collect a value.
2013-06-12input: ti_am335x_tsc: return IRQ_NONE if there was no IRQ for usSebastian Andrzej Siewior1-4/+6
The previous patch ("input/ti_am335x_tsc: ACK the HW_PEN irq in ISR") acked the interrupt so we don't freeze if we don't handle an enabled interrupt source. The interrupt core has a mechanism for this and to get it work one should only say that it handled an interrupt if it is actually the case. Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
2013-06-12input: ti_am335x_tsc: ACK the HW_PEN irq in ISRSebastian Andrzej Siewior1-0/+6
The interrupt source IRQENB_HW_PEN is enabled in suspend and suposed to be used as a wake up source. Once this interrupt source is unmaksed, the devices ends up in ISR and never continues. This change ACKs the interrupt and disables it so the system does not freeze. Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
2013-06-12input: ti_am335x_adc: use only FIFO0 and clean up a littleSebastian Andrzej Siewior1-37/+41
The driver programs a threshold of "coordinate_readouts" say 5. The REG_FIFO0THR registers says it should it be programmed to "threshold minus one". The driver does not expect just 5 coordinates but 5 * 2 + 2. Multiplied by two because 5 for X and 5 for Y and plus 2 because we have two Z. The whole thing kind of works because It reads the 5 coordinates for X and Y from FIFO0 and FIFO1 and the last element in each FIFO is ignored within the loop and read later. Nothing guaranties that FIFO1 is ready by the time it is read. In fact I could see that that FIFO1 reaturns for Y channels 8,9, 10, 12, 6 and for Y channel 7 for Z. The problem is that channel 7 and channel 12 got somehow mixed up. The other Problem is that FIFO1 is also used by the IIO part leading to wrong results if both (tsc & adc) are used. The patch tries to clean up the whole thing a little: - Remove the +1 and -1 in REG_STEPCONFIG, REG_STEPDELAY and its counter part in the for loop. This is just confusing. - Use only FIFO0 in TSC. The fifo has space for 64 entries so should be fine. - Read the whole FIFO in one function and check the channel. - in case we dawdle around, make sure we only read a multiple of our coordinate set. On the second interrupt we will cleanup the remaining enties. Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
2013-06-12mfd: input: ti_am335x_tsc: rename device from tsc to TI-am335x-tscSebastian Andrzej Siewior1-1/+1
tsc is a very generic name. This patch adds a TI and HW prefix to it less generic. Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
2013-06-12input: ti_am33x_tsc: remove platform_data supportSebastian Andrzej Siewior1-24/+1
This patch removes access to platform data mfd_tscadc_board because the platform is DT only. Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
2013-06-12input: ti_am33x_tsc: Add DT supportPatil, Rachna1-23/+82
This patch adds DT support to touch driver. It also provides a binding document which is used by the MFD and IIO part of the device. This patch also renames steps_to_configure to coordinate_readouts because the original name misleads the purpose of the variable. Signed-off-by: Pantelis Antoniou <[email protected]> Signed-off-by: Patil, Rachna <[email protected]> Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
2013-06-12input: ti_am33x_tsc: remove unwanted fifo flushPatil, Rachna1-10/+0
When touchscreen and ADC are used together, this unwanted fifo flush leads to loss of ADC data. Signed-off-by: Patil, Rachna <[email protected]> Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
2013-06-12input: ti_am33x_tsc: Order of TSC wires, made configurablePatil, Rachna1-16/+86
The current driver expected touchscreen input wires(XP,XN,YP,YN) to be connected in a particular order. Making changes to accept this as platform data. Sebastian reworked the original patch and removed a lot of the not required pieces. Signed-off-by: Patil, Rachna <[email protected]> Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
2013-06-12input: ti_am33x_tsc: Step enable bits made configurablePatil, Rachna1-2/+10
Current code has hard coded value written to step enable bits. Now the bits are updated based on how many steps are needed to be configured got from platform data. The user needs to take care not to exceed the count more than 16. While using ADC and TSC one should take care to set this parameter correctly. Sebastian added the common lock and moved the code, that manipulates the steps, from into the mfd module. Signed-off-by: Patil, Rachna <[email protected]> Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
2013-06-12mfd: input: iio: ti_am335x_adc: use one structure for ti_tscadc_devSebastian Andrzej Siewior1-7/+9
The mfd driver creates platform data for the child devices and it is the ti_tscadc_dev struct. This struct is copied for the two devices. The copy of the structure makes a common lock in this structure a little less usefull. Therefore the platform data is not a pointer to the structure and the same structure is used. While doing the change I noticed that the suspend/resume code assumes the wrong pointer for ti_tscadc_dev and this has been fixed as well. Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
2013-06-10Input: add missing dependencies on CONFIG_HAS_IOMEMBen Hutchings2-0/+2
Several drivers don't build on s390 with CONFIG_PCI disabled as they require MMIO functions. Signed-off-by: Ben Hutchings <[email protected]> Cc: [email protected] # 3.9 Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-09Input: evdev - flush queues during EVIOCGKEY-like ioctlsDavid Herrmann1-4/+129
If userspace requests current KEY-state, they very likely assume that no such events are pending in the output queue of the evdev device. Otherwise, they will parse events which they already handled via EVIOCGKEY(). For XKB applications this can cause irreversible keyboard states if a modifier is locked multiple times because a CTRL-DOWN event is handled once via EVIOCGKEY() and once from the queue via read(), even though it should handle it only once. Therefore, lets do the only logical thing and flush the evdev queue atomically during this ioctl. We only flush events that are affected by the given ioctl. This only affects boolean events like KEY, SND, SW and LED. ABS, REL and others are not affected as duplicate events can be handled gracefully by user-space. Note: This actually breaks semantics of the evdev ABI. However, investigations showed that userspace already expects the new semantics and we end up fixing at least all XKB applications. All applications that are aware of this race-condition mirror the KEY state for each open-file and detect/drop duplicate events. Hence, they do not care whether duplicates are posted or not and work fine with this fix. Also note that we need proper locking to guarantee atomicity and avoid dead-locks. event_lock must be locked before queue_lock (see input-core). However, we can safely release event_lock while flushing the queue. This allows the input-core to proceed with pending events and only stop if it needs our queue_lock to post new events. This should guarantee that we don't block event-dispatching for too long while flushing a single event queue. Signed-off-by: David Herrmann <[email protected]> Acked-by: Peter Hutterer <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-05Input: atmel_tsadcc - fix error handing with missing platform dataWei Yongjun1-4/+4
If pdata is NULL, atmel_tsadcc_probe() will release all the resources and return 0, but we need a error code is returned in this case. Fix to return -EINVAL and move the check for pdata to the begin of this function. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-05Input: cyttsp - fix swapped mfg_stat and mfg_cmd registersMatthias Kaehlcke1-1/+1
The command and status register in the driver were swapped with respect to the order specified in the datasheet (CY8CTMA140). Confirmed with Cypress that the order in the datasheet is correct. Signed-off-by: Matthias Kaehlcke <[email protected]> Acked-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-05Input: cyttsp - add missing handshakeFerruh Yigit1-6/+20
For the devices that has blocking with timeout communication, these extra handshakes will prevent one timeout delay in startup sequence Tested-by: Ferruh Yigit <[email protected]> on TMA300-DVK Signed-off-by: Ferruh Yigit <[email protected]> Acked-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-05Input: cyttsp - fix memcpy size paramFerruh Yigit1-1/+1
memcpy param is wrong because of offset in bl_cmd, this may corrupt the stack which may cause a crash. Tested-by: Ferruh Yigit <[email protected]> on TMA300-DVK Signed-off-by: Ferruh Yigit <[email protected]> Acked-by: Javier Martinez Canillas <[email protected]> Cc: [email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-05Merge branch 'for-linus' of ↵Linus Torvalds2-3/+7
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: "Just a 2 small driver fixups here" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: wacom - fix a typo for Cintiq 22HDT Input: synaptics - fix sync lost after resume on some laptops
2013-06-04Input: wacom - fix a typo for Cintiq 22HDTPing Cheng1-3/+5
And make the lines easier to read. Signed-off-by: Ping Cheng <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-04Input: synaptics - fix sync lost after resume on some laptopsEric Miao1-0/+2
In summary, the symptom is intermittent key events lost after resume on some machines with synaptics touchpad (seems this is synaptics _only_), and key events loss is due to serio port reconnect after psmouse sync lost. Removing psmouse and inserting it back during the suspend/resume process is able to work around the issue, so the difference between psmouse_connect() and psmouse_reconnect() is the key to the root cause of this problem. After comparing the two different paths, synaptics driver has its own implementation of synaptics_reconnect(), and the missing psmouse_probe() seems significant, the patch below added psmouse_probe() to the reconnect process, and has been verified many times that the issue could not be reliably reproduced. There are two PS/2 commands in psmouse_probe(): 1. PSMOUSE_CMD_GETID 2. PSMOUSE_CMD_RESET_DIS Only the PSMOUSE_CMD_GETID seems to be significant. The PSMOUSE_CMD_RESET_DIS is irrelevant to this issue after trying several times. So we have only implemented this patch to issue the PSMOUSE_CMD_GETID so far. Tested-by: Daniel Manrique <[email protected]> Signed-off-by: James M Leddy <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-04Input: add TI-Nspire keypad supportDaniel Tang3-0/+296
This is a driver for the keypads found on the TI-Nspire series calculators. Signed-off-by: Daniel Tang <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-02Input: sirfsoc_pwrc - add onkey input driver for CSR SiRFprimaII PWRCBinghua Duan3-0/+176
There is an embedded PWRC(power controller) in SiRFprimaII and SiRFatlasVI, we have an ONKEY button which can generate interrupt to IRQ controller. In a typical user scenarios, at the runtime, if users touch the key, we put system to s2ram status. Signed-off-by: Binghua Duan <[email protected]> Signed-off-by: Xianglong Du <[email protected]> Signed-off-by: Barry Song <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-05-28Input: xilinx_ps2 - remove redundant platform_set_drvdata()Sachin Kamat1-2/+0
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-05-28Input: pcspkr - remove redundant platform_set_drvdata()Sachin Kamat1-1/+0
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-05-28Input: m68kspkr - remove redundant platform_set_drvdata()Sachin Kamat1-1/+0
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-05-28Input: ixp4xx-beeper - remove redundant platform_set_drvdata()Sachin Kamat1-1/+0
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2013-05-23Merge branch 'for-linus' of ↵Linus Torvalds3-23/+69
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: "A few fixups to Wacom and eGalax touchscreen driver" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: wacom - add an eraser to DTH2242/DTK2241 Input: wacom - add a few new styli for Cintiq series Input: wacom - add three new display tablets Input: egalax_ts - ABS_MT_POSITION_Y not reported well
2013-05-23Input: navpoint - pass correct pointer to free_irq()Lars-Peter Clausen1-1/+1
free_irq() expects the same pointer that was passed to request_irq(), otherwise the IRQ is not freed. The issue was found using the following coccinelle script: <smpl> @r1@ type T; T devid; @@ request_irq(..., devid) @r2@ type r1.T; T devid; position p; @@ free_irq@p(..., devid) @@ position p != r2.p; @@ *free_irq@p(...) </smpl> Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>