aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2014-08-19Input: atmel_mxt_ts - improve description of gpio-keymap propertyNick Dyer1-0/+11
The below patch improves the documentation for the gpio-property. Stephen Warren has a good example here: https://github.com/swarren/linux-tegra/commit/09789801 trackpad@4b { compatible = "atmel,maxtouch"; reg = <0x4b>; interrupt-parent = <&gpio>; interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_LOW>; linux,gpio-keymap = <0 0 0 BTN_LEFT>; }; This maps BTN_LEFT to the 4th bit of the T19 message. Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-14Merge branch 'next' into for-linusDmitry Torokhov7-201/+459
Prepare second round of input updates for 3.17.
2014-08-13Input: edt-ft5x06 - remove superfluous assignmentMaks Naumov1-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>
2014-08-13Input: xpad - add support for Xbox One controllersTed Mielczarek1-17/+157
Xbox One controllers require an initialization message to start sending data, so xpad_init_output becomes a required function. The Xbox One controller does not have LEDs like the Xbox 360 controller, so that functionality is not implemented. The format of messages controlling rumble is currently undocumented, so rumble support is not yet implemented. Note that Xbox One controller advertises three interfaces with the same interface class, subclass and protocol, so we have to also match against interface number. Signed-off-by: Ted Mielczarek <ted@mielczarek.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-13Input: atmel_mxt_ts - fix a few issues reported by CoverityDmitry Torokhov1-6/+11
This should fix the following issues reported by Coverity: *** CID 1230625: Logically dead code (DEADCODE) /drivers/input/touchscreen/atmel_mxt_ts.c: 1692 in mxt_initialize() *** CID 1230627: Missing break in switch (MISSING_BREAK) /drivers/input/touchscreen/atmel_mxt_ts.c: 1436 in mxt_get_object_table() *** CID 1230629: Out-of-bounds write (OVERRUN) /drivers/input/touchscreen/atmel_mxt_ts.c: 1267 in mxt_update_cfg() *** CID 1230632: Unused pointer value (UNUSED_VALUE) /drivers/input/touchscreen/atmel_mxt_ts.c: 1211 in mxt_update_cfg() Acked-by: Nick Dyer <nick.dyer@itdev.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-13Input: atmel_mxt_ts - split config update a bitDmitry Torokhov1-125/+145
Let's split config update code a bit so it is hopefully a bit easier to read. Also, the firmware update callback should be the entity releasing firmware blob, not lower layers. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
2014-08-13Input: atmel_mxt_ts - simplify mxt_initialize a bitDmitry Torokhov1-39/+42
I think having control flow with 2 goto/labels/flags is quite hard to read, this version is a bit more readable IMO. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
2014-08-12Input: joystick - use get_cycles on ARMv8Mark Brown1-1/+1
As with ARM the ARMv8 architecture provides a cycle counter which can be used to provide a high resolution time for the joystick driver and silence the build warning that results from not having a precise timer on ARMv8, making allmodconfig and allyesconfig quieter. Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-12Input: wacom - fix compiler warning if !CONFIG_PMGeert Uytterhoeven1-0/+2
If CONFIG_PM is not set: drivers/hid/wacom_sys.c:1436: warning: ‘wacom_reset_resume’ defined but not used Protect the unused functions by #ifdef CONFIG_PM to fix this. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-08Input: cap1106 - allow changing key mapping from userspaceDmitry Torokhov1-1/+7
Wire up support for EVIOC{G|S}KEYCODE to allow users change key mappings from userspace. Reviewed-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-08Input: synaptics - use firmware data for Cr-48Henrik Rydberg1-2/+68
The profile sensor clickpad in a Cr-48 Chromebook does a reasonable job of tracking individual fingers. This tracking isn't perfect, but, experiments show that it works better than just passing "semi-mt" data to userspace, and making userspace try to deduce where the fingers are given a bounding box. This patch tries to report correct two-finger positions instead of the {(min_x, min_y), (max_x, max_y)} for profile sensor clickpads on Cr-48 chromebooks. Note that this device's firmware always reports the higher (smaller y) finger in the "sgm" packet, and the lower (larger y) finger in the "agm" packet. Thus, when a new finger arrives on the pad, the kernel driver uses input core's contact tracking facilities to match contacts with slots. Inspired by patch by Daniel Kurtz <djkurtz@chromium.org> and Chung-yih Wang <cywang@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Reviewed-by: Benson Leung <bleung@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-07Input: synaptics - properly initialize slots for semi-MTDmitry Torokhov1-3/+3
Semi-MT devices are pointers too, so let's tell that to input_mt_init_slots(), as well as let it set up the devices as semi-MT, instead of us doing it manually. Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Benson Leung <bleung@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-07Input: MT - make slot cleanup callable outside mt_sync_frame()Henrik Rydberg2-11/+28
Some semi-mt drivers use the slots in a manual way, but may still want to call parts of the frame synchronization logic. This patch makes input_mt_drop_unused callable from those drivers. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Reviewed-by: Benson Leung <bleung@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-07Input: atmel_mxt_ts - mXT224 DMA quirk was fixed in firmware v2.0.AANick Dyer1-3/+5
Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-07Input: wacom - update the ABI doc according to latest changesBenjamin Tissoires1-43/+27
Now the devices show up under hid no matter the connection (for USB and Bluetooth, not serial nor i2c). The USB devices can now be easily found under /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n> The Bluetooth devices could also be found under this path since their inclusion (April 2010), so this patch fixes the non-precise "hidraw*" path for them. The ABI has been unified while setting the LEDs and OLEDs. So Bluetooth devices lost their own LED selector but use the USB sysfs attribute. For OLEDs, Bluetooth devices handle only 1-bit images instead of 4 for USB. The documentation has been updated to match this. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-06Merge branch 'next' into for-linusDmitry Torokhov9844-252603/+502307
Prepare first round of input updates for 3.17.
2014-08-06Merge branch 'wacom' into nextDmitry Torokhov11-2119/+1361
Merge large update to Wacom driver, converting it from USB to a HID driver and unifying wired and bluetooth support, from Benjamin Tissoires.
2014-08-06Input: wacom - only register once the MODULE_* macrosBenjamin Tissoires2-4/+5
Putting the various MODULE_* makes them appear several times in modinfo because wacom.h is used both in wacom_sys.c and wacom_wac.h. Having the macros near the module declaration makes them appear only once. Add also MODULE_VERSION(DRIVER_VERSION) to export the current version number. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-06Input: HID - remove hid-wacom Bluetooth driverBenjamin Tissoires3-982/+2
Bluetooth Wacom tablets are now handled by the regular wacom.ko driver. Remove the now useless hid-wacom driver. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Tested-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-06Input: wacom - add copyright note and bump version to 2.0Benjamin Tissoires1-1/+4
Reviewed-by: Ping Cheng <pingc@wacom.com> Tested-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-06Input: wacom - remove passing id for wacom_set_reportPrzemo Firszt1-18/+17
Every call of wacom_set_report was passing "id" as a separate parameter and buffer also passed the same information. We can use first u8 of the buffer instead of "id" Signed-off-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Tested-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-06Input: wacom - check for bluetooth protocol while setting OLEDsBenjamin Tissoires1-8/+21
Bluetooth Intuos 4 use 1-bit definition while the USB ones use a 4-bits definition. This changes the size of the raw image we receive, and thus the kernel will only accept 1-bit images for Bluetooth and 4-bits for USB. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Przemo Firszt <przemo@firszt.eu> Reviewed-by: Ping Cheng <pingc@wacom.com> Tested-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-06Input: wacom - handle Intuos 4 BT in wacom.koBenjamin Tissoires5-2/+92
A good point of this change is that now, the Intuos4 bluetooth can handle the different tools (artpen, airbrush, mice), and we get a common interface between USB and BT for accessing the LEDs/OLEDs. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Tested-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-06Input: wacom - handle Graphire BT tablets in wacom.koBenjamin Tissoires5-5/+132
First, merge the Graphire BT tablet. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Tested-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-06Input: wacom - prepare the driver to include BT devicesBenjamin Tissoires2-3/+69
Now that wacom is a hid driver, there is no point in having a separate driver for bluetooth devices. This patch prepares the common paths of Bluetooth devices in the common wacom driver. It also adds the sysfs file "speed" used by Bluetooth devices. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Tested-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-08-06Input: hyperv-keyboard - register as a wakeup sourceDexuan Cui1-0/+13
With this patch, we can press a key to wake up the VM after the VM executes "echo freeze > /sys/power/state". Signed-off-by: Dexuan Cui <decui@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-31Input: imx_keypad - remove ifdef round PM methodsFabio Estevam1-4/+2
We can annotate the suspend/resume functions with '__maybe_unused' and get rid of the ifdef, which makes the code smaller and simpler. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-31Input: jornada720_ts - get rid of space indentation and use tabPramod Gurav1-13/+12
Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-31Input: jornada720_ts - switch to using managed resourcesPramod Gurav1-32/+13
This switches the driver to using managed resources to simplify error handling and to do away with remove function. Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-30Input: alps - Rushmore and v7 resolution supportHans de Goede2-0/+50
Add support for querying the physical size from the touchpad for Rushmore and v7 touchpads, and use that to tell userspace the device resolution. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-30Input: mcs5000_ts - remove ifdef around power management methodsFabio Estevam1-4/+2
We can annonate the suspend/resume functions with '__maybe_unused' and get rid of the ifdef, which makes the code smaller and simpler. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-30Input: mcs5000_ts - protect PM functions with CONFIG_PM_SLEEPFabio Estevam1-1/+1
When a kernel has CONFIG_PM=y and CONFIG_PM_SLEEP=n the following warnings are seen: drivers/input/touchscreen/mcs5000_ts.c:252:12: warning: 'mcs5000_ts_suspend' defined but not used [-Wunused-function] static int mcs5000_ts_suspend(struct device *dev) ^ drivers/input/touchscreen/mcs5000_ts.c:262:12: warning: 'mcs5000_ts_resume' defined but not used [-Wunused-function] static int mcs5000_ts_resume(struct device *dev) Protect the suspend/resume functions with CONFIG_PM_SLEEP in order to fix these build warnings. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-30Input: ads7846 - release resources on failure for clean exitPramod Gurav1-2/+4
Input device must be released(input_free_device) when ads7846_probe_dt fails. This fixes the same by releasing resources on failure. Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-28Input: wacom - add support for 0x12C ISDv4 sensorJason Gerecke1-0/+4
Signed-off-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-28Input: atmel_mxt_ts - use deep sleep mode when stoppedNick Dyer1-26/+73
By writing zero to both the active and idle cycle times the maXTouch device is put into a deep sleep mode when it consumes minimal power. It is unnecessary to change the configuration of any other objects (for example to disable T9 touchscreen). It is counterproductive to reset the chip on resume, it will result in a long delay. However it is necessary to issue a calibrate command after the chip has spent any time in deep sleep. 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. 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>
2014-07-28ARM: dts: am437x-gp-evm: Update binding for touchscreen sizeRoger Quadros1-2/+2
Update the bindings for touchscreen size. Signed-off-by: Roger Quadros <rogerq@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-28ARM: dts: am43x-epos-evm: Update binding for touchscreen sizeRoger Quadros1-2/+2
Update the bindings for touchscreen size. Signed-off-by: Roger Quadros <rogerq@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-28Input: pixcir_i2c_ts - add device tree supportRoger Quadros3-0/+104
Provide device tree support and binding information. Also provide support for a new chip "pixcir_tangoc". Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-28Input: pixcir_i2c_ts - support up to 5 fingers and hardware tracking IDsRoger Quadros2-17/+69
Some variants of the Pixcir touch controller support up to 5 simultaneous fingers and hardware tracking IDs. Prepare the driver for that. Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-28Input: pixcir_i2c_ts - use Type-B Multi-Touch protocolRoger Quadros1-31/+94
Switch to using the Type-B Multi-Touch protocol. Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - add support for v7 devicesYunkang Tang2-3/+280
Such as found on the new Toshiba Portégé Z30-A and Z40-A. Signed-off-by: Yunkang Tang <yunkang.tang@cn.alps.com> [hdegoede@redhat.com: Remove softbutton handling, this is done in userspace] [hdegoede@redhat.com: Report INPUT_PROP_BUTTONPAD] [hdegoede@redhat.com: Do not report fake PRESSURE, reporting BTN_TOUCH is enough] [hdegoede@redhat.com: Various cleanups / refactoring] Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - cache firmware versionHans de Goede2-0/+5
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - change decode function prototype to return an intHans de Goede2-4/+10
So that decode functions can return a failure when appropriate. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - report 2 touches when we've > 2 fingersHans de Goede1-1/+1
If we detect more then 2 fingers report 2 touches, rather then only reporting the upper left corner of the bounding box. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - add an alps_report_semi_mt_data functionHans de Goede1-47/+29
Move all the semi-mt specific handling shared between the v3 and v4 handling code to a common helper function. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - use single touch data when v3 mt data contains only one fingerHans de Goede1-1/+1
For v3 protocol devices, use the more accurate single touch data when the mt data contains only one finger. Note the mt data reporting a finger count of 1 should never happen, but better safe then sorry. This brings the v3 bitmap handling in line with what the v4 code does, allowing to factor out the common bits into a helper function. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - use standard contact tracking instead of DIYHans de Goede1-36/+16
When there are 2 fingers on the pad we don't know which one is which, so use input_mt_assign_slots to make sure the right set of coordinates ends up in the right slot. Besides ensuring things end up in the right slot, this also results in a nice cleanup, since sync_frame also handles non mt position and btn_touch reporting. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - use struct input_mt_pos to track coordinatesHans de Goede2-122/+104
This is a preparation patch for switching the DIY mt handling to using input_mt_assign_slots && input_mt_sync_frame. struct alps_fields is quite large, so while making changes to almost all uses of it lets put it in our priv data instead of on the stack. Having it in our priv data also allows using it directly for storing values which need to be cached, rather then having separate x, y, z, fingers, etc. copies in our priv data. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - process_bitmap: round down when spreading adjescent fingers over 2 pointsHans de Goede1-2/+2
This fixes 2 fingers at the same height or width on the touchpad getting reported at different y / x coordinates. Note num_bits is always at least 1. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-26Input: alps - process_bitmap: fix counting of high point bitsHans de Goede1-2/+1
alps_process_bitmap was resetting the point bit-count as soon as it saw 2 0 bits in a row. This means that unless the high point actually is at the end of the bitmap, it would always get its num_bits set to 0. Instead reset num_bits to 0 on a 0->1 transition, so that with > 2 fingers we only count the number of bits occupied by the highest finger. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>