Commit Graph

538 Commits

Author SHA1 Message Date
Zhang Jiejing 59bae1db71 Input: add EETI eGalax I2C capacitive multi touch driver
This patch adds the EETI eGalax serial multi touch controller driver.

EETI eGalax serial touch screen controller is a I2C based multiple
capacitive touch screen controller, it can support 5 touch events maximum.

Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-11-15 09:46:30 -08:00
JJ Ding 76496e7a02 Input: convert obsolete strict_strtox to kstrtox
With commit 67d0a07544 we mark strict_strtox
as obsolete. Convert all remaining such uses in drivers/input/.

Also change long to appropriate types, and return error conditions
from kstrtox separately, as Dmitry sugguests.

Signed-off-by: JJ Ding <dgdunix@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-11-09 21:23:26 -08:00
Michael Gebetsroither d2cc817a76 Input: usbtouchscreen - add ELO IntelliTouch 2700 support
Signed-off-by: Michael Gebetsroither <michael@mgeb.org>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-11-05 00:02:27 -07:00
Philip Rakity 341deefe8f Input: tsc2007 - make sure that X plate resistance is specified
Abort driver initialization if X plate resistance was not specified in
platform data as it will cause pressure to be always calculated as 0,
and making userspace ignore touch coordinates.

Signed-off-by: Philip Rakity <prakity@marvell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-11 20:56:41 -07:00
Dmitry Torokhov d4f4158dcd Input: ad7879-i2c - wrap suspend and resume in CONFIG_PM_SLEEP
CONFIG_PM is defined when CONFIG_PM_SLEEP or CONFIG_PM_RUNTIME is defined,
however suspend and resume methods are only valid in the context of
CONFIG_PM_SLEEP. If only CONFIG_PM_RUNTIME is defined we get the following
warning (courtesy of Geerts randconfig builds):

	ad7879-i2c.c: warning: 'ad7879_i2c_resume' defined but not used

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-06 19:43:05 -07:00
Daniel Kurtz 626af86112 Input: atmel_mxt_ts - use snprintf for sysfs attribute show method
Sysfs attribute show methods are always passed a buffer of length
PAGE_SIZE.  To keep from overwriting this buffer and causing havoc, use
snprintf() to guarantee we never write more than the buffer can hold.

In addition, at least for my touchscreen, the number and size of objects
was far too big to fit in a single 4K page.  Therefore, this patch also
trims some redundant framing text to leave more room for actual data.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Nick Dyer <nick.dyer@itdev.co.uk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-06 19:41:52 -07:00
Sebastian Andrzej Siewior f01536e3d6 Input: add a driver for TSC-40 serial touchscreen
This patch adds the TSC-40 serial touchscreen driver and should be
compatible with TSC-10 and TSC-25.

The driver was written by Linutronix on behalf of Bachmann electronic GmbH.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-28 10:24:14 -07:00
Dmitry Torokhov c3a01ba9e4 Input: penmount - simplify unregister procedure
Since touchscreen driver does not handle any events to be sent to the
device we can close serio port first and then unregister the input device.

Tested-by: John Sung <penmount.touch@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-20 22:46:31 -07:00
Dmitry Torokhov 98b013eb7a Input: penmount - rework handling of different protocols
Instead of having one large switch based on product ID use pointer to
function actually doing protocol decoding.

Tested-by: John Sung <penmount.touch@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-20 22:46:30 -07:00
John Sung bd8f6d2ed4 Input: penmount - add PenMount 6250 support
Add multi touch support for PenMount 6250 touch controller.

Signed-off-by: John Sung <penmount.touch@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-20 22:46:30 -07:00
John Sung 90aba7d8b1 Input: penmount - add PenMount 3000 support
Add dual touch support for PenMount 3000 touch controller.

Signed-off-by: John Sung <penmount.touch@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-20 22:46:29 -07:00
John Sung c42e2e406a Input: penmount - add PenMount 6000 support
Add support for PenMount 6000 touch controller.

Signed-off-by: John Sung <penmount.touch@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-20 22:46:29 -07:00
John Sung 21ae508bab Input: penmount - fix the protocol
The MSB and LSB of the XY axis value are switched according to the PenMount 9000 protocol. The driver name is also changed from penmountlpc, since it is not for LPC interface at all.

Signed-off-by: John Sung <penmount.touch@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-20 22:46:28 -07:00
Yong Zhang ec4665c46b Input: remove IRQF_DISABLED from drivers
This flag is a NOOP and can be removed now.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-07 14:19:11 -07:00
Dmitry Torokhov 7e66eaf14e Merge commit 'v3.1-rc4' into next 2011-09-07 14:18:36 -07:00
Dmitry Torokhov d3654d7ef3 Input: tsc2007 - add open and close methods
This will ensure that the device delivers input events only when there
are users.

Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-26 23:25:14 -07:00
Dmitry Torokhov 377dc5538c Input: tsc2007 - convert to threaded IRQ
Instead of using hard IRQ and workqueue solution switch to using threaded
interrupt handler to simplify the code and locking rules.

Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-26 23:21:53 -07:00
Dmitry Torokhov 66fd9385ee Input: wacom_w8001 - simplify w8001_remove
Since touchscreen driver does not handle any events to be sent to the
device we can close serio port first and then unregister the input device.

