summaryrefslogtreecommitdiffstats
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2015-09-03Input: elants_i2c - extend the calibration timeout to 12 secondsJames Chen1-1/+1
The 23 inch device found in Chrome project buddy requires 9.2~10.5 seconds to complete calibration. Let's increase calibration timeout to 12 seconds to give the device enough time. Signed-off-by: James Chen <james.chen@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-09-03Input: sparcspkr - fix module autoload for OF platform driversLuis de Bethencourt1-0/+2
These platform drivers have a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luis@debethencourt.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-09-03Input: regulator-haptic - fix module autoload for OF platform driverLuis de Bethencourt1-0/+1
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luis@debethencourt.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-09-03Input: pwm-beeper - fix module autoload for OF platform driverLuis de Bethencourt1-0/+1
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luis@debethencourt.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-09-03Input: ab8500-ponkey - Fix module autoload for OF platform driverLuis de Bethencourt1-0/+1
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luis@debethencourt.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-09-03Input: cyttsp - remove unnecessary MODULE_ALIAS()Javier Martinez Canillas2-2/+0
The drivers have a I2C device ID table that is used to create the module aliases and also "cyttsp" and "cyttsp4" are not supported I2C device IDs so these module aliases are never used. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-09-03Input: elan_i2c - add ACPI ID "ELAN1000"João Paulo Rechi Vita1-0/+1
This ACPI ID present in the DSDT of the ASUS E202SA laptop. Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-09-03Input: elan_i2c - use iap_version to get firmware informationDuson Lin1-6/+6
When driver is in IAP mode ic_type query may return 0xff. However iap_version will always be valid, so let's use it to determine parameters of the firmware that the controller is supposed to accept. Signed-off-by: Duson Lin <dusonlin@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-28Input: max8997_haptic - fix module aliasJavier Martinez Canillas1-2/+1
The driver is a platform driver and not a I2C driver so its modalias should be exported with MODULE_DEVICE_TABLE(platform,...) instead of MODULE_DEVICE_TABLE(i2c,...). Also, remove the unnecessary MODULE_ALIAS("platform:max8997-haptic") now that the correct module alias is created. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-28Input: elan_i2c - fix typos for validpage_countBenson Leung1-9/+9
Search for "vaildpage_count" and replace with "validpage_count". Signed-off-by: Benson Leung <bleung@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-26Input: psmouse - add small delay for IBM trackpoint pass-through modeStefan Assmann1-0/+4
There are trackpoint devices that fail to respond to the PS2 command PSMOUSE_CMD_GETID if immediately queried after the parent device is deactivated. Add a small delay for the hardware to get in a sane state before sending any PS2 commands. One example of such a system is: Lenovo ThinkPad X120e, model 30515QG synaptics: Touchpad model: 1, fw: 8.0, id: 0x1e2b1, caps: 0xd001a3/0x940300/0x121c00, board id: 1811, fw id: 797391 Signed-off-by: Stefan Assmann <sassmann@kpanic.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-24Input: elan_i2c - enable ELAN0100 acpi panelsMichele Curti2-0/+5
Enable ELAN0100 touchpad driver, found on a Asus X205TA laptop, to gai 2,3 fingers tap and 2 fingers scroll. Signed-off-by: Michele Curti <michele.curti@gmail.com> Reviewed-by: Duson Lin <dusonlin@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-24Input: gpio-keys - report error when disabling unsupported keyPeng Fan1-0/+5
When trying to disable a key that is not supported by the device we should report error, not do nothing and report success: root@yocto:/sys/devices/soc0/gpio-keys# cat keys 114-116 root@yocto:/sys/devices/soc0/gpio-keys# echo 77 > keys root@yocto:/sys/devices/soc0/gpio-keys# We want 'echo 77 > keys' to report an error, but silence to give us an illusion that all is 'ok'. Signed-off-by: Peng Fan <van.freenix@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-24Input: sur40 - fix error return codeJulia Lawall1-0/+1
Propagate error code on failure, or upper layers will be confused by returned 0 (success) code. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-21Input: sentelic - silence some underflow warningsDan Carpenter1-6/+8
I have a static checker that complains when we check for an upper bound but don't have a corresponding check for a lower bound. With this code, the upper bound check seems not really required, so it is not a bug to leave the lower bound check out as well. But let's silence the warning by making these variables unsigned. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-20Input: zhenhua - switch to using bitrev8()Yalin Wang1-11/+2
Instead of custom zhenhua_bitreverse() let's use generic bitrev8(). Signed-off-by: Yalin Wang <yalin.wang2010@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-19Input: cros_ec_keyb - replace KEYBOARD_CROS_EC dependencyJavier Martinez Canillas1-1/+1
The ChromeOS EC keyboard driver config depends on CROS_EC_PROTO but MFD_CROS_EC selects CROS_EC_PROTO instead. Mixing select and depends on is bad practice as it may lead to circular Kconfig dependencies. Since the platform device that is matched with the keyboard driver is registered by the ChromeOS EC mfd driver, KEYBOARD_CROS_EC really should depend on MFD_CROS_EC. And because this config option selects CROS_EC_PROTO, that dependency is met as well. So make the driver to depend on MFD_CROS_EC instead of CROS_EC_PROTO. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-16Input: cap11xx - add LED supportMatt Ranostay1-3/+141
Several cap11xx variants have LEDs that be can be controlled; let's plug the driver into the LED subsystem. Signed-off-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-13Input: elants_i2c - fix for devm_gpiod_get API changeStephen Rothwell1-9/+1
Flags are now mandatory for devm_gpiod_get(). So let's use proper flag to configure gpio for output instead of doing this by hand. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> [Dmitry: GPIOD_ASIS -> GPIOD_OUT_LOW] Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-07Input: elan_i2c - enable asynchronous probingDmitry Torokhov1-0/+1
It takes a bit of time to go through controller power up sequence and initialization. To not stall the overall boot progress let's probe the controller asynchronously, given that userspace is usually prepared for hot-plugging of input devices and thus does not rely on particular ordering. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-07Input: elants_i2c - enable asynchronous probingDmitry Torokhov1-0/+1
It takes a bit of time to go through controller power up sequence and initialization. To not stall the overall boot progress let's probe the controller asynchronously, given that userspace is usually prepared for hot-plugging of input devices and thus does not rely on particular ordering. Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Reviewed-by: Benson Leung <bleung@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-07Input: elants_i2c - wire up regulator supportDmitry Torokhov1-22/+162
Elan touchscreen controllers use two power supplies, vcc33 and vccio, and we need to enable them before trying to access the device. On X86 firmware usually does this, but on ARM it is usually left to the kernel. Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Reviewed-by: Benson Leung <bleung@chromium.org> Reviewed-by: Scott Liu <scott.liu@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-07Input: do not emit unneeded EV_SYN when suspendingDmitry Torokhov1-2/+8
Do not emit EV_SYN/SYN_REPORT on suspend if there were no keys that are still pressed as we are suspending the device (and in all other cases when input core is forcibly releasing keys via input_dev_release_keys() call). Reviewed-by: Benson Leung <bleung@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-05Input: elants_i2c - disable idle mode before updating firmwareJames Chen1-1/+7
If the device is in idle mode and is in the middle of a scan it may not have a chance to react to the reset and then IAP commands within required time interval and firmware update may fail. Let's bring the device out of idle mode before attempting to reset it so that the scan period is smaller and thus it can react to the command quicker. Signed-off-by: James Chen <james.chen@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-04Input: atmel_mxt_ts - remove warning on zero T44 countNick Dyer1-9/+8
Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-04Input: atmel_mxt_ts - initialise input slots with INPUT_MT_DIRECTNick Dyer1-0/+2
This indicates the device coordinates should be directly mapped to screen. This is valid since scaling/flipping/rotation should be done by configuring the MXT device. It also flags to Android using INPUT_PROP_DIRECT that the device should be treated as a touch screen by default, and removes the necessity for a default IDC file. Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-04Input: atmel_mxt_ts - disable interrupt for 50ms after resetNick Dyer1-1/+8
The CHG/interrupt line is momentarily set (approximately 100 ms) as an input after power-up or reset for diagnostic purposes. This may cause spurious interrupts, so disable interrupt handler during this period. Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-04Input: atmel_mxt_ts - improve device tree parsingNick Dyer1-13/+9
Use function rather than loop, define np to reduce wrapping. Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-04Input: atmel_mxt_ts - suspend/resume causes panic if input_dev fails to initPan Xinhui1-0/+6
input_dev may be NULL if mxt_initialize_input_device fails. But pm ops is still available and suspend/resume assume input_dev is not NULL. To fix this issue, we add a check if (!input_dev). Signed-off-by: Pan Xinhui <xinhuix.pan@intel.com> Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-04Input: atmel_mxt_ts - remove unused definesNick Dyer1-65/+1
Many of these values are out of date and they aren't used in the driver - all they do is increase the size of the kernel source. Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Acked-by: Benson Leung <bleung@chromium.org> Acked-by: Yufeng Shen <miletus@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-04Input: atmel_mxt_ts - use deep sleep mode when stoppedNick Dyer2-12/+111
The hardcoded 0x83 CTRL setting overrides other settings in that byte, enabling extra reporting that may not be useful on a particular platform. Implement improved suspend mechanism via deep sleep. By writing zero to both the active and idle cycle times the maXTouch device can be put into a deep sleep mode, using minimal power. It is necessary to issue a calibrate command after the chip has spent any time in deep sleep, however a soft reset is unnecessary. Use the old method on Chromebook Pixel via platform data option. This patch also deals with the situation where the power configuration is zero on probe, which would mean that the device never wakes up to execute commands. After a config download, the T7 power configuration may have changed so it is necessary to re-read it. Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Acked-by: Benson Leung <bleung@chromium.org> Acked-by: Yufeng Shen <miletus@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-04Input: Allow compile test of GPIO consumers if !GPIOLIBGeert Uytterhoeven4-12/+13
The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer functionality only, can still be compiled if GPIOLIB is not enabled. Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where appropriate. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-03Input: zforce - make the interrupt GPIO optionalDirk Behme1-14/+49
Add support for hardware which uses an I2C Serializer / Deserializer (SerDes) to communicate with the zFroce touch driver. In this case the SerDes will be configured as an interrupt controller and the zForce driver will have no access to poll the GPIO line. To support this, we add two dedicated new GPIOs in the device tree: reset-gpios and irq-gpios, with the irq-gpios being optional. To not break the existing device trees, the index based 'gpios' entries are still supported, but marked as deprecated. With this, if the interrupt GPIO is available, either via the old or new device tree style, the while loop will read and handle the packets as long as the GPIO indicates that the interrupt is asserted (existing, unchanged driver behavior). If the interrupt GPIO isn't available, i.e. not configured via the new device tree style, we are falling back to one read per ISR invocation (new behavior to support the SerDes). Note that the gpiod functions help to handle the optional GPIO: devm_gpiod_get_index_optional() will return NULL in case the interrupt GPIO isn't available. And gpiod_get_value_cansleep() does cover this, too, by returning 0 in this case. Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com> Reviewed-by: Heiko Stuebner <heiko.stuebner@bq.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-30Input: cyapa - do not try to enable proximity reporting on older devicesDudley Du1-4/+7
Avoid the driver generate warning message when the cyapa driver working with the old Gen5 trackpad device which does not support the proximity function. Those old Gen5 trackpad device all have the platform version less than 2. Signed-off-by: Dudley Du <dudl@cypress.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-30Input: cyapa - introduce device tree bindingDudley Du1-0/+10
Add device tree support for Cypress trackpad devices. Signed-off-by: Dudley Du <dudl@cypress.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-30Input: cyapa - add regulator vcc supportDudley Du2-0/+30
We need to power up the chip before we can initialize it. On systems that delegate task of powering up regulators to firmware we assume that we'll be simply given a dummy regulator. Signed-off-by: Dudley Du <dudl@cypress.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-30Input: touchscreen - export OF module alias informationJavier Martinez Canillas2-0/+2
The I2C core always reports the MODALIAS uevent as "i2c:<client name" regardless if the driver was matched using the I2C id_table or the of_match_table. So technically there's no need for a driver to export the OF table since currently it's not used. In fact, the I2C device ID table is mandatory for I2C drivers since a i2c_device_id is passed to the driver's probe function even if the I2C core used the OF table to match the driver. And since the I2C core uses different tables, OF-only drivers needs to have duplicated data that has to be kept in sync and also the dev node compatible manufacturer prefix is stripped when reporting the MODALIAS. To avoid the above, the I2C core behavior may be changed in the future to not require an I2C device table for OF-only drivers and report the OF module alias. So, it's better to also export the OF table to prevent breaking module autoloading if that happens. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-30Input: export I2C module alias information in missing driversJavier Martinez Canillas2-0/+2
The I2C core always reports the MODALIAS uevent as "i2c:<client name" regardless if the driver was matched using the I2C id_table or the of_match_table. So the driver needs to export the I2C table and this be built into the module or udev won't have the necessary information to auto load the correct module when the device is added. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-27Input: tsc2005 - convert to gpiodSebastian Reichel1-29/+18
The GPIOD API can be used from boardcode, so that the DT check can be removed. To avoid breaking existing boardcode, _optional() variant has been chosen. For completely removing the DT check, the regulator has also been made optional, so that it could be supplied from boardcode. As a side-effect the patch fixes the after-probe reset GPIO state, so that the device is not kept in reset state. Signed-off-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-27Input: tsc2005 - simplify drvdata acquisitionSebastian Reichel1-10/+6
Using dev_*_drvdata() instead of spi_*_drvdata() reduces lines of code and prepares the driver for possible tsc2004 support, which is i2c based. Signed-off-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-27Input: tsc2005 - convert to regmapSebastian Reichel2-112/+60
Convert driver so that it uses regmap instead of directly using spi_transfer for all register accesses. Signed-off-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-27Input: tsc2005 - fix Kconfig indentationSebastian Reichel1-4/+4
Replace spaces with tab, so that the tsc2005 Kconfig entry matches the other entries in drivers/input/touchscreen/Kconfig. Signed-off-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-27Input: tsc2005 - improve readability of register definesSebastian Reichel1-10/+18
Improve defines for first control byte by removing 0x00 prefix (the defines are for 8 bit values and not for 16 bit values) and expose register structure by exposing the shift. Signed-off-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-23Input: arizona-haptic - convert to use managed input devicesDmitry Torokhov1-22/+4
Using managed input device (via devm_input_allocate_device) simplifies error handling and driver removal paths and also silences CID# 712569. Reviewed-by: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-23Input: cyapa - add ACPI HID CYAP0002 for Gen6 devicesDudley Du1-0/+1
Add CYTP0002 to the list of ACPI HIDs recognized by the driver. Signed-off-by: Dudley Du <dudl@cypress.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-23Input: cyapa - fully support runtime suspend power managementDudley Du5-34/+70
Fix the the runtime suspend power management not working issue when system starts up and before user touches the trackpad device. TEST=test on Chromebook. Signed-off-by: Dudley Du <dudl@cypress.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-23Input: cyapa - add proximity support for gen5 and gen6 modulesDudley Du5-2/+101
Gen5 and Gen6 trackpad devices are able to detect and report object proximity data/events, add this function support in the cyapa driver through the ABS_DISTANCE event. Signed-off-by: Dudley Du <dudl@cypress.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-23Input: cyapa - add gen6 device module supportDudley Du5-4/+834
Based on the cyapa core, add support for basic functionality of the gen6 trackpad devices. The driver can automatically determine what protocol (gen3, gen5, or gen6) should be used with the attached trackpad device. Signed-off-by: Dudley Du <dudl@cypress.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-23Input: cyapa - rename 'gen5' to 'pip' for chared codeDudley Du4-604/+673
Change 'gen5' to 'pip' for all macros, variables and functions that are shared between gen5 and gen6 modules to make naming more clear and readable. Also fix a few spelling errors. Signed-off-by: Dudley Du <dudl@cypress.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-23Input: tc3589x-keypad - switch to using managed resourcesHimangi Saraogi1-38/+20
Let's switch the driver to use managed resources, this will simplify error handling and driver unbinding logic. Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>