aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAge
* Input: samsung-keypad - enable compiling on other platformsDmitry Torokhov2011-11-15
| | | | | | | | There is nothing in keypad platform definitions that requires the driver be complied on Samsung platform only, so let's move them out of the platform subdirectory and relax the dependencies. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: samsung-keypad - switch to using SIMPLE_DEV_PM_OPSDmitry Torokhov2011-11-10
| | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: synaptics - add support for Relative modeDaniel Drake2011-11-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the synaptics driver puts the device into Absolute mode. As explained in the synaptics documentation section 3.2, in this mode, the device sends a continuous stream of packets at the maximum rate to the host when the user's fingers are near or on the pad or pressing buttons, and continues streaming for 1 second afterwards. These packets are even sent when there is no new information to report, even when they are duplicates of the previous packet. For embedded systems this is a bit much - it results in a huge and uninterrupted stream of interrupts at high rate. This patch adds support for Relative mode, which can be selected as a new psmouse protocol. In this mode, the device does not send duplicate packets and acts like a standard PS/2 mouse. However, synaptics-specific functionality is still available, such as the ability to set the packet rate, and rather than disabling gestures and taps at the hardware level unconditionally, a 'synaptics_disable_gesture' sysfs attribute has been added to allow control of this functionality. This solves a long standing OLPC issue: synaptics hardware enables tap to click by default (even in the default relative mode), but we have found this to be inappropriate for young children and first time computer users. Enabling the synaptics driver disables tap-to-click, but we have previously been unable to use this because it also enables Absolute mode, which is too "spammy" for our desires and actually overloads our EC with its continuous stream of packets. Now we can enable the synaptics driver, disabling tap to click while retaining the less noisy Relative mode. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: convert obsolete strict_strtox to kstrtoxJJ Ding2011-11-10
| | | | | | | | | | | With commit 67d0a0754455f89ef3946946159d8ec9e45ce33a we mark strict_strtox as obsolete. Convert all remaining such uses in drivers/input/. Also change long to appropriate types, and return error conditions from kstrtox separately, as Dmitry sugguests. Signed-off-by: JJ Ding <dgdunix@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: ALPS - add semi-MT support for v3 protocolSeth Forshee2011-11-08
| | | | | | Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: ALPS - add support for protocol versions 3 and 4Seth Forshee2011-11-08
| | | | | | | | | | | | | | This patch adds support for two ALPS touchpad protocols not supported currently by the driver, which I am arbitrarily naming version 3 and version 4. Support is single-touch only at this time, although both protocols are capable of limited multitouch support. Thanks to Andrew Skalski, who did the initial reverse-engineering of the v3 protocol. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: ALPS - remove assumptions about packet sizeSeth Forshee2011-11-08
| | | | | | | | | | In preparation for version 4 protocol support, which has 8-byte data packets, remove all hard-coded assumptions about packet size and use psmouse->pktsize instead. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: ALPS - add protocol version field in alps_model_infoSeth Forshee2011-11-08
| | | | | | | | | | | In preparation for adding support for more ALPS protocol versions, add a field for the protocol version to the model info instead of using a field in the flags. OLDPROTO and !OLDPROTO are now called version 1 and version 2, repsectively. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: ALPS - move protocol information to DocumentationSeth Forshee2011-11-08
| | | | | | | | | | | In preparation for new protocol support, move the protocol information currently documented in alps.c to Documentation/input/alps.txt, where it can be expanded without cluttering up the driver. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - ignore unwanted bamboo packetsChris Bagwell2011-11-07
| | | | | | | | | | | | | | | | | | Bamboo's Pen and Touch packets always start with a value of 0x02 in first byte. In 3rd gen Bamboo's, the hw is now periodically sending some additional packets with unrelated data and uses a value other than 0x02 to inform driver this. Ignore those packets now. This was reported by users as bad behavior in Gimp. The invalid packets being processed made the stylus report out of proximity for the 1 packet and this triggered some secondary bug which caused Gimp to stop drawing until user really took pen out of proximity of tablet. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: usbtouchscreen - add ELO IntelliTouch 2700 supportMichael Gebetsroither2011-11-05
| | | | | | Signed-off-by: Michael Gebetsroither <michael@mgeb.org> Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: i8042 - also perform controller reset when suspendingDmitry Torokhov2011-11-05
| | | | | | | | | | | | | | | In addition to some laptops needing i8042 reset after resuming from S2R to get their touchpads working there is another class of laptops - ones that need i8042 reset before going to S2R, otherwise they will simply reboot instead of resuming. See https://bugzilla.kernel.org/show_bug.cgi?id=15612 This change forces reset of i8042 before doing S2R. Reported-by: Stefan Koch <stefan_koch@gmx.net> Tested-by: Alexander van Loon <a.vanloon@alexandervanloon.nl> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: tca8418_keypad - initial driver releaseKyle Manna2011-10-29
| | | | | | | | | This driver has been tested with hardware and works as expected. To use it add the platform data as appropriate and register it with the corresponding I2C bus. Signed-off-by: Kyle Manna <kyle.manna@fuel7.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - 3rd gen Bamboo P&Touch packet supportChris Bagwell2011-10-27
| | | | | | | | | | | | | | 3rd generation Bamboo Pen and Touch tablets reuse the older stylus packet but add an extra fixed zero pad byte to end. The touch packets are quite different since it supports tracking of up to 16 touches. The packet is 64-byte fixed size but contains up to 15 smaller messages indicating data for a single touch or for tablet button presses. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - read 3rd gen Bamboo Touch HID dataChris Bagwell2011-10-27
| | | | | | | | | | | | | Override invalid pen based pktlen and x/y_max with touch values from HID report. Since active area of pen and touch are same on these devices, set physical x/y size while pen x/y_max and resolution are still valid. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - relax Bamboo stylus ID checkChris Bagwell2011-10-27
| | | | | | | | | | | | Bit 0x02 always means tip versus eraser. Bit 0x01 is something related to version of stylus and different values are starting to be used. Relaxing proximity check is required to be used with 3rd generation Bamboo Pen and Touch tablets. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - add some comments to wacom_parse_hidChris Bagwell2011-10-27
| | | | | | Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - remove unused bamboo HID parsingChris Bagwell2011-10-27
| | | | | | | | | | Bamboo's do not declared a Digitizer-Stylus so the if() was never executed. wacom_features already contains correct stylus packet length. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - cleanup feature report for bamboosChris Bagwell2011-10-27
| | | | | | | | | | | | | | Only the stylus interface on Bamboo's has a feature report that can be used to set to wacom mode. The touch interface only has 1 report mode and will return errors for those get/sets requests. The get request was always erroring out because it was not marked as an input request. Only down side of error was needlessly resending the set request 5 times. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: adp5589-keys - add support for the ADP5585 derivativesMichael Hennerich2011-10-19
| | | | | | | | | | | | | | | | The ADP5585 family keypad decoder and IO expander is similar to the ADP5589, however it features less IO pins, and lacks hardware assisted key-lock functionality. Unfortunately the register addresses are different, as well as the event codes and bit organization within the port related registers. Move ADP5589 Register defines from the header file into the main source file. Add new defines while making sure we don't break existing platform_data. Add register address translation, and turn device specific defines into variables. Introduce some helper functions and disable functions that doesn't exist on the added devices. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: imx_keypad - add pm suspend and resume supportHui Wang2011-10-13
| | | | | | | | | | | | | The imx_keypad driver was indicating that it was wakeup capable in imx_keypad_probe(), but it didn't implement suspend or resume methods. According to the i.MX series MCU Reference Manual, the kpp (keypad port) is a major wake up source which can detect any key press even in low power mode and even when there is no clock. Signed-off-by: Hui Wang <jason77.wang@gmail.com> Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: force feedback - potential integer wrap in input_ff_create()Dan Carpenter2011-10-13
| | | | | | | | | | | | | | | | | | | | | The problem here is that max_effects can wrap on 32 bits systems. We'd allocate a smaller amount of data than sizeof(struct ff_device). The call to kcalloc() on the next line would fail but it would write the NULL return outside of the memory we just allocated causing data corruption. The call path is that uinput_setup_device() get ->ff_effects_max from the user and sets the value in the ->private_data struct. From there it is: -> uinput_ioctl_handler() -> uinput_create_device() -> input_ff_create(dev, udev->ff_effects_max); I've also changed ff_effects_max so it's an unsigned int instead of a signed int as a cleanup. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: tsc2007 - make sure that X plate resistance is specifiedPhilip Rakity2011-10-11
| | | | | | | | | Abort driver initialization if X plate resistance was not specified in platform data as it will cause pressure to be always calculated as 0, and making userspace ignore touch coordinates. Signed-off-by: Philip Rakity <prakity@marvell.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: serio_raw - fix memory leak when closing char deviceDmitry Torokhov2011-10-10
| | | | | | | | | | | | | | | | Apparently we never freed memory allocated when users open our char devices nor removed old users from the list of connected clients. Also unregister misc device immediately upon disconnecting the port instead of waiting until last user drops off (refcounting in misc device code will make sure needed pieces stay around while they are needed) and make sure we are not holing holding serio_raw_mutex when registering/unregistering misc device. This should fix potential deadlock between serio_raw and misc device code uncovered by lockdep and reported by Thomas Tuttle. Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: serio_raw - kick clients when disconnecting portDmitry Torokhov2011-10-10
| | | | | | | | | | | | Send SIGIO/POLL_HUP and otherwise wake up waiters when corresponding serio port is being disconnected. Also check if port is dead in serio_raw_poll and signal POLLHUP|POLLERR. This should speed up process of releasing dead devices by userspace applications. Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: serio_raw - explicitly mark disconnected ports as deadDmitry Torokhov2011-10-10
| | | | | | | | | | Instead of relying on setting serio_raw->serio to NULL upon disconnecting ports mark them explicitly as "dead". Also take and carry reference to underlying serio port to make sure it does not go away until we are done with it. Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: serio_raw - fix coding style issuesDmitry Torokhov2011-10-10
| | | | | | | This makes checkpatch.pl happy with the driver Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: serio_raw - use dev_*() for messagesDmitry Torokhov2011-10-10
| | | | | | | This will ensure our reporting is consistent with the rest of the system. Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: serio_raw - use bool for boolean dataDmitry Torokhov2011-10-10
| | | | | Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: serio_raw - perform proper locking when adding clients to listDmitry Torokhov2011-10-10
| | | | | | | | | Make sure we hold serio lock when adding clients to client list so that we do not race with serio_raw_release() removing clients from the same list. Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: serio_raw - rename serio_raw_list to serio_raw_clientDmitry Torokhov2011-10-10
| | | | | | | | | 'serio_raw_list' and 'list' names do not accurately represent their objects and are extremely confusing when reading the code. Let's use better suited names. Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: serio_raw - use kref instead of rolling out its own refcountingDmitry Torokhov2011-10-10
| | | | | Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: psmouse - switch to using dev_*() for messagesDmitry Torokhov2011-10-10
| | | | | | | | | | This will ensure our reporting is consistent with the rest of the system and we do not refer to obsolete source file names. Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Reviewed-by: JJ Ding <dgdunix@gmail.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - correct max Y value on medium bamboosChris Bagwell2011-10-10
| | | | | | | | | | Medium size Bamboo P&T driver reused max X/Y form older Bamboo 1 medium size tablets and never updated to real value. Actual active area of tablet is slightly larger in Y direction. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - add ABS_DISTANCE to Bamboo Pen reportsChris Bagwell2011-10-10
| | | | | | | | | | Tablet reports a distance of 0 right at highest point possible to be in proximity and distance_max when touching tablet. Inverse the distance since user land has no way of knowing ABS_DISTANCE is not distance from tablet. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - remove unneeded touch pressure initializationChris Bagwell2011-10-10
| | | | | | | | | These were left in during removal of touch pressure reports but not needed now. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: lm8323 - wrap suspend and resume in CONFIG_PM_SLEEPDmitry Torokhov2011-10-06
| | | | | | | | | | | CONFIG_PM is defined when CONFIG_PM_SLEEP or CONFIG_PM_RUNTIME is defined, however suspend and resume methods are only valid in the context of CONFIG_PM_SLEEP. If only CONFIG_PM_RUNTIME is defined we get the following warning (courtesy of Geerts randconfig builds): lm8323.c: warning: 'lm8323_resume' defined but not used Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: ad7879-i2c - wrap suspend and resume in CONFIG_PM_SLEEPDmitry Torokhov2011-10-06
| | | | | | | | | | | CONFIG_PM is defined when CONFIG_PM_SLEEP or CONFIG_PM_RUNTIME is defined, however suspend and resume methods are only valid in the context of CONFIG_PM_SLEEP. If only CONFIG_PM_RUNTIME is defined we get the following warning (courtesy of Geerts randconfig builds): ad7879-i2c.c: warning: 'ad7879_i2c_resume' defined but not used Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: synaptics_i2c - wrap suspend and resume in CONFIG_PM_SLEEPDmitry Torokhov2011-10-06
| | | | | | | | | | | CONFIG_PM is defined when CONFIG_PM_SLEEP or CONFIG_PM_RUNTIME is defined, however suspend and resume methods are only valid in context of CONFIG_PM_SLEEP. If only CONFIG_PM_RUNTIME is defined we get the following warning (courtesy of Geerts randconfig builds): synaptics_i2c.c: warning: 'synaptics_i2c_resume' defined but not used Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: mma8450 - silence some 'uninitialized variable' warningsDmitry Torokhov2011-10-06
| | | | | | | | Sometimes GCC is not smart enough to recognize that x, y and z are always used properly initialized in mma8450_poll(). Let's rearrange the code a bit to help GCC. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: atmel_mxt_ts - use snprintf for sysfs attribute show methodDaniel Kurtz2011-10-06
| | | | | | | | | | | | | | Sysfs attribute show methods are always passed a buffer of length PAGE_SIZE. To keep from overwriting this buffer and causing havoc, use snprintf() to guarantee we never write more than the buffer can hold. In addition, at least for my touchscreen, the number and size of objects was far too big to fit in a single 4K page. Therefore, this patch also trims some redundant framing text to leave more room for actual data. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Acked-by: Nick Dyer <nick.dyer@itdev.co.uk> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - make LED status readable through sysfsPing Cheng2011-10-05
| | | | | | | Reviewed-by: Eduard Hasenleithner <eduard@hasenleithner.at> Tested-by: Eduard Hasenleithner <eduard@hasenleithner.at> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - add LED support for Cintiq 21ux2Ping Cheng2011-10-05
| | | | | | | | | | Cintiq 21ux2 has two sets of four LEDs on right and left side of the tablet, respectively. Reviewed-by: Eduard Hasenleithner <eduard@hasenleithner.at> Tested-by: Eduard Hasenleithner <eduard@hasenleithner.at> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - don't expose LED inactive optionPing Cheng2011-10-05
| | | | | | | | | The LED also indicates the status of the tablet. Don't turn it off. Reviewed-by: Eduard Hasenleithner <eduard@hasenleithner.at> Tested-by: Eduard Hasenleithner <eduard@hasenleithner.at> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - lower the LED luminancePing Cheng2011-10-05
| | | | | | | | | The LED luminance level is normally lower when no button is pressed. Reviewed-by: Eduard Hasenleithner <eduard@hasenleithner.at> Tested-by: Eduard Hasenleithner <eduard@hasenleithner.at> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: add a driver for TSC-40 serial touchscreenSebastian Andrzej Siewior2011-09-28
| | | | | | | | | | | This patch adds the TSC-40 serial touchscreen driver and should be compatible with TSC-10 and TSC-25. The driver was written by Linutronix on behalf of Bachmann electronic GmbH. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: gpio_keys - use of_property_read_u32()Tobias Klauser2011-09-21
| | | | | | | | | Use the of_property_read_u32() helper function to retrieve u32 values from the device tree. Also do not pass the len parameter to of_get_property if it isn't checked afterwards. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: penmount - simplify unregister procedureDmitry Torokhov2011-09-21
| | | | | | | | Since touchscreen driver does not handle any events to be sent to the device we can close serio port first and then unregister the input device. Tested-by: John Sung <penmount.touch@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: penmount - rework handling of different protocolsDmitry Torokhov2011-09-21
| | | | | | | | Instead of having one large switch based on product ID use pointer to function actually doing protocol decoding. Tested-by: John Sung <penmount.touch@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: penmount - add PenMount 6250 supportJohn Sung2011-09-21
| | | | | | | Add multi touch support for PenMount 6250 touch controller. Signed-off-by: John Sung <penmount.touch@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>