aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen
AgeCommit message (Collapse)AuthorFilesLines
2011-03-16Input: tsc2005 - add open/closeDmitry Torokhov1-94/+124
Introduce open and close methods for the input device to keep the device powered down when it is not in use. Also rework interaction between interrupt thread and starting/shutting off/resetting the device: instead of taking a mutex in the intterrupt thread and elsewhere disable interrupts before transitioning the device in a new state. The ESD handling is also separated from the IRQ thread; we poll regularly at a given interval and simply skip reads if we see that valid interrupt happened not so long ago. This allows us not cancel and reschedule ESD work from interrupt context all the time. Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-03-16Input: tsc2005 - handle read errors from SPI layerDmitry Torokhov1-19/+81
Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-03-16Input: tsc2005 - do not rearm timer in hardirq handlerDmitry Torokhov1-13/+1
We will most likely rearm it yet again the IRQ thread so doing it here is pointless. Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-03-16Input: tsc2005 - don't use work for 'pen up' handlingDmitry Torokhov1-31/+27
We do not need process context to send input events so let's switch to a regular timer. I am going to get rid of taking ts->mutex in tsc2005_irq_thread() later. Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-03-16Input: tsc2005 - do not use 0 in place of NULLDmitry Torokhov1-20/+16
Sparse in unhappy when people use 0 instead of NULL for pointers so let's rework the way we initialize spi_transfer structure in tsc2005_cmd() and tsc2005_write(). Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-03-16Input: tsc2005 - use true/false for boolean variablesDmitry Torokhov1-12/+13
Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-03-16Input: tsc2005 - hide selftest attribute if we can't resetDmitry Torokhov1-18/+28
If implementation to perform self-test/reset has not been provided by the platform code hide 'selftest' sysfs attribute instead of returning error when someone tries to use it. Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-03-16Input: tsc2005 - rework driver initialization codeDmitry Torokhov1-110/+105
We need to make sure we have time/work initialized before requesting and enabling interrupts, otherwise we might start using them way too early. Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-03-16Input: tsc2005 - set up bus type in input deviceDmitry Torokhov1-0/+1
We know what bus we are residing on (SPI) so let's make this data available to the users. Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-03-16Input: tsc2005 - set up parent deviceDmitry Torokhov1-0/+1
Set up SPI device as parent of the input device so it gets placed into proper place in sysfs tree. Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-03-16Input: tsc2005 - clear driver data after unbindingDmitry Torokhov1-1/+4
We should not leave garbage pointers in driver structure after we unbind it from the device or if bind fails. Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-03-16Input: tsc2005 - add module descriptionDmitry Torokhov1-0/+1
Add proper module description so that it would show in 'modinfo' output. Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-03-16Input: tsc2005 - remove driver banner messageDmitry Torokhov1-1/+0
The boot process is noisy as it is and input core already announces all new device so let's get rid of the banner message in the driver. Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-03-16Input: tsc2005 - remove incorrect module aliasDmitry Torokhov1-1/+0
TSC2005 is not a platform driver so it should not define "platform:tsc2005" module alias. Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-03-16Input: tsc2005 - convert to using dev_pm_opsDmitry Torokhov1-12/+12
Newer code should not be using legacy suspend/resume methods but rather supply dev_pm_ops structure as it allows better control over power management. Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-03-16Input: tsc2005 - use spi_get/set_drvdata()Dmitry Torokhov1-7/+12
Instead of peeking into underlying device and using dev_get/set_drvdata(), let's use SPI layer's implementation to access driver-private data (which may be different from driver-core private data). Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-03-16Input: introduce tsc2005 driverLauri Leukkunen3-0/+725
Discussions: http://www.mail-archive.com/[email protected]/msg26748.html Introduce a driver for the Texas Instruments TSC2005 touchscreen controller (http://focus.ti.com/docs/prod/folders/print/tsc2005.html). The patch is based on a driver by Lauri Leukkunen, with modifications by David Brownell, Phil Carmody, Imre Deak, Hiroshi DOYU, Ari Kauppi, Tony Lindgren, Jarkko Nikula, Eero Nurkkala and Roman Tereshonkov. Signed-off-by: Lauri Leukkunen <[email protected]> [[email protected]: patch description, rebasing & cleanup] Signed-off-by: Aaro Koskinen <[email protected]> [[email protected]: various fixes] Signed-off-by: Srikar <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-03-14Input: atmel_mxt_ts - add objects of mXT1386 chipJoonyoung Shim1-0/+8
Atmel mXT1386 chip is operated by atmel_mxt_ts driver and it has some different objects. Signed-off-by: Joonyoung Shim <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-03-14Input: atmel_mxt_ts - remove firmware version checkJoonyoung Shim1-16/+5
Atmel touchscreen chips have different firmware version with each chip, so we cannot distinguish attribute of chip by firmware version. Signed-off-by: Joonyoung Shim <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-03-14Input: wm831x-ts - ensure the controller is in a known state on openMark Brown1-1/+3
Explicitly set all the enable bits when opening the device just in case something left the device in an unexpected state. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-03-12Input: wm831x-ts - default pressure measurements onMark Brown1-1/+4
tslib expects pressure measurements so enable them by default for better compatibility. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-02-25Input: atmel_mxt_ts - remove matrix size checkIiro Valkonen1-73/+0
The mxt_check_matrix_size() is currently setting the CTE mode to match xline/yline information that is in the platform data, but it does not take into account for example the fact that we could have a key array in use too (key array would use some x/y lines as well). It would be better to simply rely on the configuration data, and make sure that the CTE mode set in there matches the touch object (touchscreen, key array, proximity) configuration (which are set in the config data too). Signed-off-by: Iiro Valkonen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-02-21Input: atmel_mxt_ts - allow board code to specify IRQ flagsIiro Valkonen1-3/+4
Different board have different requirements/setups so let's be more flexible. Signed-off-by: Iiro Valkonen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-02-21Input: atmel_mxt_ts - allow board code to suppliy controller configIiro Valkonen1-135/+13
As there is no common configuration settings that would work in every situation, remove the fixed config data from driver code and add config data to platform data. Signed-off-by: Iiro Valkonen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-02-21Input: atmel_mxt_ts - add mXT224 identifier to id_tableChris Leech1-0/+1
"mXT224" is used in the Intel mid firmware in SFI tables to identify the presence of this I2C device. Signed-off-by: Chris Leech <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-02-21Input: atmel_mxt_ts - read whole message to make CHG lowIiro Valkonen1-3/+3
Read the whole message, as reading just the first byte isn't always guaranteed to clear the message. Signed-off-by: Iiro Valkonen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-02-21Input: atmel_mxt_ts - get rid of qt602240 prefixes in namesIiro Valkonen1-464/+465
Change prefixes from qt602240 to mxt to reflect that the driver supports whole line of mXT touchscreens. Signed-off-by: Iiro Valkonen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-02-21Input: qt602240_ts - rename to atmel_mxt_tsDmitry Torokhov3-14/+14
Since the driver will be supporting whole range of Atmels mXT touchscreen controllers we better rename it to atmel_mxt_ts. Acked-by: Iiro Valkonen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-02-21Merge branch 'master' into for-2.6.39Tejun Heo4-23/+72
2011-02-15Merge branch 'for-linus' of ↵Linus Torvalds2-18/+33
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: matrix_keypad - increase the limit of rows and columns Input: wacom - fix error path in wacom_probe() Input: ads7846 - check proper condition when freeing gpio Revert "Input: do not pass injected events back to the originating handler" Input: sysrq - rework re-inject logic Input: serio - clear pending rescans after sysfs driver rebind Input: rotary_encoder - use proper irqflags Input: wacom_w8001 - report resolution to userland
2011-02-11Input: ads7846 - check proper condition when freeing gpioDmitry Torokhov1-16/+22
When driver uses custom pendown detection method gpio_pendown is not set up and so we should not try to free it, otherwise we are presented with: ------------[ cut here ]------------ WARNING: at drivers/gpio/gpiolib.c:1258 gpio_free+0x100/0x12c() Modules linked in: [<c0061208>] (unwind_backtrace+0x0/0xe4) from [<c0091f58>](warn_slowpath_common+0x4c/0x64) [<c0091f58>] (warn_slowpath_common+0x4c/0x64) from [<c0091f88>](warn_slowpath_null+0x18/0x1c) [<c0091f88>] (warn_slowpath_null+0x18/0x1c) from [<c024e610>](gpio_free+0x100/0x12c) [<c024e610>] (gpio_free+0x100/0x12c) from [<c03e9fbc>](ads7846_probe+0xa38/0xc5c) [<c03e9fbc>] (ads7846_probe+0xa38/0xc5c) from [<c02cff14>](spi_drv_probe+0x18/0x1c) [<c02cff14>] (spi_drv_probe+0x18/0x1c) from [<c028bca4>](driver_probe_device+0xc8/0x184) [<c028bca4>] (driver_probe_device+0xc8/0x184) from [<c028bdc8>](__driver_attach+0x68/0x8c) [<c028bdc8>] (__driver_attach+0x68/0x8c) from [<c028b4c8>](bus_for_each_dev+0x48/0x74) [<c028b4c8>] (bus_for_each_dev+0x48/0x74) from [<c028ae08>](bus_add_driver+0xa0/0x220) [<c028ae08>] (bus_add_driver+0xa0/0x220) from [<c028c0c0>](driver_register+0xa8/0x134) [<c028c0c0>] (driver_register+0xa8/0x134) from [<c0050550>](do_one_initcall+0xcc/0x1a4) [<c0050550>] (do_one_initcall+0xcc/0x1a4) from [<c00084e4>](kernel_init+0x14c/0x214) [<c00084e4>] (kernel_init+0x14c/0x214) from [<c005b494>](kernel_thread_exit+0x0/0x8) ---[ end trace 4053287f8a5ec18f ]--- Also rearrange ads7846_setup_pendown() to have only one exit point returning success. Reported-by: Sourav Poddar <[email protected]> Acked-by: Wolfram Sang <[email protected]> Reviewed-by: Charulatha V <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-01-31Input: wacom_w8001 - report resolution to userlandPing Cheng1-2/+11
Serial devices send both pen and touch data through the same logical port. Since we scaled touch to pen maximum, we use pen resolution for touch as well here. This is under the assumption that pen and touch share the same physical surface. In the case when a small physical dimensional difference occurs between pen and touch, we assume the tolerance for touch point precision is higher than pen and the difference is within touch point tolerance. A per-MT tool based resolution mechanism should be introduced if the above assumption does not hold true for the pen and touch devices any more. Signed-off-by: Ping Cheng <[email protected]> Reviewed-by: Henrik Rydberg <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-01-31Merge commit 'v2.6.38-rc3' into nextDmitry Torokhov4-20/+55
2011-01-31Input: wm831x-ts - remove use of ternary operatorMark Brown1-5/+13
While being applied the driver was modified to add use of the ternary operator. Write the conditionals out longhand as I find it terribly unhelpful for legibility. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-01-30Input: wm831x - add driver for Wolfson WM831x PMIC touchscreen controllersMark Brown3-0/+366
Some of the WM831x series of PMICs from Wolfson Microelectronics include a resistive touchscreen controller. Implement support for these controllers within the input API. Platform data is supported to allow configuration of system parameters such as selection between four and five wire touchscreens and for specification of optional direct to CPU IRQs for sample availability and for pen down. Use of this feature for at least the data IRQ is strongly recommended. Thanks to Julien Boibessot for extensive testing and detailed feedback. Signed-off-by: Mark Brown <[email protected]> Tested-by: Julien Boibessot <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-01-26input/tps6507x-ts: use system_wq instead of dedicated workqueueTejun Heo1-8/+4
With cmwq, there's no reason to use a separate workqueue. Drop tps6507x_ts->wq and use system_wq instead. Signed-off-by: Tejun Heo <[email protected]> Acked-by: Todd Fischer<[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Cc: [email protected] Cc: Dan Carpenter <[email protected]>
2011-01-26Merge branch 'for-linus' of ↵Linus Torvalds2-5/+39
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: wacom - pass touch resolution to clients through input_absinfo Input: wacom - add 2 Bamboo Pen and touch models Input: sysrq - ensure sysrq_enabled and __sysrq_enabled are consistent Input: sparse-keymap - fix KEY_VSW handling in sparse_keymap_setup Input: tegra-kbc - add tegra keyboard driver Input: gpio_keys - switch to using request_any_context_irq Input: serio - allow registered drivers to get status flag Input: ct82710c - return proper error code for ct82c710_open Input: bu21013_ts - added regulator support Input: bu21013_ts - remove duplicate resolution parameters Input: tnetv107x-ts - don't treat NULL clk as an error Input: tnetv107x-keypad - don't treat NULL clk as an error Fix up trivial conflicts in drivers/input/keyboard/Makefile due to additions of tc3589x/Tegra drivers
2011-01-20Input: ads7846 - convert to dev_pm_opsMark Brown1-6/+10
There is a move to deprecate bus-specific PM operations and move to using dev_pm_ops instead in order to reduce the amount of boilerplate code in buses and facilitate updates to the PM core. Do this move for the ads7846 driver. Signed-off-by: Mark Brown <[email protected]> Acked-by: Michael Hennerich <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-01-20Input: ad7879 - convert SPI to dev_pm_opsMark Brown1-8/+9
There is a move to deprecate bus-specific PM operations and move to using dev_pm_ops instead in order to reduce the amount of boilerplate code in buses and facilitate updates to the PM core. Do this move for the ad7879 SPI driver. Signed-off-by: Mark Brown <[email protected]> Acked-by: Michael Hennerich <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-01-20Input: ad7877 - convert to dev_pm_opsMark Brown1-10/+9
There is a move to deprecate bus-specific PM operations and move to using dev_pm_ops instead in order to reduce the amount of boilerplate code in buses and facilitate updates to the PM core. Do this move for the ad7879 SPI driver. Signed-off-by: Mark Brown <[email protected]> Acked-by: Michael Hennerich <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-01-20kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERTDavid Rientjes1-15/+15
The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option is used to configure any non-standard kernel with a much larger scope than only small devices. This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes references to the option throughout the kernel. A new CONFIG_EMBEDDED option is added that automatically selects CONFIG_EXPERT when enabled and can be used in the future to isolate options that should only be considered for embedded systems (RISC architectures, SLOB, etc). Calling the option "EXPERT" more accurately represents its intention: only expert users who understand the impact of the configuration changes they are making should enable it. Reviewed-by: Ingo Molnar <[email protected]> Acked-by: David Woodhouse <[email protected]> Signed-off-by: David Rientjes <[email protected]> Cc: Greg KH <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Robin Holt <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-01-17Input: bu21013_ts - added regulator supportNaveen Kumar Gaddipati1-1/+34
Add regulator support in ROHM BU21013 touch panel driver. Signed-off-by: Naveen Kumar Gaddipati <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-01-17Input: bu21013_ts - remove duplicate resolution parametersNaveen Kumar Gaddipati1-2/+2
Remove duplicate display resolution parameters from platform data as one pair is quite enough. Signed-off-by: Naveen Kumar Gaddipati <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-01-17Input: tnetv107x-ts - don't treat NULL clk as an errorJamie Iles1-2/+3
We should use IS_ERR() when checking whether clk_get() succeeded or not since it returns errors by encoding error codes with ERR_PTR(). Signed-off-by: Jamie Iles <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-01-13Merge branch 'for-next' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits) Documentation/trace/events.txt: Remove obsolete sched_signal_send. writeback: fix global_dirty_limits comment runtime -> real-time ppc: fix comment typo singal -> signal drivers: fix comment typo diable -> disable. m68k: fix comment typo diable -> disable. wireless: comment typo fix diable -> disable. media: comment typo fix diable -> disable. remove doc for obsolete dynamic-printk kernel-parameter remove extraneous 'is' from Documentation/iostats.txt Fix spelling milisec -> ms in snd_ps3 module parameter description Fix spelling mistakes in comments Revert conflicting V4L changes i7core_edac: fix typos in comments mm/rmap.c: fix comment sound, ca0106: Fix assignment to 'channel'. hrtimer: fix a typo in comment init/Kconfig: fix typo anon_inodes: fix wrong function name in comment fix comment typos concerning "consistent" poll: fix a typo in comment ... Fix up trivial conflicts in: - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c) - fs/ext4/ext4.h Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.
2011-01-11Merge branch 'next' into for-linusDmitry Torokhov6-64/+195
2011-01-11Input: wacom_w8001 - add single-touch supportPing Cheng1-33/+149
Emulate single-touch compatible events for the 2-finger panels so that they can be used with single-touch legacy clients. Assign device ids as Wacom USB vendor ID and product ID. Name the device to reflect its specific features. Scale touch coordinates to pen maximum if pen supported. Signed-off-by: Ping Cheng <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-01-06Input: cy8ctmg110_ts - Convert to dev_pm_opsMark Brown1-6/+9
There is a general move towards the use of dev_pm_ops rather than bus specific suspend APIs as this simplifies both the bus and PM core implementations. Convert the cy8ctmg110_ts driver over. Compile tested only. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-01-06Input: migor_ts - convert to dev_pm_opsMark Brown1-4/+8
There is a general move towards the use of dev_pm_ops rather than bus specific suspend APIs as this simplifies both the bus and PM core implementations. Convert the migor_ts driver over. Compile tested only. Signed-off-by: Mark Brown <[email protected]> Acked-by: Magnus Damm <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-01-06Input: mcs5000_ts - convert to dev_pm_opsMark Brown1-7/+10
There is a general move towards the use of dev_pm_ops rather than bus specific suspend APIs as this simplifies both the bus and PM core implementations. Convert the mcs5000_ts driver over. Compile tested only. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>