summaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/edt-ft5x06.c
Commit message (Collapse)AuthorAgeFilesLines
* Input: edt-ft5x06 - work around FT5506 firmware bugFranklin S Cooper Jr2015-10-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the touchscreen controller ISR, reading the tsc starting from register 0x2 causes the tsc to infrequently update the detected finger's x and y coordinate. The irq pin toggles at a fast rate to indicate touch events are happening. However, the tsc on average updates the touch point's x and y value every ~100 ms which is much slower than the advertised rate of 100+ Hz. This leads to multiple reads within this ~100 ms time window returning the same value. Example: X: 10 , Y: 30 X: 10 , Y: 30 X: 10, Y: 30 .. // After 100 ms X: 300, Y: 300 X: 300, y: 300 .. // After 100 ms X: 1743, Y: 621 X: 1743, Y: 621 For some reason if instead of starting to read at register 0x2 you start reading at register 0x0 this issue isn't seen. This seems like a quirk only seen in the EDT FT5506 so to fix this issue simply adjust the code to start reading from 0x0. Technically this isn't wrong so no regressions should be seen with other touchscreen controllers supported by this driver. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt-ft5x06 - add support for FT5506Franklin S Cooper Jr2015-10-161-1/+7
| | | | | | | FT5506 is essentially the same as other FT5x06 devices other than supporting 10 support points. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt-ft5x06 - add support for different max support pointsFranklin S Cooper Jr2015-10-161-9/+29
| | | | | | | | | | Update the code so that the maximum supported points aren't hard coded but can be changed. Set the maximum support points based on the data passed along side the compatible field. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt-ft5x06 - use max support points to determine how much to readFranklin S Cooper Jr2015-10-161-4/+5
| | | | | | | | | Calculate the amount of data that needs to be read for the specified max number of support points. If the maximum number of support points changes then the amount that is read from the touch screen controller should reflect this. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt-ft5x06 - do not call desc_to_gpio for invalid gpiosFranklin S Cooper Jr2015-10-061-2/+3
| | | | | | | | | Since reset and wake pin are optional the gpio structure for those pins may be null. Therefore, they can't be blindly passed to desc_to_gpio. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt-ft5x06 - do not hardcode interrupt trigger typeDmitry Torokhov2015-09-271-3/+9
| | | | | | | | | | Instead of hardcoding IRQ trigger type to IRQF_TRIGGER_FALLING, let's respect settings specified in device tree. To be compatible with older DTSes, if trigger type is not set up in DTS we'll set it to default (falling edge). Tested-by: Franklin S Cooper Jr <fcooper@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt-ft5x06 - use generic properties APIDmitry Torokhov2015-09-271-11/+15
| | | | | | | | Instead of only parsing device tree properties let's switch to using generic properties API so that the driver can also work on other platforms. Tested-by: Franklin S Cooper Jr <fcooper@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt-ft5x06 - remove support for platform dataDmitry Torokhov2015-09-271-37/+4
| | | | | | | | We do not have any users of platform data in the tree and all newer platforms are either DT or ACPI, so let's drop handling of platform data. Tested-by: Franklin S Cooper Jr <fcooper@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt-ft5x06 - drop parsing of irq gpioDmitry Torokhov2015-09-271-10/+0
| | | | | | | | The driver does not use irq gpio as gpio, but rather relies on I2C core or board code to set up client's structure IRQ line, so let's stop trying to locate the resource and parse it. Tested-by: Franklin S Cooper Jr <fcooper@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt-ft5x06 - switch to newer gpio frameworkFranklin S Cooper Jr2015-09-271-91/+38
| | | | | | | | | | | | | | | The current/old gpio framework used doesn't properly listen to ACTIVE_LOW and ACTIVE_HIGH flags. The newer gpio framework takes into account these flags when setting gpio values. Since the values being output were based on voltage and not logic they change to reflect this difference. Also use gpiod_set_value_cansleep since wake and reset pins can be provided by bus based io expanders. Switch from msleep(5) to udelay_range(5000,6000) to avoid check patch warning. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: drop owner assignment from i2c_driverKrzysztof Kozlowski2015-07-171-1/+0
| | | | | | | i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: of_touchscreen - switch to using device propertiesDmitry Torokhov2015-07-111-1/+1
| | | | | | | | Let's switch form OF to device properties so that common parsing code could work not only on device tree but also on ACPI-based platforms. Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: improve parsing OF parameters for touchscreensDmitry Torokhov2015-06-251-1/+1
| | | | | | | | | | When applying touchscreen parameters specified in device tree let's make sure we keep whatever setup was done by the driver and not reset the missing values to zero. Reported-by: Pavel Machek <pavel@ucw.cz> Tested-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt-ft5x06 - mark as direct input deviceDmitry Torokhov2015-06-251-6/+1
| | | | | | | edt-ft5x06 is a touchscreen and thus a direct input device; let's amrk it as such. This also allows us to drop some initialization code as input_init_mt_slots() will do that for us. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt-ft5x06 - remove EV_SYN event reportMaxime Ripard2015-03-241-1/+0
| | | | | | | | | | input_register_device already sets the EV_SYN event since all devices can generate them. Remove the redundant affectation. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt-ft5x06 - allow to setting the maximum axes value through the DTMaxime Ripard2015-03-241-0/+5
| | | | | | | | | | | | | | Currently the driver relies on some obscure and undocumented register to set the maximum axis value. The reported value is way too high to be meaningful, which confuses some userspace tools like QT's evdevtouch plugin which try to scale the reported events to the maximum values. Use the values from the DT to set meaningful values. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Merge branch 'for-linus' of ↵Linus Torvalds2014-12-301-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input layer fixes from Dmitry Torokhov: "Fixes for v7 protocol for ALPS devices and few other driver fixes. Also users can request input events to be stamped with boot time timestamps, in addition to real and monotonic timestamps" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: hil_kbd - fix incorrect use of init_completion Input: alps - v7: document the v7 touchpad packet protocol Input: alps - v7: fix finger counting for > 2 fingers on clickpads Input: alps - v7: sometimes a single touch is reported in mt[1] Input: alps - v7: ignore new packets Input: evdev - add CLOCK_BOOTTIME support Input: psmouse - expose drift duration for IBM trackpoints Input: stmpe - bias keypad columns properly Input: stmpe - enforce device tree only mode mfd: stmpe: add pull up/down register offsets for STMPE Input: optimize events_per_packet count calculation Input: edt-ft5x06 - fixed a macro coding style issue Input: gpio_keys - replace timer and workqueue with delayed workqueue Input: gpio_keys - allow separating gpio and irq in device tree
| * Input: edt-ft5x06 - fixed a macro coding style issueAsaf Vertz2014-12-151-1/+3
| | | | | | | | | | | | | | | | Fixed a coding style error, macros with complex values should be enclosed in parentheses. Signed-off-by: Asaf Vertz <asaf.vertz@tandemg.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | Merge branch 'for-linus' of ↵Linus Torvalds2014-12-171-4/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input subsystem updates from Dmitry Torokhov: "Two new drivers for Elan hardware (for I2C touchpad and touchscreen found in several Chromebooks and other devices), a driver for Goodix touch panel, and small fixes to Cypress I2C trackpad and other input drivers. Also we switched to use __maybe_unused instead of gating suspend/ resume code with #ifdef guards to get better compile coverage" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (27 commits) Input: gpio_keys - fix warning regarding uninitialized 'button' variable Input: add support for Elan eKTH I2C touchscreens Input: gpio_keys - fix warning regarding uninitialized 'irq' variable Input: cyapa - use 'error' for error codes Input: cyapa - fix resuming the device Input: gpio_keys - add device tree support for interrupt only keys Input: amikbd - allocate temporary keymap buffer on the stack Input: amikbd - fix build if !CONFIG_HW_CONSOLE Input: lm8323 - missing error check in lm8323_set_disable() Input: initialize device counter variables with -1 Input: initialize input_no to -1 to avoid subtraction Input: i8042 - do not try to load on Intel NUC D54250WYK Input: atkbd - correct MSC_SCAN events for force_release keys Input: cyapa - switch to using managed resources Input: lifebook - use "static inline" instead of "inline" in lifebook.h Input: touchscreen - use __maybe_unused instead of ifdef around suspend/resume Input: mouse - use __maybe_unused instead of ifdef around suspend/resume Input: misc - use __maybe_unused instead of ifdef around suspend/resume Input: cap11xx - support for irq-active-high option Input: cap11xx - add support for various cap11xx devices ...
| * Input: touchscreen - use __maybe_unused instead of ifdef around suspend/resumeJingoo Han2014-11-021-4/+2
| | | | | | | | | | | | | | | | Use __maybe_unused instead of ifdef guards around suspend/resume functions, in order to increase build coverage and fix build warnings. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | input: edt-ft5x06: replace strnicmp with strncasecmpRasmus Villemoes2014-10-141-1/+1
|/ | | | | | | | | | | | | | | | | The kernel used to contain two functions for length-delimited, case-insensitive string comparison, strnicmp with correct semantics and a slightly buggy strncasecmp. The latter is the POSIX name, so strnicmp was renamed to strncasecmp, and strnicmp made into a wrapper for the new strncasecmp to avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Input: edt-ft5x06 - remove superfluous assignmentMaks Naumov2014-08-131-1/+0
| | | | | | | Somehow we ended up with a duplicate line in edt_ft5x06_register_write() Signed-off-by: Maks Naumov <maksqwe1@ukr.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt-ft5x06 - remove unnecessary null testFabian Frederick2014-07-181-2/+1
| | | | | | | | Fix checkpatch warning: "WARNING: debugfs_remove_recursive(NULL) is safe this check is probably not required" Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt-ft5x06 - fix an i2c write for M09 supportRobert Woerle2014-06-071-1/+1
| | | | | | | | | The driver sends 3 bytes instead of 2 when accessing a register on the M09 firmware, so writing to gain seems to overflow into the offset register. Signed-off-by: Robert Woerle <robert@linuxdevelopment.de> Acked-By: Simon Budig <simon.budig@kernelconcepts.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt-ft5x06 - add a missing conditionDan Carpenter2014-04-031-3/+4
| | | | | | | | | | | The if condition was accidentally deleted here so we return every time instead of returning on error. Fixes: fd335ab04b3f ('Input: edt-ft5x06 - add support for M09 firmware version') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Jingoo Han <jg1.han@samsung.com> Acked-By: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt-ft5x06 - add support for M09 firmware versionLothar Waßmann2014-03-281-82/+276
| | | | | | | | | There is a new firmware version for the EDT-FT5x06 chip. Add support for detecting the firmware version and handle the differences appropriately. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt-ft5x06 - ignore touchdown eventsLothar Waßmann2014-03-281-0/+4
| | | | | | | | | The chip may report invalid coordinates on touchdown events, so don't report the initial touchdown event. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Acked-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt-ft5x06 - adjust delays to conform datasheetLothar Waßmann2014-03-281-3/+3
| | | | | | | | | | | | | The FT5x06 datasheet specifies a minimum reset width of 5ms and a delay between deassertion of reset and start of reporting of 300ms. Adjust the delays to conform to the datasheet. With the original delays I sometimes experienced communication timeouts when initializing the controller. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Acked-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt-ft5x06 - add DT supportLothar Waßmann2014-03-281-31/+114
| | | | | Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt-ft5x06 - several cleanups; no functional changeLothar Waßmann2014-03-281-9/+6
| | | | | | | | | | - remove redundant parens - remove redundant type casts - fix mixed tab/space indentation Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Acked-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt_ft5x06 - use devm_* functions where appropriateLothar Waßmann2014-01-201-43/+26
| | | | | | | | | Simplify the error path and remove() function by using devm_* functions for requesting gpios and irq and allocating the input device. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: use dev_get_platdata()Jingoo Han2013-12-061-1/+1
| | | | | | | | | | Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. This is a cosmetic change to make the code simpler and enhance the readability. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt-ft5x06 - remove redundant null check before kfreeSachin Kamat2013-03-311-2/+1
| | | | | | | | kfree on a null pointer is a no-op. Hence null check is not necessary. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: remove use of __devexitBill Pemberton2012-11-241-2/+2
| | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: remove use of __devinitBill Pemberton2012-11-241-6/+6
| | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Javier Martinez Canillas <javier@dowhile0.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: remove use of __devexit_pBill Pemberton2012-11-241-1/+1
| | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Merge tag 'v3.7-rc3' into next to sync up with recent USB and MFD changesDmitry Torokhov2012-10-301-4/+7
|\
| *-. Merge branches 'from-henrik', 'hidraw', 'logitech', 'picolcd', 'ps3', ↵Jiri Kosina2012-10-011-4/+7
| |\ \ | | | | | | | | | | | | 'uclogic', 'wacom' and 'wiimote' into for-linus
| | * | Input: edt-ft5x06 - return -EFAULT on copy_to_user() errorAxel Lin2012-09-191-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | copy_to_user() returns the number of bytes remaining, but we want a negative error code here. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
| | * | Input: edt-ft5x06 - fix build error when compiling wthout CONFIG_DEBUG_FSGuenter Roeck2012-08-211-1/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following breakage: edt-ft5x06.c: In function edt_ft5x06_ts_remove: edt-ft5x06.c:846:14: error: struct edt_ft5x06_ts_data has no member named raw_buffer Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Simon Budig <simon.budig@kernelconcepts.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: edt-ft5x06 - convert to use simple_open()Wei Yongjun2012-10-171-9/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | This removes an open coded simple_open() function and replaces file operations references to the function with simple_open() instead. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | Input: MT - Add flags to input_mt_init_slots()Henrik Rydberg2012-09-191-1/+1
|/ | | | | | | | | | Preparing to move more repeated code into the mt core, add a flags argument to the input_mt_slots_init() function. Reviewed-and-tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr> Tested-by: Ping Cheng <pingc@wacom.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Input: add driver for FT5x06 based EDT displaysSimon Budig2012-07-241-0/+898
This is a driver for the EDT "Polytouch" family of touch controllers based on the FocalTech FT5x06 line of chips. Signed-off-by: Simon Budig <simon.budig@kernelconcepts.de> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
OpenPOWER on IntegriCloud