aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-07-13Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds6-47/+152
Pull second round of input updates from Dmitry Torokhov: "An update to Elantech driver to support hardware v7, fix to the new cyttsp4 driver to use proper addressing, ads7846 device tree support and nspire-keypad got a small cleanup." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: nspire-keypad - replace magic offset with define Input: elantech - fix for newer hardware versions (v7) Input: cyttsp4 - use 16bit address for I2C/SPI communication Input: ads7846 - add device tree bindings Input: ads7846 - make sure we do not change platform data
2013-07-12Merge branch 'next' into for-linusDmitry Torokhov1-15/+108
Bring in second round of updates for 3.11.
2013-07-10Merge tag 'mfd-3.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-nextLinus Torvalds1-85/+203
Pull MFD update from Samuel Ortiz: "For the 3.11 merge we only have one new MFD driver for the Kontron PLD. But we also have: - Support for the TPS659038 PMIC from the palmas driver. - Intel's Coleto Creek and Avoton SoCs support from the lpc_ich driver. - RTL8411B support from the rtsx driver. - More DT support for the Arizona, max8998, twl4030-power and the ti_am335x_tsadc drivers. - The SSBI driver move under MFD. - A conversion to the devm_* API for most of the MFD drivers. - The twl4030-power got split from twl-core into its own module. - A major ti_am335x_adc cleanup, leading to a proper DT support. - Our regular arizona and wm* updates and cleanups from the Wolfson folks. - A better error handling and initialization, and a regulator subdevice addition for the 88pm80x driver. - A bulk platform_set_drvdata() call removal that's no longer need since commit 0998d0631001 ("device-core: Ensure drvdata = NULL when no driver is bound") * tag 'mfd-3.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next: (102 commits) mfd: sec: Provide max_register to regmap mfd: wm8994: Remove duplicate check for active JACKDET MAINTAINERS: Add include directory to MFD file patterns mfd: sec: Remove fields not used since regmap conversion watchdog: Kontron PLD watchdog timer driver mfd: max8998: Add support for Device Tree regulator: max8998: Use arrays for specifying voltages in platform data mfd: max8998: Add irq domain support regulator: palmas: Add TPS659038 support mfd: Kontron PLD mfd driver mfd: palmas: Add TPS659038 PMIC support mfd: palmas: Add SMPS10_BOOST feature mfd: palmas: Check if irq is valid mfd: lpc_ich: iTCO_wdt patch for Intel Coleto Creek DeviceIDs mfd: twl-core: Change TWL6025 references to TWL6032 mfd: davinci_voicecodec: Fix build breakage mfd: vexpress: Make the driver optional for arm and arm64 mfd: htc-egpio: Use devm_ioremap_nocache() instead of ioremap_nocache() mfd: davinci_voicecodec: Convert to use devm_* APIs mfd: twl4030-power: Fix relocking on error ...
2013-07-06Input: cyttsp4 - use 16bit address for I2C/SPI communicationFerruh Yigit5-32/+44
In TSG4, register map is 512bytes long and to access all of it, one bit from address byte is used (which bit to use differs for I2C and SPI); Since common code used for TSG3 and TSG4 for I2C, this parameter wrongly used as u8. TSG3 does not access beyond 255 bytes but TSG4 may. Tested-on:TMA3XX DVB && TMA4XX DVB Signed-off-by: Ferruh Yigit <fery@cypress.com> Acked-by: Javier Martinez Canillas <javier@dowhile0.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-07-04Input: cyttsp4 - kfree xfer_buf on error path in probe()Ferruh Yigit1-1/+3
If probe() fails after cd->xfer_buf allocated, it will not freed. Added kfree(cd->xfer_buf) with and error label. Signed-off-by: Ferruh Yigit <fery@cypress.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-07-02Input: tps6507x-ts - select INPUT_POLLDEVDmitry Torokhov1-0/+1
Since the driver was converted to polled device infrastructure we need to make sure it is enabled. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-07-02Input: ads7846 - add device tree bindingsDaniel Mack1-11/+104
Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-07-02Input: ads7846 - make sure we do not change platform dataDmitry Torokhov1-5/+5
Let's declare platform data a const pointer so that we don't accitentally change it. Also fetch it with dev_get_platdata(). Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-07-02Input: cyttsp4 - leak on error path in probe()Dan Carpenter1-3/+3
We leak "cd" if the cd->xfer_buf allocation fails. It was weird to "goto error_gpio_irq" so I changed the label name. (Label names should reflect the label location not the goto location otherwise you get an "all roads lead to Rome problem"). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-07-02Input: cyttsp4 - silence NULL dereference warningDan Carpenter1-5/+0
If "cd" were NULL then we would dereference it when we print the error message. Fortunately enough, it can't ever be NULL so we can remove those lines. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-07-02Input: cyttsp4 - silence shift wrap warningDan Carpenter1-1/+1
"*max" is a size_t (long) type but "1" is an int so static checkers complain that the shift could wrap. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-07-02Merge branch 'next' into for-linusDmitry Torokhov23-139/+3111
Prepare first set of updates for 3.11 merge window.
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 <badarkhe.manish@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
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 <fery@cypress.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Javier Martinez Canillas <javier@dowhile0.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
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 <fery@cypress.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Javier Martinez Canillas <javier@dowhile0.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
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 <fery@cypress.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Javier Martinez Canillas <javier@dowhile0.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
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 <fery@cypress.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Javier Martinez Canillas <javier@dowhile0.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-06-27Merge branch 'for-next' of git://github.com/rydberg/linux into nextDmitry Torokhov1-1/+1
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 <dmitry.torokhov@gmail.com>
2013-06-25Input: tps6507x-ts - use bool for booleansDmitry Torokhov1-7/+7
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
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 <alan@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
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 <tobita.tatsunosuke@wacom.co.jp> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
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 <bigeasy@linutronix.de>
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 <bigeasy@linutronix.de>
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 <dmitry.torokhov@gmail.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
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 <bigeasy@linutronix.de>
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 <dmitry.torokhov@gmail.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
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 <panto@antoniou-consulting.com> Signed-off-by: Patil, Rachna <rachna@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
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 <rachna@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
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 <rachna@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
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 <rachna@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
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 <bigeasy@linutronix.de>
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 <yongjun_wei@trendmicro.com.cn> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
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 <matthias@kaehlcke.net> Acked-by: Javier Martinez Canillas <javier@dowhile0.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
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 <fery@cypress.com> on TMA300-DVK Signed-off-by: Ferruh Yigit <fery@cypress.com> Acked-by: Javier Martinez Canillas <javier@dowhile0.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
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 <fery@cypress.com> on TMA300-DVK Signed-off-by: Ferruh Yigit <fery@cypress.com> Acked-by: Javier Martinez Canillas <javier@dowhile0.org> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-05-23Input: touchscreen - use platform_{get,set}_drvdata()Jingoo Han2-2/+2
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-05-08Input: w90p910_ts - 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 <sachin.kamat@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-05-05Input: tnetv107x-ts - 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 <sachin.kamat@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-05-05Input: ti_am335x_tsc - 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 <sachin.kamat@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-05-05Input: mc13783_ts - 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 <sachin.kamat@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-05-05Input: jornada720_ts - 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 <sachin.kamat@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-05-05Input: intel-mid-touch - 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 <sachin.kamat@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-05-05Input: da9052_tsi - 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 <sachin.kamat@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-05-05Input: atmel-wm97xx - 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 <sachin.kamat@linaro.org> Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-05-05Input: 88pm860x-ts - 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 <sachin.kamat@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-05-05Input: egalax_ts - move to devm_* functionsAndy Shevchenko1-39/+14
The usage of devm_* functions makes code cleaner and tidier. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-05-05Input: egalax_ts - ABS_MT_POSITION_Y not reported wellHeiko Abraham1-1/+1
The egalax_ts touchscreen modul not report ABS_MT_POSITION_Y proper. As result it may be, that upper software levels only receive x coordinates well. Signed-off-by: Heiko Abraham <abrahamh@web.de> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-04-15Input: st1232 - add reset pin handlingBastian Hecht1-4/+43
We add the possibility to hand over a GPIO number for the reset pin. This way we can remove existing board code that takes care of it and group this information properly in the platform data or in the device tree configuration. Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-04-15Input: st1232 - convert to devm_* infrastructureLaurent Pinchart1-22/+12
Use the devm_* managed functions to allocate resources. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>