Commit Graph

581 Commits

Author SHA1 Message Date
Anirudh Ghayal
61d88f754d input: atmel-maxtouch: Fix enabling of IRQ in worker thread
Enable the interrupt only when no work is to be scheduled.

Change-Id: I006688b73331428850936f0cfea14c10f41fcd52
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-10-17 11:46:38 +05:30
Mohan Pallaka
04b7f7980c input: cyttsp-i2c: Remove deprecated function strlen
Replace deprecated function strlen with it's safer
counter part strnlen. Return error code from probe
when cyttsp_initialize() fails.

Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2011-10-11 09:59:29 -07:00
Amy Maloche
5226221101 input: atmel_mxt_ts: put device in LPM from T7 and T9
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
2011-10-11 09:59:24 -07:00
Mohan Pallaka
9c050f1f6f input: cyttsp-i2c: Remove deprecated functions
Replace deprecated functions sprintf/strncpy with their safer
counter parts, snprintf/strlcpy.

Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2011-10-05 10:35:46 -07:00
Mohan Pallaka
ab51f2ba25 input: atmel_mxt_ts: Remove deprecated functions
Replace deprecated function sprintf with its safer
counter part, snprintf.

Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2011-10-05 10:27:13 -07:00
Anirudh Ghayal
9ffded25fd input: atmel-maxtouch: Modify the work handling in IRQ context
The cancel-work construct is not needed as the new IRQ is
generated only after the old work has completed execution.

Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-10-03 16:20:51 -07:00
Amy Maloche
7e447434cc input: atmel_mxt_ts: Update proper reset time for mxt1386
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
2011-10-03 16:19:47 -07:00
Iiro Valkonen
4ac053cdb9 Input: atmel_mxt_ts - Make wait-after-reset peroid compatible with all chips
The delay before the chip can be accessed after reset varies between different
chips in maXTouch family. Waiting for 200ms and then monitoring the CHG (chip
is ready when the line is low) is guaranteed to work with all chips.

v4: Adjust delay depending on the family ID of the chip. Also add a readback
    of command register after backup is issued, to make sure we are not
proceeding
    too fast there.
v3: Add a check for NULL read_chg() function, and add the read_chg() to platform
    files using this driver (currently only mach-goni.c)
v2: At Dmitry's suggestion, add a timeout so we are not stuck looping
    endlessly in case the CHG is not going low.

Signed-off-by: Iiro Valkonen <iiro.valkonen@atmel.com>
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
2011-10-03 16:19:35 -07:00
Anirudh Ghayal
ba3bc7acf2 input: atmel-mxt-ts: Make digitizer object(43) readable/writeable
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-10-03 16:18:39 -07:00
Anirudh Ghayal
909dcfdd04 input: cyttsp-i2c: Move resume call under CONFIG_PM
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-10-03 16:18:24 -07:00
Anirudh Ghayal
84e511925f input: cyttsp-i2c: Fix the EARLYSUSPEND and PM defines
This change prevents the resume handler being called in the
regular resume callback. It should get called only during late
resume. This can cause the device to wake up earlier than expected.

Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-10-03 16:18:02 -07:00
Praveena Pachipulusu
8b621e4279 input: cyttsp-i2c: Change the permission of firmware sysfs entries
CRs-fixed: 302911
Signed-off-by: Praveena Pachipulusu <pveena@codeaurora.org>
2011-10-03 16:17:00 -07:00
Amy Maloche
13dcf554d9 input: cyttsp-i2c: Reduce time needed to resume from sleep
Reduce the number to attempts to move out of bootloader
mode.

Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
2011-10-03 16:16:20 -07:00
Anirudh Ghayal
ab2754e472 input: cyttsp-i2c: Improve error handling in bootloader mode
Attempt multiple I2C writes (in case of failures) to get the
device out of bootloader mode.

Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-10-03 16:16:19 -07:00
Zhang Chang Ken
f5a4bbe4a0 input: cy8c_ts: Add support for TMA340 TS controller
This controller uses the same packet format as TMA300

Signed-off-by: Zhang Chang Ken <kenz@codeaurora.org>
2011-10-03 16:16:01 -07:00
Mohan Pallaka
727225f609 input: cyttsp-i2c: Add support for disabling ghost touch detection
Add support to treat ghost touches as normal touches incase firmware
reports all touches as ghost touches.

Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2011-10-03 16:15:53 -07:00
Anirudh Ghayal
f1071c0d57 input: atmel-mxt-ts: Make USERDATA as writable object
The USERDATA object can be used to store user specific
data such as version info.

Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-10-03 16:15:25 -07:00
Anirudh Ghayal
253ce1292f input: atmel-mxt-ts: Add earlysuspend support
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-10-03 16:15:24 -07:00
Anirudh Ghayal
a498e4d825 input: atmel-mxt-ts: Add regulator support and init. callbacks
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-10-03 16:15:24 -07:00
Mohan Pallaka
df53bc38e9 input: cy8c_ts: Clear status register in resume
To avoid firmware getting lock up after suspend
clear the status register in resume.

