Commit Graph

568 Commits

Author SHA1 Message Date
Jing Lin
6cfc00e091 Input: atmel_mxt_ts: Add a debugfs attribute to show all objects
The sysfs attribute show method (mxt_object_show) is limited to show
object information up to (PAGE_SIZE - 1) bytes. We need a way to get
the complete information of all objects. The object information can
be obtained from <debugfs-mount>/atmel_mxt_ts/object.

Change-Id: I92fff75b37ba0cba19b137460c2144fe847c6343
Signed-off-by: Jing Lin <jinglin@codeaurora.org>
2012-01-27 08:44:12 -08:00
Jing Lin
c7fc405613 input: atmel_mxt_ts: Add support for object PROCI_SHIELDLESS_T56
The mXT1386E touch controller supports a new signal processing object
PROCI_SHIELDLESS_T56. This object is both readable and writable.

Change-Id: I418df8c3f05dc5265a1e7581d9c7e654a9fd3c4c
Signed-off-by: Jing Lin <jinglin@codeaurora.org>
2012-01-27 08:42:21 -08:00
Jing Lin
dc4413c370 input: atmel_mxt_ts: Support runtime selection of config data
Add support for dynamic configuration data update if the target can
support more than one Atmel chip. Platform data contains an array of
supported config data along with family ID, variant ID and firmware
version. Driver searches for matching family ID, variant ID and
firmware version, and uses the corresponding config data to program.

Change-Id: I684da4bdef56a3445acab3bb8fe47dd5279bebe5
Signed-off-by: Jing Lin <jinglin@codeaurora.org>
2012-01-27 08:40:53 -08:00
Jeff Ohlstein
5ff17d5dcf input: cyttsp-i2c: Don't set mode on unsettable regulators
Currently during boot, and every suspend and resume, we call
regulator_set_optimum_mode on every touchscreen regulator. However,
some regulators don't support this function, and this will cause
set_optimum_mode to print an error when this occurs. Correct this by
checking if it is valid to call set_optimum_mode on a given regulator
before doing so.

Change-Id: I71f0f14b16d9f333bd409d9d5150f11a7ccd8fdf
Signed-off-by: Jeff Ohlstein <johlstei@codeaurora.org>
2012-01-26 11:58:32 -08:00
Anirudh Ghayal
482ccccd1f input: tsc2007: Specify max/min coordinates from platform data
Provides flexibility to specify max/min x and y coordinates from
platform data. Useful in cases where the TS controller reports
coordinates at an offset from the predefined min/max values
(0 and 4096 respectively).

Change-Id: Ia93a8940078aa5960d1d900ac56b0b3354c82e40
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2012-01-25 13:48:04 +05:30
Mohan Pallaka
382d3ce841 input: atmel_mxt_ts: Add support for keyarray object
Keyarray(T15) object is used for handling capactive keys.
It can handle 32 keys and the keys supported are passed
from platform data as key_codes.

Change-Id: Iac589afb59e8ff69b6e1eb86bafdc0b5382c3edd
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2012-01-19 12:27:21 +05:30
Mohan Pallaka
bfe8f3025a input: atmel_mxt_ts: Release irq and reset gpios
Cleanup and release the gpio pins for irq and reset
when the module is removed.

Change-Id: Id264411a786c7490506271bef2d6f7e55e7d07fb
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2012-01-16 12:20:59 -08:00
Mohan Pallaka
5e7343f28e input: atmel_mxt_ts: Report pressure as 0 upon MXT release event
Correct event where touch is released but nonzero pressure is
reported by controller.  If there is no touch, pressure should
be reported to Android as zero.

Change-Id: I1865e69faa57bf5cf34325622c3b7170ceaf4654
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2012-01-13 13:59:34 -08:00
Anirudh Ghayal
4e66bb7bce drivers: atmel_maxtouch: Fix IRQ handling in a possible race condition
Possibility of the IRQ being disabled twice if IRQ hander and the
missed interrupt check execute simultaneously. This can case the IRQ
to be disabled forever.

Change-Id: If1d1cac138727c866dcd99b882b778d4b31b1774
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2012-01-03 09:07:02 +05:30
Amy Maloche
380cc0b684 input: atmel_mxt_ts: add mxt224E family reset specifics
Change-Id: Ia07f558a52e1f821da031da7b8f7e6b9afb6bfe9
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
2011-12-27 08:17:48 +05:30
Amy Maloche
08266db27b input: atmel_mxt_ts: add gpio framework to driver
Move irq and reset gpios to driver

