summaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/edt-ft5x06.c
AgeCommit message (Collapse)AuthorFilesLines
2021-06-01Input: edt-ft5x06 - add support for iovcc-supplyStephan Gerhold1-2/+36
At the moment, the edt-ft5x06 driver can control a single regulator ("vcc"). However, some FocalTech touch controllers have an additional IOVCC pin that should be supplied with the digital I/O voltage. The I/O voltage might be provided by another regulator that should also be kept on. Otherwise, the touchscreen can randomly stop functioning if the regulator is turned off because no other components still require it. Implement (optional) support for also enabling an "iovcc-supply". The datasheet specifies a delay of ~ 10us before enabling VDD/VCC after IOVCC is enabled, so make sure to enable IOVCC first. Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Link: https://lore.kernel.org/r/20210510193108.50178-2-stephan@gerhold.net Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-12-10Input: edt-ft5x06 - consolidate handling of number of electrodesDmitry Torokhov1-26/+17
Instead of special-casing retrieval of number of X/Y electrodes based on the firmware, let's select default values and mark registers as non-existent on firmwares that do not support this operation. Also mark "report rate" register as non-existent for generic firmwares as having it set to 0 does not make sense. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Marco Felsch <m.felsch@pengutronix.de> Reviewed-by: Simon Budig <simon.budig@kernelconcepts.de> Link: https://lore.kernel.org/r/X9FZFs3NZADoIhhH@google.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-07-07Input: Use fallthrough pseudo-keywordGustavo A. R. Silva1-2/+1
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20200707180857.GA30600@embeddedor Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-05-09Input: edt-ft5x06 - prefer asynchronous probeAhmad Fatoum1-0/+1
Probing the device takes a while, because we sleep for 300 ms after a reset; allow asynchronous probing so this can happen in the background while other devices are being probed. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.kernel.org/r/20200227112819.16754-5-m.felsch@pengutronix.de Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-05-09Input: edt-ft5x06 - improve power management operationsMarco Felsch1-10/+132
It is possible to bring the device into a deep sleep state. To exit this state the reset or wakeup pin must be toggeled as documented in [1]. Because of the poor documentation I used the several downstream kernels [2] and other applications notes [3] to indentify the related registers. Furthermore I added the support to disable the device completely which is obviously the most effective power-saving mechanism. This mechanism needs the reset pin to ensure the power-up/down sequence. We can't apply any of these power-saving mechanism if both pins are missing (not connected) or if it is a wakeup device. [1] https://www.newhavendisplay.com/appnotes/datasheets/touchpanel/FT5x26.pdf https://www.newhavendisplay.com/appnotes/datasheets/touchpanel/FT5x06.pdf [2] https://github.com/linux-sunxi/linux-sunxi/blob/sunxi-3.4/drivers/input/touchscreen/ft5x_ts.c https://github.com/Pablito2020/focaltech-touch-driver/blob/master/ft5336_driver.c [3] https://www.newhavendisplay.com/appnotes/datasheets/touchpanel/FT5x16_registers.pdf Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.kernel.org/r/20200227112819.16754-4-m.felsch@pengutronix.de Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-05-09Input: edt-ft5x06 - move parameter restore into helperMarco Felsch1-19/+24
We need to restore the parameters if we switch between the factory/work mode and during the resume process if we switched off the power-supply. Therefore refactor edt_ft5x06_work_mode() and move the "restore the parameters" into a helper routine so we can reuse it later. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.kernel.org/r/20200227112819.16754-3-m.felsch@pengutronix.de Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-05-09Input: edt-ft5x06 - fix get_default register write accessMarco Felsch1-3/+9
Since commit b6eba86030bf ("Input: edt-ft5x06 - add offset support for ev-ft5726") offset-x and offset-y is supported. Devices using those offset parameters don't support the offset parameter so we need to add the NO_REGISTER check for edt_ft5x06_ts_get_defaults(). Fixes: b6eba86030bf ("Input: edt-ft5x06 - add offset support for ev-ft5726") Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.kernel.org/r/20200227112819.16754-2-m.felsch@pengutronix.de Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-01-10Input: edt-ft5x06 - use pm core to enable/disable the wake irqMarco Felsch1-24/+0
We do not have to handle the wake-irq within the driver because the pm core can handle this for us. The only use case for the suspend/resume callbacks was to handle the wake-irq so we can remove the callbacks. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-01-10Input: edt-ft5x06 - make wakeup-source switchableMarco Felsch1-1/+0
Since day one the touch controller acts as wakeup-source. This seems to be wrong since the device supports deep-sleep mechanism [1] which requires a reset to leave it. Also some designs won't use the touchscreen as wakeup-source. According discussion [2] we decided to break backward compatibility and go the common way by using the 'wakeup-source' device-property. [1] https://www.newhavendisplay.com/appnotes/datasheets/touchpanel/FT5x26.pdf [2] https://patchwork.kernel.org/patch/11149037/ Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-01-10Input: edt-ft5x06 - alphabetical include reorderMarco Felsch1-11/+12
It seems that the include order is historical increased and no one takes care of it. Fix this to align it with the common rule to be in a alphabetical order. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-01-10Input: edt-ft5x06 - work around first register access errorPhilipp Zabel1-0/+7
The EP0700MLP1 returns bogus data on the first register read access (reading the threshold parameter from register 0x00): edt_ft5x06 2-0038: crc error: 0xfc expected, got 0x40 It ignores writes until then. This patch adds a dummy read after which the number of sensors and parameter read/writes work correctly. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-10-28Input: edt-ft5x06 - add support for regulatorMylène Josserand1-0/+30
Add the support for enabling optional regulator that may be used as VCC source. Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com> Signed-off-by: Ondrej Jirman <megous@megous.com> Reviewed-by: Rob Herring <robh@kernel.org> # bindings Link: https://lore.kernel.org/r/20191029005806.3577376-2-megous@megous.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-08-12Input: edt-ft5x06 - no need to check return value of debugfs_create functionsGreg Kroah-Hartman1-2/+0
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-07-05Input: edt-ft5x06 - simplify event reporting codeDmitry Torokhov1-9/+4
Now that input_mt_report_slot_state() returns true if slot is active we no longer need a temporary for the slot state. Tested-by: Benoit Parrot <bparrot@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-30Input: edt-ft5x06 - use get_unaligned_be16()Dmitry Torokhov1-2/+3
Instead of doing conversion by hand, let's use the proper accessors. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Tested-by: Benoit Parrot <bparrot@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-03-03Input: edt-ft5x06 - convert to use SPDX identifierAndy Shevchenko1-14/+2
Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. While here, correct MODULE_LICENSE() string to be aligned with license text. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-03-03Input: edt-ft5x06 - enable ACPI enumerationAndy Shevchenko1-5/+2
ACPI allows to enumerate specific devices by using compatible strings. Enable that enumeration for EDT touchscreen devices. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-01-13Input: edt-ft5x06 - add offset support for ev-ft5726Marco Felsch1-0/+46
Unfortunately the evervision focaltech implementation uses two offset registers, one for the x coordinate and one for y. This patch extends the driver to handle those offset registers only for devices that support these. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-01-13Input: edt-ft5x06 - add support to update ev-ft5726 registersMarco Felsch1-5/+15
Currently only the threshold and gain parameters can be read. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-01-13Input: edt-ft5x06 - add support for Evervision FT5726Marco Felsch1-3/+41
Evervision displays are using different Focaltech touchscreen controllers. This commit adds the initial support for the ones using the FT5726 controller. Receiving the touch data is the same as for the GENERIC_FT but the x and y cooridnates are swapped. The main differences are the register addresses where the GAIN and THRESHOLD parameters are stored. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-24Input: edt-ft5x06 - fix error handling for factory mode on non-M06Dmitry Torokhov1-8/+6
When attempting enter factory mode on firmware that does not support it, we'd error out, but leave the device with interrupts disabled, and thus touch not working. Fix it by moving the check before we disable interrupts/allocate memory for debug buffers. Fixes: fd335ab04b3f ("Input: edt-ft5x06 - add support for M09 firmware version") Reviewed-by: Andi Shyti <andi@etezian.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-10-19Input: edt-ft5x06 - implement support for the EDT-M12 seriesSimon Budig1-11/+39
This adds support for the EDT M12 series of touchscreens. Signed-off-by: Simon Budig <simon.budig@kernelconcepts.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-10-19Input: edt-ft5x06 - make distinction between m06/m09/generic more clearSimon Budig1-29/+93
Since the driver also is useful for some non-EDT touchscreens based on the focaltec chips introduce the concept of a "generic" focaltec based touch. Use a better heuristics for model detection and be more specific in the source. Signed-off-by: Simon Budig <simon.budig@kernelconcepts.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-09-29Input: edt-ft5x06 - use managed devm_device_add_groupAndi Shyti1-7/+2
Commit 57b8ff070f98 ("driver core: add devm_device_add_group() and friends") has added the managed version for creating sysfs group files. Use devm_device_add_group instead of sysfs_create_group and remove the relative sysfs_remove_group and goto label. Signed-off-by: Andi Shyti <andi@etezian.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-09-11Input: edt-ft5x06 - fix access to non-existing registerLuca Ceresoli1-1/+2
reg_addr->reg_report_rate is supposed to exist in M06, not M09. The driver is written to skip avoids access to non-existing registers when the register address is NO_REGISTER (0xff). But reg_addr->reg_report_rate is initialized to 0x00 by devm_kzalloc() (in edt_ft5x06_ts_probe()) and not changed thereafter. So the checks do not work and an access to register 0x00 is done. Fix by setting reg_addr->reg_report_rate to NO_REGISTER. Also fix the only place where reg_report_rate is checked against zero instead of NO_REGISTER. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-05-22Input: edt-ft5x06 - increase allowed data range for threshold parameterMartin Kepplinger1-1/+1
The datasheet and application note does not mention an allowed range for the M09_REGISTER_THRESHOLD parameter. One of our customers needs to set lower values than 20 and they seem to work just fine on EDT EP0xx0M09 with T5x06 touch. So, lacking a known lower limit, we increase the range for thresholds, and set the lower limit to 0. The documentation is updated accordingly. Signed-off-by: Schoefegger Stefan <stefan.schoefegger@ginzinger.com> Signed-off-by: Manfred Schlaegl <manfred.schlaegl@ginzinger.com> Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-01-22Input: touchscreen - drop unnecessary calls to input_set_drvdataGuenter Roeck1-1/+0
Since there is no call to dev_get_drvdata() or input_get_drvdata(), the call to input_set_drvdata() is unnecessary and can be dropped. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-01-06Input: edt_ft5x06 - change msleep to usleep_range for small msecsAniroop Mathur1-2/+2
msleep(1~20) may not do what the caller intends, and will often sleep longer (~20 ms actual sleep for any value given in the 1~20ms range). This is not the desired behaviour for many cases like device resume time, device suspend time, device enable time, retry logic, etc. Thus, change msleep to usleep_range for precise wakeups. Signed-off-by: Aniroop Mathur <a.mathur@samsung.com> Acked-by: Simon Budig <simon.budig@kernelconcepts.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-22Input: remove duplicate ft6236 driverHans de Goede1-0/+8
The new(ish) ft6236 simply re-implements the M09 protocol of the (much) older edt-ft5x06.c driver. This commit removes this duplicate driver and adds the i2c ids and dt compatible string to the edt-ft5x06.c driver to keep compatibility. This commit also adds the standard touchscreen properties as optional properties to the edt,ft5x06 binding, these were documented in the focaltech,ft6236 bindingi, but were missing from the edt,ft5x06 doc. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-07-15Input: edt-ft5x06 - add support for inverting / swapping axesHans de Goede1-3/+4
Add support for inverting / swapping axes using the new touchscreen_parse_properties() and touchscreen_report_pos() functionality. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-07-15Input: of_touchscreen - add support for inverted / swapped axesHans de Goede1-1/+1
Extend touchscreen_parse_properties() with support for the touchscreen-inverted-x/y and touchscreen-swapped-x-y properties and add touchscreen_set_mt_pos() and touchscreen_report_pos() helper functions for storing coordinates into a input_mt_pos struct, or directly reporting them, taking these properties into account. This commit also modifies the existing callers of touchscreen_parse_properties() to pass in NULL for the new third argument, keeping the existing behavior. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-02-09Input: edt-ft5x06 - fix setting gain, offset, and threshold via device treePhilipp Zabel1-6/+12
A recent patch broke parsing the gain, offset, and threshold parameters from device tree. Instead of setting the cached values and writing them to the correct registers during probe, it would write the values from DT into the register address variables and never write them to the chip during normal operation. Fixes: 2e23b7a96372 ("Input: edt-ft5x06 - use generic properties API") Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-10-16Input: edt-ft5x06 - work around FT5506 firmware bugFranklin S Cooper Jr1-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>
2015-10-16Input: edt-ft5x06 - add support for FT5506Franklin S Cooper Jr1-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>
2015-10-16Input: edt-ft5x06 - add support for different max support pointsFranklin S Cooper Jr1-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>
2015-10-16Input: edt-ft5x06 - use max support points to determine how much to readFranklin S Cooper Jr1-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>
2015-10-06Input: edt-ft5x06 - do not call desc_to_gpio for invalid gpiosFranklin S Cooper Jr1-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>
2015-09-27Input: edt-ft5x06 - do not hardcode interrupt trigger typeDmitry Torokhov1-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>
2015-09-27Input: edt-ft5x06 - use generic properties APIDmitry Torokhov1-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>
2015-09-27Input: edt-ft5x06 - remove support for platform dataDmitry Torokhov1-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>
2015-09-27Input: edt-ft5x06 - drop parsing of irq gpioDmitry Torokhov1-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>
2015-09-27Input: edt-ft5x06 - switch to newer gpio frameworkFranklin S Cooper Jr1-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>
2015-07-17Input: drop owner assignment from i2c_driverKrzysztof Kozlowski1-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>
2015-07-11Input: of_touchscreen - switch to using device propertiesDmitry Torokhov1-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>
2015-06-25Input: improve parsing OF parameters for touchscreensDmitry Torokhov1-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>
2015-06-25Input: edt-ft5x06 - mark as direct input deviceDmitry Torokhov1-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>
2015-03-24Input: edt-ft5x06 - remove EV_SYN event reportMaxime Ripard1-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>
2015-03-24Input: edt-ft5x06 - allow to setting the maximum axes value through the DTMaxime Ripard1-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>
2014-12-30Merge branch 'for-linus' of ↵Linus Torvalds1-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
2014-12-17Merge branch 'for-linus' of ↵Linus Torvalds1-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 ...