CRs-fixed: 300494
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2011-10-03 16:14:10 -07:00
Mohan Pallaka
1cef4a0f37 input: cyttsp-i2c: Verify checksum before firmware upgrade
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2011-10-03 10:27:46 -07:00
Amy Maloche
edd5fd79fb input: cyttsp-i2c: choose firmware start address
Firmware start address changes from GEN3 to GEN2 devices.
Select proper firmware start address based on chip generation.

Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
2011-10-03 10:26:42 -07:00
Bryan Huntsman
3f2bc4d6eb Initial Contribution
msm-2.6.38: tag AU_LINUX_ANDROID_GINGERBREAD.02.03.04.00.142

Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2011-10-03 09:57:10 -07:00
Rebecca Schultz Zavin
70abd67c1d Input: synaptics_i2c_rmi: Add irqflags to platform data struct to pass them to driver
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-06-14 09:08:50 -07:00
Arve Hjønnevåg
90229d879b Input: synaptics_i2c_rmi: Send new multi touch events
Send both fingers using the new multitouch protocol in addition to
the old single finger event and second finger ABS_HAT* hack.

The new protocol does not specify how to report up events. To make
sure the user-space frameworks can generate up events, we send at
least one event where ABS_MT_TOUCH_MAJOR is zero before we stop
sending events for a finger.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-06-14 09:08:49 -07:00
Arve Hjønnevåg
1d1ca96322 Input: synaptics_i2c_rmi: Add sensitivity adjust option.
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-06-14 09:08:49 -07:00
Arve Hjønnevåg
3f8a4b06d2 Input: synaptics_i2c_rmi: Add support for panels with has-no-relative-data property.
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-06-14 09:08:49 -07:00
Arve Hjønnevåg
00adffddbc Input: synaptics_i2c_rmi: Driver for Synaptics Touchscreens using RMI over I2C.
Signed-off-by: Arve Hjønnevåg <arve@android.com>

Input: synaptics_i2c_rmi: disable_irq -> disable_irq_nosync

Also remove duplicate swap macro

Change-Id: I77266431ba5c267a5d92c4bdc2f127a5297065a8
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-06-14 09:08:49 -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
Dmitry Torokhov
03351ff4d8 Merge commit 'v2.6.39-rc4' into next 2011-04-22 23:35:25 -07:00
Linus Torvalds
96fd2d57b8 Merge branch 'for-linus' of 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: xen-kbdfront - fix mouse getting stuck after save/restore
  Input: estimate number of events per packet
  Input: evdev - indicate buffer overrun with SYN_DROPPED
  Input: document event types and codes and their intended use
  Input: add KEY_IMAGES specifically for AL Image Browser
  Input: twl4030_keypad - fix potential NULL dereference in twl4030_kp_probe()
  Input: h3600_ts - fix error handling at connect
  Input: twl4030_keypad - avoid potential NULL-pointer dereference
2011-04-18 13:29:03 -07:00
Joonyoung Shim
8b86c1c28f Input: atmel_mxt_ts - convert to MT protocol B
Atmel touchscreen chips can use MT protocol B because they can assign
unique id to ABS_MT_TRACKING_ID from finger id provided by hardware.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-12 23:34:21 -07:00
Iiro Valkonen
08960a070a Input: atmel_mxt_ts - make CHG line high after enabling interrupts
Make the CHG line (interrupt line) go high after the interrupts have been
enabled to make sure we don't miss the falling edge.

Signed-off-by: Iiro Valkonen <iiro.valkonen@atmel.com>
Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-12 23:34:16 -07:00
Joonyoung Shim
910d805130 Input: atmel_mxt_ts - support 12bit resolution
Atmel touchscreen chip can support 12bit resolution and this patch
modifies to get maximum x and y size from platform data.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Iiro Valkonen <iiro.valkonen@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-12 23:34:11 -07:00
Zhang Jiejing
4203306506 Input: add driver for Maxim max11801 touchscreen controller
Add MAXI max11801 resistive touchscreen controller driver. This driver
uses Auto Mode and Aperture Mode.

Support for other max1180x devices can be added to this driver as well,
as they use almost the same register addresses and codes.

You can find data sheet here:
http://www.maxim-ic.com/datasheet/index.mvp/id/5943

Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-11 23:53:51 -07:00
Linus Torvalds
42933bac11 Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6
* 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6:
  Fix common misspellings
2011-04-07 11:14:49 -07:00