Change-Id: I386cfdb142cefe6ad7021a67d7d277dc0447411a
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
2011-12-27 08:17:15 +05:30
Linux Build Service Account
5aa13e391c Merge "Input: atmel_mxt_ts - update object list" into msm-3.0 2011-12-26 00:59:33 -08:00
Linux Build Service Account
fe99c760d8 Merge changes I2717fd26,Ib30cca61 into msm-3.0
* changes:
  input: atmel_mxt_ts: modify regulator framework for mxt224E
  Input: atmel_mxt_ts - report pressure information from the driver
2011-12-23 07:37:58 -08:00
Iiro Valkonen
e8645595e7 Input: atmel_mxt_ts - update object list
Update the object list to include new objects, add unique identifiers
so we can distinguish between old & new generation of the same object.

Change-Id: I6e0336e3db1deed1072b5d0c7ba944659ad85b5a
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
2011-12-20 18:26:13 -08:00
Amy Maloche
21115ebe19 input: atmel_mxt_ts: modify regulator framework for mxt224E
Support mxt224E controller which requires both digital and analog
regulator power.

Change-Id: I2717fd26b4790cf1b6160f09e71611537b47ea3c
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
2011-12-20 18:26:13 -08:00
Yufeng Shen
e6eb36a842 Input: atmel_mxt_ts - report pressure information from the driver
Atmel mxt1386 touch controller has the touch pressure information but
the current driver atmel_mxt_ts does not expose it to the user space.
This patch makes the driver report the touch pressure information to
user space.

ChangeLog:
v2: fixed indentation as commented by Wanlong Gao
v3: added signed-off-by

Change-Id: Ib30cca618d964793e026a675823d9ed8d4e912b9
Signed-off-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
2011-12-20 18:26:13 -08:00
Mohan Pallaka
e2da76d105 input: cyttsp-i2c: Convert mdelay to sleep variant calls
Replace busy waiting mdelay calls with sleep variant calls
like msleep and usleep_range.

Change-Id: I516dba3c78fe7e61f6da9340fba16ba1f61c2be4
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2011-12-20 14:56:22 +05:30
Mohan Pallaka
d99a79c3ee input: synaptics_rmi_ts: Add ABS_MT_PRESSURE event
Use ABS_MT_PRESSURE to report pressure instead of relying
on ABS_MT_TOUCH_MAJOR and ABS_MT_WIDTH_MAJOR events.

Change-Id: I3954e729ad48a28970b470df8c86c3a22ea56bd9
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2011-12-08 15:55:48 +05:30
Linux Build Service Account
73341822cc Merge "input: atmel_maxtouch: Rename mxt_platform_data to maxtouch_platform_data" into msm-3.0 2011-11-28 23:16:15 -08:00
Mohan Pallaka
4e9a94e60d input: atmel_maxtouch: Rename mxt_platform_data to maxtouch_platform_data
Opensource driver atmel_mxt_ts has the platform data
structure name as atmel_maxtouch. Avoid name conflict
by renaming atmel_maxtouch driver's platform data to
maxtouch_platform_data.

Change-Id: I4bf3ed83e3eab55c4464de365c6009965da73744
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2011-11-26 23:45:35 -07:00
Bryan Huntsman
849b79e1f0 msm: trivial: 'chmod 644' for non-executable files
Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2011-11-22 18:44:06 -08:00
Mohan Pallaka
a9df12a301 input: atmel_maxtouch: Report BTN_TOUCH event
Report BTN_TOUCH event along with other input
events.

Change-Id: I1ba414224f978c13e24c382b5c0fd57f82f66577
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2011-11-21 10:30:24 +05:30
Linux Build Service Account
f112ecce60 Merge "input: cyttsp-i2c: Fix a few coding issues" into msm-3.0 2011-11-17 17:48:32 -08:00
Praveena Pachipulusu
0106ea69f7 input: cy8c_ts: use ABS_MT_PRESSURE to report pressure
Change-Id: I271416167fa1800bfbaf05e7269396652b2449bc
Signed-off-by: Praveena Pachipulusu <pveena@codeaurora.org>
2011-11-16 16:11:37 +05:30
Jing Lin
1c46af9fac input: cyttsp-i2c: Fix a few coding issues
Fix issues such as comparing an unsigned integer against 0 and
unnecessary NULL checking.