Tested-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-23 23:07:51 -07:00
Dmitry Torokhov e9496746cc Input: wacom_w8001 - implement open and close
Implement open() and close() methods for the input device so that we
do not start the device unless there are users listening to the events.

Acked-by: Chris Bagwell <chris@cnpbagwell.com>
Tested-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-23 23:07:47 -07:00
Axel Lin 2782a35132 Input: tnetv107x-ts - add missing include of linux/module.h
tnetv107x-ts.c uses interfaces from linux/module.h,
so it should include that file.  This patch fixes build errors.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-21 12:49:41 -07:00
Jiejing Zhang d70d43d7d7 Input: max11801_ts - correct license statement
The original license statement was confusing since it was unclear if
the license was pure GPLv2 or GPLv2+ and did not match the license
of the driver max11801_ts was derived from. The license is GPLv2+.

Signed-off-by: Jiejing Zhang <jiejing.zhang@freescale.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-20 14:39:53 -07:00
Yufeng Shen 28ac293363 Input: atmel_mxt_ts - report pressure information from the driver
Atmel mxt1386 touch controller has the touch pressure information so
let's report it to the user space.

[dtor@mail.ru: added ABS_RESSURE reporting for ST emulation.]

Signed-off-by: Yufeng Shen <miletus@chromium.org>
Acked-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-16 23:31:51 -07:00
Michael Hennerich 4fecc2088f Input: ad7879 - fix deficient device disable
Input close or device disable should not interact with the exported
gpiolib functionality. However that's the case. __ad7879_disable()
clears the entire AD7879_REG_CTRL2, while it should just power down
the ADC and its reference.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-02 22:17:44 -07:00
Axel Lin e449edbb91 Input: intel-mid-touch - remove pointless checking for variable 'found'
The implementation does break from the for loop after we assign 'i' to
variable 'found'.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-18 17:10:41 -07:00
Axel Lin 2c204109ec Input: cy8ctmg110_ts - set reset_pin and irq_pin from platform data
The implementation in cy8ctmg110_probe() does not properly set reset_pin
and irq_pin from platform data. Let's fix it.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-18 17:10:27 -07:00
Axel Lin d448303a77 Input: cy8ctmg110_ts - constify i2c_device_id table
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-13 00:08:24 -07:00
Axel Lin 21184c4efb Input: cy8ctmg110_ts - fix checking return value of i2c_master_send
i2c_master_send returns negative errno, or else the number of bytes written.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-13 00:08:20 -07:00
Wolfram Sang 77da38387e Input: wm97xx - mark channels which need pen_down
Currently, battery drivers also use poll_sample() provided by the
wm97xx-core but this code always checks if the pen is down. Mark the
channels which really need this (i.e. for the touchscreen) with the
PEN_DOWN bit, and skip the checks otherwise. Now, the battery channels
can always be read.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-04 19:31:47 -07:00
Wolfram Sang c8f205258b Input: wm97xx - refactor channel selection in poll_sample()
The current implementation of poll_sample() has the problem that one of
its arguments, the channel to be selected, differs from wm9713 to other
variants. This parameter gets passed to the (currently unused)
mach-specific functions pre_sample() and post_sample() which thus have
to deal with codec-specific differences. Refactor the routine so that
the argument to poll_sample() is generic for all codecs and do necessary
conversions only in the codec-specific driver. The outcome even uses
less code and removes the non-standard use of the PEN_DOWN bit to mark
the AUX-channels.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-04 19:31:38 -07:00
Wolfram Sang 2456689b3b Input: wm97xx - remove redundant define
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-04 19:31:28 -07:00
Iiro Valkonen a93d4f2d02 Input: atmel_mxt_ts - handle objects with multiple instances correctly
Handle the objects with multiple instances correctly when the configuration
data is loaded.

Signed-off-by: Iiro Valkonen <iiro.valkonen@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-04 03:19:20 -07:00
Iiro Valkonen 81c88a711a Input: atmel_mxt_ts - update object list
Update the object list to include new objects, and add unique identifiers
so we can distinguish between old & new generation of the same object.

