summaryrefslogtreecommitdiffstats
path: root/drivers/input
AgeCommit message (Collapse)Author
2014-05-14Input: gpio_keys - convert to use devm_*Andy Shevchenko
This makes the error handling much more simpler than open-coding everything and in addition makes the probe function smaller an tidier. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-05-14Input: twl6040-vibra - use devm functionsFabio Estevam
Using devm_regulator_bulk_get() and devm_input_allocate_device() can make the code cleaner and smaller as we do not need to manually free resources the error and remove paths. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-05-14Input: ads7877 - remove bitrotted commentMark Brown
While searching for users of spi_async() I found a reference in the ad7877 driver to using it to initiate data transfer from the interrupt handler. However there is no code for this, instead the interrupt handler is a threaded handler and uses spi_sync() instead. Remove the bitrotted comment, though in actual fact the use case mentioned is a great use for spi_async() since it would cut down on latency handling the interrupt by saving us a context switch before we start SPI. This was previously implemented, it was removed in commit b534422b2d11 (Input: ad7877 - switch to using threaded IRQ) for code complexity reasons. It may be better to revert that commit instead. Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-05-14Input: evdev - get rid of old workaround for EVIOCGBITDmitry Torokhov
We put this workaround in 2008 and the offending userspace has been fixed up long time ago; the link in the message is no longer valid either, so it is time to retire it. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-05-14Input: add st-keyscan driverGabriel FERNANDEZ
This patch adds ST Keyscan driver to use the keypad hw a subset of ST boards provide. Specific board setup will be put in the given dt. Signed-off-by: Gabriel Fernandez <gabriel.fernandez@linaro.org> Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-05-14Input: ads7846 - correct log message for spi_sync() errorsMark Brown
While searching for users of spi_async() I got a false positive in the ads7846 driver, fix that. Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-05-14Input: tc3589x-keypad - support probing from device treeLinus Walleij
Implement device tree probing for the tc3589x keypad driver. This is modeled on the STMPE keypad driver and tested on the Ux500 TVK1281618 UIB. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-05-14Input: w90p910_ts - depend on ARCH_W90X900Jean Delvare
The w90p910_ts touchscreen driver is heavily architecture dependent, so there is no point in letting it be built on other architectures than it was written for. All other W90P910/W90X900 drivers already have that dependency, so it makes things more consistent and configuration easier. Signed-off-by: Jean Delvare <jdelvare@suse.de> Acked-by Wan Zongshun <mcuos.com@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-04-03Input: edt-ft5x06 - add a missing conditionDan Carpenter
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>
2014-03-30Input: appletouch - fix jumps when additional fingers are detectedClinton Sprain
Addresses issues related to when a second finger enters or leaves the field, causing the cursor to jump or the page to scroll unexpectedly; now, we discard any movement change that happens at the exact moment we detect a change in the number of fingers touching the trackpad. This doesn't completely resolve the issue but does greatly mitigate it. Signed-off-by: Clinton Sprain <clintonsprain@gmail.com> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-03-30Input: appletouch - implement sensor data smoothingClinton Sprain
Use smoothed version of sensor array data to calculate movement and add weight to prior values when calculating average. This gives more granular and more predictable movement. Signed-off-by: Clinton Sprain <clintonsprain@gmail.com> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-03-30Input: add driver for SOC button arrayLejun Zhu
This patch adds support for the GPIO buttons on some Intel Bay Trail tablets originally running Windows 8. The ACPI description of these buttons follows "Windows ACPI Design Guide for SoC Platforms". Signed-off-by: Lejun Zhu <lejun.zhu@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-03-30Input: pm8xxx-vibrator - add DT match tableStephen Boyd
The driver is only supported on DT enabled platforms. Convert the driver to DT so that it can probe properly. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-03-30Input: pmic8xxx-pwrkey - migrate to DTStephen Boyd
The driver is only supported on DT enabled platforms. Convert the driver to DT so that it can probe properly. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-03-30Input: pmic8xxx-keypad - migrate to DTStephen Boyd
The driver is only supported on DT enabled platforms. Convert the driver to DT so that it can probe properly. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-03-30Input: pmic8xxx-keypad - migrate to regmap APIsStephen Boyd
Use the regmap APIs for this driver instead of custom pm8xxx APIs. This breaks this driver's dependency on the pm8xxx APIs and allows us to easily port it to other bus protocols in the future. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-03-30Input: pmic8xxx-keypad - migrate to devm_* APIsStephen Boyd
Simplify the error paths and reduce the lines of code in this driver by using the devm_* APIs. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-03-30Input: pmic8xxx-keypad - fix build by removing gpio configurationStephen Boyd
The gpio configuration in this driver doesn't work because the gpio.h include doesn't exist. Remove the configuration as it isn't strictly necessary, allowing us to actually compile this driver. If it's needed in the future, it should be done via a pinctrl driver. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-03-30Input: add new driver for ARM CLPS711X keypadAlexander Shiyan
This patch adds a new driver for keypad for Cirrus Logic CLPS711X CPUs. Target CPU contain keyboard interface which can scan 8 column lines, so we can read row GPIOs to read status and determine asserted state. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-03-28Input: edt-ft5x06 - add support for M09 firmware versionLothar Waßmann
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>
2014-03-28Input: edt-ft5x06 - ignore touchdown eventsLothar Waßmann
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>
2014-03-28Input: edt-ft5x06 - adjust delays to conform datasheetLothar Waßmann
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>
2014-03-28Input: edt-ft5x06 - add DT supportLothar Waßmann
Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-03-28Input: edt-ft5x06 - several cleanups; no functional changeLothar Waßmann
- 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>
2014-03-28Input: appletouch - dial back fuzz settingClinton Sprain
Let's dial back the default fuzz setting for most devices using this driver, based on values from user feedback from forums and bug reports. Signed-off-by: Clinton Sprain <clintonsprain@gmail.com> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-03-28Input: remove obsolete tnetv107x driversArnd Bergmann
The tnetv107x platform is getting removed, so the touchscreen and keypad drivers for this platform will no longer be needed either. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Sekhar Nori <nsekhar@ti.com> Acked-by: Kevin Hilman <khilman@linaro.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linux-input@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-03-28Input: sirfsoc-onkey - set the capability of reporting KEY_POWERXianglong Du
commit a1a7521064428fc1cf8 moved to report EV_KEY event(KEY_POWER) instead of reporting EV_PWR event(KEY_SUSPEND), but it didn't enable the capability, so the KEY_POWER will not be reported to userspace by input core. this patch fixes the issue. Signed-off-by: Xianglong Du <Xianglong.Du@csr.com> Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-03-26Input: da9052_onkey - use correct register bit for key statusAnthony Olech
The wrong register bit of the DA9052/3 PMIC registers was used to determine the status on the ONKEY. Also a failure in reading the status register will no longer result in the work queue being rescheduled as that would result in a (potentially) endless retry. Signed-off-by: Anthony Olech <anthony.olech.opensource@diasemi.com> Acked-by: David Dajun Chen <david.chen@diasemi.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-03-23Input: wistron_btns - simplify dependenciesJean Delvare
Kconfig symbol X86_32 was introduced in October 2005, it's about time to use it. This clears the last occurrence of the legacy "X86 && !X86_64" construct :-) Signed-off-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-03-23Input: olpc_apsp - fix dependencies of OLPC AP-SP driverJean Delvare
I don't think the OLPC AP-SP driver is generally useful without OLPC support. So make it depend on OLPC, unless build testing is enabled. Signed-off-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-03-23Input: hp_sdc - use del_timer_sync() in exit pathThomas Gleixner
Make sure that no callback is running before we teardown the module. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-03-01Merge tag 'v3.14-rc4' into nextDmitry Torokhov
Merge with Linux 3.14-rc4 to bring devm_request_any_context_irq().
2014-02-17Input: imx_keypad - Propagate the real error code on platform_get_irq() failureFabio Estevam
No need to return a 'fake' return value on platform_get_irq() failure. Just return the error code itself instead. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-02-15Input: sirfsoc-onkey - update copyright years to 2014Barry Song
Happy the year of horse, 2014. ,((((^`\ (((( (6 \ ,((((( , \ ,,,_ ,((((( /"._ ,`, ((((\\ ,... ,(((( / `-.-' ))) ;' `"'"'""(((( ( ((( / ((( \ )) | | (( | . ' | )) \ _ ' `t ,.') ( | y;- -,-""'"-.\ \/ ) / ./ ) / `\ \ |./ ( ( / /' || \\ //'| || \\ _//'|| || )) |_/ || \_\ |_/ || `'" \_\ `'" Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-02-15Input: sirfsoc-onkey - report release event by detecting pin statusXianglong Du
This change adds a delayed_work to detect the release of onkey since HW will not generate interrupt for it. At the same time, we move the KEY event to POWER instead of SUSPEND, which will be suitable for both Android and Linux. Userspace PowerManager Daemon will decide to suspend or shutdown based on how long we have touched onkey. Signed-off-by: Xianglong Du <Xianglong.Du@csr.com> Signed-off-by: Rongjun Ying <Rongjun.Ying@csr.com> Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-02-15Input: sirfsoc-onkey - use dev_get_drvdata instead of platform_get_drvdataXianglong Du
In resume entry, use dev_get_drvdata() instead of to_platform_device(dev) + platform_get_drvdata(pdev). Signed-off-by: Xianglong Du <Xianglong.Du@csr.com> Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-02-15Input: sirfsoc-onkey - fix namespace pwrc_resume functionXianglong Du
This function lost namespace, this patch fixes it. Signed-off-by: Xianglong Du <Xianglong.Du@csr.com> Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-02-15Input: sirfsoc-onkey - drop the IRQF_SHARED flagBarry Song
Since the IRQ handler always returns IRQ_HANDLED it means this irq is not a shared IRQ at all. Or at least, the SW is not self-consistent now. Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-02-15Input: sirfsoc-onkey - implement open and close methodsDmitry Torokhov
We can control whetehr device generates interrupts or not so let's implement open and close methods of input device so that we do not do any processing until there are users. Tested-by: Xianglong Du <Xianglong.Du@csr.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-02-12Input: ims-pcu - add commands supported by the new version of the FWAndrey Smirnov
New version of the PCU firmware supports two new commands: - IMS_PCU_CMD_OFN_SET_CONFIG which allows to write data to the registers of one finger navigation(OFN) chip present on the device - IMS_PCU_CMD_OFN_GET_CONFIG which allows to read data form the registers of said chip. This commit adds two helper functions to use those commands and sysfs attributes to use them. It also exposes some OFN configuration parameters via sysfs. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-02-12Input: ims-pcu - fix error unwinding path in application modeDmitry Torokhov
We first create backlight and then input devices so we should destroy them in opposite order when handling errors. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-02-12Input: uinput - add UI_GET_SYSNAME ioctl to retrieve the sysfs pathBenjamin Tissoires
uinput is used in the xorg-integration-tests suite and in the wayland test suite. These automated tests suites create many virtual input devices and then hook something to read these newly created devices. Currently, uinput does not provide the created input device, which means that we rely on an heuristic to guess which input node was created. The problem is that is heuristic is subjected to races between different uinput devices or even with physical devices. Having a way to retrieve the sysfs path allows us to find without any doubts the event node. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-30Input: uinput - breaks by goto out in uinput_ioctl_handlerBenjamin Tisssoires
The current implementation prevents us to add variable-length ioctl. Use a bunch of gotos instead of break to allow us to do so. No functional changes. Signed-off-by: Benjamin Tisssoires <benjamin.tissoires@redhat.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-27Input: zforce - add devicetree supportHeiko Stübner
This makes the zforce driver usable on devicetree-based platforms too. Signed-off-by: Heiko Stuebner <heiko.stuebner@bqreaders.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-27Input: zforce - use internal pdata pointer instead of dev_get_platdataHeiko Stübner
Devicetree support will be creating its own platfprm data structure that is not attached to the device. Let's use the internal pointer to the pdata instead of re-fetching it with dev_get_platdata(). Signed-off-by: Heiko Stuebner <heiko.stuebner@bqreaders.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-27Input: zforce - reduce stack memory allocated to framesLuis Ortega
A frame is a u8 array with the following structure: [PAYLOAD_HEADER, PAYLOAD_LENGTH, ...PAYLOAD_BODY...] PAYLOAD_BODY can be at most 255 bytes long, as it's size is represented by PAYLOAD_LENGTH. Therefore we can reduce the stack memory allocated to payload_buffer[] roughly by half, from 512 to 257 bytes. Signed-off-by: Luis Ortega <luiorpe1@upv.es> Acked-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Heiko Stuebner <heiko@sntech.de> - bq Cervantes (imx6sl) Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-27Input: zforce - remove unnecessary payload data checksLuis Ortega
The function zforce_read_packet() reads 2 values (bytes) of payload header, validates them and then proceeds to read the payload body. The function stores all these in a u8 buffer. The PAYLOAD_LENGTH check seems to be trying to detect an overflow error. However, since we are just reading a u8 value from the buffer, these checks are unnecessary and we should simply compare against zero. Signed-off-by: Luis Ortega <luiorpe1@upv.es> Acked-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Heiko Stuebner <heiko@sntech.de> - bq Cervantes (imx6sl) Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-27Input: zforce - fix lines exceeding 80 columnsLuis Ortega
Fixed lines exceeding 80 characters long wherever possible, as per the coding style. Signed-off-by: Luis Ortega <luiorpe1@upv.es> Acked-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-27Input: zforce - fix spelling errorsLuis Ortega
Fixed a few spelling errors. Signed-off-by: Luis Ortega <luiorpe1@upv.es> Acked-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-27Input: gtco - fix usb_dev leakAlexey Khoroshilov
There is usb_get_dev() in gtco_probe(), but there is no usb_put_dev() anywhere in the driver. As pointed out by Dmitry Torokhov: The lifetime of gtco structure is already directly tied to lifetime of usb_dev: when destroying usb_dev driver core will call remove() function of currently bound driver (in our case gtco) which will destroy gtco memory. Taking additional reference is not needed here. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>