Change-Id: Ib70b083925229ed9ec5b940e0fb0e80e9b83c960
Signed-off-by: Jing Lin <jinglin@codeaurora.org>
2011-11-15 21:47:34 -08:00
Linux Build Service Account
42474690f7 Merge "Input: atmel_mxt_ts: Fix error handling in mxt_probe" into msm-3.0 2011-11-11 16:10:44 -08:00
Jing Lin
32c7253521 Input: atmel_mxt_ts: Fix error handling in mxt_probe
Fix out-of-order error handling of several error cases in mxt_probe.
Make sure allocated memory is freed in mxt_initialize when an error
occurs.

Change-Id: I4331a71263b62ff6bdeaafbe6881e591b09d2ffc
Signed-off-by: Jing Lin <jinglin@codeaurora.org>
2011-11-08 23:22:36 -08:00
Mohan Pallaka
07a0807c3e input: cyttsp-i2c: Move irq handler to threaded context
Change-Id: I60d038fc06c8f040cf2b69d6b65d9b8e210ff08b
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2011-11-09 11:31:57 +05:30
Linux Build Service Account
a67b6d1b5c Merge "Input: atmel_mxt_ts - Use snprintf for sysfs attribute show method" into msm-3.0 2011-11-04 20:59:40 -07:00
Anirudh Ghayal
f9929b1e29 input: cyttsp-i2c: Move regulators to LPM/HPM in suspend/resume
Change-Id: I341f33d2627dc9f3f7c511a69db8a84c4b886841
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-11-02 14:49:16 -06:00
Daniel Kurtz
4ef11a8fcb 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.

Change-Id: If771d66940d9948618b419ff7f0e510a07821274
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Nick Dyer <nick.dyer@itdev.co.uk>
Signed-off-by: Jing Lin <jinglin@codeaurora.org>
2011-11-02 10:52:03 -07:00
Taniya Das
6f0884bf86 input: touchscreen: Add support for synaptics clearpad3000
Change-Id: Ie00815ed507d81c6934ac0d4b1dfa745215ff01a
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2011-10-24 12:12:17 +05:30
Jing Lin
bace50b68c input: atmel_mxt_ts: Move regulators to LPM/HPM in suspend/resume
Change-Id: I75900b242a628a3ab024e8489273c4cad185c52b
Signed-off-by: Jing Lin <jinglin@codeaurora.org>
2011-10-21 11:46:20 -07:00
Jing Lin
36aee816a0 input: atmel_mxt_ts: Add retry mechanism for I2C read/write
Try up to 3 times for each I2C read/write with 25ms delay between retries.
This is especially needed when writing to T7 to wake up the controller
from deep sleep mode.
Read/write T7 object in block, instead of one byte at a time.

Change-Id: Ibca9cdbf38c5726af5ff4ee9f0ce9ea6f0d183ee
Signed-off-by: Jing Lin <jinglin@codeaurora.org>
2011-10-21 11:46:20 -07:00
Jing Lin
2f863174f9 input: atmel_mxt_ts: Clean up pdata and update config array
Remove blen, tchthr, x_line, y_line, orient and voltage from platform
data to not to overwrite the config data with these values. Update
config array to have the proper values.
Turn on i2c_pull_up in platform data.

Change-Id: Ic926e96886f52cea3dad29e9a44559b26c717259
Signed-off-by: Jing Lin <jinglin@codeaurora.org>
2011-10-21 11:46:20 -07:00
Amy Maloche
2b59bab63c input: atmel_mxt_ts: remove mt protocol b capability
Change-Id: I3bbb94ff1b2380c85bc960ec79d6c7fcc791cf1f
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
2011-10-18 15:05:39 -06:00
Amy Maloche
f0d7b8d83b Input: atmel_mxt_ts: increase delay required for power stabilization
Logging removed which threw previous delay off

Change-Id: I476f584755f676bb80be5b278a60e20f0a4cbb8a
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
2011-10-17 14:20:29 -07:00
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