Signed-off-by: Iiro Valkonen <iiro.valkonen@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-04 03:19:11 -07:00
Hans-Christian Egtvedt 7c40952295 Input: update author email for gpio_mouse, at32psif, and atmel-wm97xx
This patch updates the email address of the gpio_mouse, at32psif, and
atmel-wm97xx drivers supported by me to an email account I will use on a more
regular basis in the future.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-29 00:26:02 -07:00
Igor Grinberg 58c244009e Input: ads7846 - cleanup GPIO initialization
Use gpio_request_one() instead of multiple gpiolib calls.
This also simplifies error handling a bit.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-27 13:08:05 -07:00
Axel Lin 6a592a7f45 Input: tnetv107x-ts - fix MODULE_ALIAS
Remove the space between "platform:" prefix and the driver name.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-27 12:43:34 -07:00
Dmitry Torokhov b73077eb03 Merge branch 'next' into for-linus 2011-05-24 00:06:26 -07:00
Thierry Reding 891e376b1e Input: tsc2007 - add X, Y and Z fuzz factors to platform data
These new platform-specific values can be used to set the fuzz parameter
passed to the input_set_abs_params() function for the ABS_X, ABS_Y and
ABS_PRESSURE axes.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-17 09:38:53 -07:00
Thierry Reding 1af38eac8c Input: tsc2007 - add poll_period parameter to platform data
This new parameter allows the polling frequency to be configured while
keeping the default of once every millisecond.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-17 09:38:49 -07:00
Thierry Reding 2d137c7ed2 Input: tsc2007 - add poll_delay parameter to platform data
Depending on the quality of the touch panel, the time for the X-, X+, Y-
and Y+ inputs to settle may vary. The poll_delay parameter can be used
to override the default of 1 millisecond.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Kwangwoo Lee <kwangwoo.lee@gmail.com>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-17 09:38:43 -07:00
Thierry Reding 84005eb5ea Input: tsc2007 - add max_rt parameter to platform data
Finger touch events or very quick stylus events on low-quality panels
can cause the tsc2007 to read bogus values. Looking at oscilloscope
snapshots, this seems to be caused by the touch event disappearing
during the measurements. These bogus values result in misclicks, where
the X and Y values deviate from the real position.

Most of these misclicks can be filtered out by setting a low enough
threshold for the maximum resistance (which is loosely the inverse of
the pressure) allowed to consider a set of values valid. Since this
behaviour is largely dependent on the type and quality of the panel,
this commit introduces the max_rt parameter. The default value is kept
at MAX_12BIT.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-17 09:38:39 -07:00
Thierry Reding 4a1a42af0a Input: tsc2007 - debounce pressure measurement
When the controller signals a pen-down event via the platform-specific
GPIO, while the sample values indicate an invalid measurement, the
measurement needs to be repeated.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-17 09:38:34 -07:00
Julia Lawall 215ef98677 Input: atmel_tsadcc - correct call to input_free_device
This error handling code can be reached before ts_dev->input is
initialized, so it is safer to always use the original name,
input_dev.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-14 23:42:41 -07:00
Igor Grinberg 1201e7e676 Input: ads7846 - fix gpio_pendown configuration
The pendown gpio was requested but not configured for input.
Configure it for input.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-12 08:28:57 -07:00
Alexander Stein ebcaaad9d5 Input: ads7846 - add possibility to use external vref on ads7846
Just set vref_mv in your platform config to use external vref. Otherwise
the internal one is used.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-12 08:28:56 -07:00
Alexander Stein 28350e330c Input: ads7846 - remove unused variable from struct ads7845_ser_req
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-05 08:50:53 -07:00
Alexander Stein 1dbe7dada2 Input: ads7846 - make transfer buffers DMA safe
req.sample needs its own cacheline otherwise accessing req.msg fetches
it in again.

Note: This effect doesn't occur if the underlying SPI driver doesn't use
DMA at all.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-05 08:50:47 -07:00
Axel Lin 4296f1ad5a Input: h3600_ts_input - fix a leak of the IRQ during init failure
Make sure we are passing the same cookie in all calls to request_irq() and
free_irq().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-03 09:02:13 -07:00
Mark Brown bf283707d5 Input: wm831x-ts - move BTN_TOUCH reporting to data transfer
Don't report BTN_TOUCH until we've got data as some less robust applications
can be confused by getting a touch event by itself and it doesn't seem
unreasonable for them to expect coordinates along with a touch.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27 23:12:22 -07:00
Mark Brown acad9853b9 Input: wm831x-ts - allow IRQ flags to be specified
This allows maximum flexibility for configuring the direct GPIO based
interrupts.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27 23:12:16 -07:00
Mark Brown f534666815 Input: wm831x-ts - fix races with IRQ management
If the WM831x pen down and data IRQs run in parallel it is possible for the
data and pen down IRQs to deadlock themselves as one is part way through
disabling its operation while the other is part way through enabling. Fix
this by always disabling the pen down interrupt while data is active and
vice versa.  When a changeover is required we disable the IRQ that is to
be stopped then schedule work that will enable the new IRQ.

We need to handle the data flow in the data IRQ as the readback from the
device needs to be ordered correctly with the IRQ for robust operation.

This also fixes an issue when using the built in IRQs due to enable_irq()
not being valid from interrupt context on an interrupt controller with bus
operations like the built in IRQ controller - this issue may also have
affected other interrupt controllers.  We can't rely on having the data
and pen down IRQs available via GPIOs on the CPU on every system.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27 23:12:12 -07:00