aboutsummaryrefslogtreecommitdiffstats
path: root/README (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2018-10-01Input: i8042 - enable keyboard wakeups by default when s2idle is usedDaniel Drake3-9/+28
Previously, on typical consumer laptops, pressing a key on the keyboard when the system is in suspend would cause it to wake up (default or unconditional behaviour). This happens because the EC generates a SCI interrupt in this scenario. That is no longer true on modern laptops based on Intel WhiskeyLake, including Acer Swift SF314-55G, Asus UX333FA, Asus UX433FN and Asus UX533FD. We confirmed with Asus EC engineers that the "Modern Standby" design has been modified so that the EC no longer generates a SCI in this case; the keyboard controller itself should be used for wakeup. In order to retain the standard behaviour of being able to use the keyboard to wake up the system, enable serio wakeups by default on platforms that are using s2idle. Link: https://lkml.kernel.org/r/CAB4CAwfQ0mPMqCLp95TVjw4J0r5zKPWkSvvkK4cpZUGE--w8bQ@mail.gmail.com Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Daniel Drake <drake@endlessm.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-10-01Input: xpad - add support for Xbox1 PDP Camo series gamepadRamses Ramírez1-0/+3
The "Xbox One PDP Wired Controller - Camo series" has a different product-id than the regular PDP controller and the PDP stealth series, but it uses the same initialization sequence. This patch adds the product-id of the camo series to the structures that handle the other PDP Xbox One controllers. Signed-off-by: Ramses Ramírez <ramzeto@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-09-18Input: uinput - allow for max == min during input_absinfo validationPeter Hutterer1-1/+1
These values are inclusive, so a range of 1 requires min == max. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Martin Kepplinger <martin.kepplinger@ginzinger.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-09-18Input: elantech - enable middle button of touchpad on ThinkPad P72Aaron Ma1-0/+2
Adding 2 new touchpad IDs to support middle button support. Cc: stable@vger.kernel.org Signed-off-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-09-18Input: atakbd - fix Atari CapsLock behaviourMichael Schmitz1-8/+2
The CapsLock key on Atari keyboards is not a toggle, it does send the normal make and break scancodes. Drop the CapsLock toggle handling code, which did cause the CapsLock key to merely act as a Shift key. Tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-09-18Input: atakbd - fix Atari keymapAndreas Schwab1-38/+26
Fix errors in Atari keymap (mostly in keypad, help and undo keys). Patch provided on debian-68k ML by Andreas Schwab <schwab@linux-m68k.org>, keymap array size and unhandled scancode limit adjusted to 0x73 by me. Tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-09-18Input: egalax_ts - add system wakeup supportAnson Huang1-0/+6
This patch adds wakeup function support for egalax touch screen, if "wakeup-source" is added to device tree's egalax touch screen node, the wakeup function will be enabled, and egalax touch screen will be able to wakeup system from suspend. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-09-18Input: gpio-keys - fix a documentation index issueSong Qiang1-1/+1
gpio_keys.c now exists in the drivers/input/keyboard/ rather than drivers/input/. Signed-off-by: Song Qiang <songqiang.1304521@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-08-08MAINTAINERS: Add PhoenixRC Flight Controller AdapterMarcus Folkesson1-0/+7
Add MAINTAINERS entry for PhoenixRC Flight Controller Adapter Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-08-08Input: do not use WARN() in input_alloc_absinfo()Dmitry Torokhov1-4/+12
Some of fuzzers set panic_on_warn=1 so that they can handle WARN()ings the same way they handle full-blown kernel crashes. We used WARN() in input_alloc_absinfo() to get a better idea where memory allocation failed, but since then kmalloc() and friends started dumping call stack on memory allocation failures anyway, so we are not getting anything extra from WARN(). Because of the above, let's replace WARN with dev_err(). We use dev_err() instead of simply removing message and relying on kcalloc() to give us stack dump so that we'd know the instance of hardware device to which we were trying to attach input device. Reported-by: Dmitry Vyukov <dvyukov@google.com> Acked-by: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-08-08Input: mark expected switch fall-throughsGustavo A. R. Silva8-2/+14
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Warning level 2 was used: -Wimplicit-fallthrough=2 Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-08-08Input: raydium_i2c_ts - use true and false for boolean valuesGustavo A. R. Silva1-2/+2
Return statements in functions returning bool should use true or false instead of an integer value. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-08-01Input: evdev - switch to bitmap APIAndy Shevchenko1-9/+7
Switch to bitmap API, i.e. bitmap_alloc(), bitmap_zalloc(), to show clearly what we are allocating. Besides that it returns pointer of bitmap type instead of opaque void *. While here, replace memcpy() with bitmap_copy() for sake of consistency. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-08-01Input: gpio-keys - switch to bitmap_zalloc()Andy Shevchenko1-4/+4
Switch to bitmap_zalloc() to show clearly what we are allocating. Besides that it returns pointer of bitmap type instead of opaque void *. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-08-01Input: elan_i2c_smbus - cast sizeof to int for comparisonJulia Lawall1-1/+1
Comparing an int to a size, which is unsigned, causes the int to become unsigned, giving the wrong result. i2c_smbus_read_block_data can return the result of i2c_smbus_xfer, whih can return a negative error code. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ int x; expression e,e1; identifier f; @@ *x = f(...); ... when != x = e1 when != if (x < 0 || ...) { ... return ...; } *x < sizeof(e) // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-08-01bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free()Andy Shevchenko2-0/+28
A lot of code become ugly because of open coding allocations for bitmaps. Introduce three helpers to allow users be more clear of intention and keep their code neat. Note, due to multiple circular dependencies we may not provide the helpers as inliners. For now we keep them exported and, perhaps, at some point in the future we will sort out header inclusion and inheritance. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-08-01md: Avoid namespace collision with bitmap APIAndy Shevchenko9-294/+278
bitmap API (include/linux/bitmap.h) has 'bitmap' prefix for its methods. On the other hand MD bitmap API is special case. Adding 'md' prefix to it to avoid name space collision. No functional changes intended. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Shaohua Li <shli@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-08-01dm: Avoid namespace collision with bitmap APIAndy Shevchenko1-10/+10
bitmap API (include/linux/bitmap.h) has 'bitmap' prefix for its methods. On the other hand DM bitmap API is special case. Adding 'dm' prefix to it to avoid potential name space collision. No functional changes intended. Suggested-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-30Input: pm8941-pwrkey - add resin entryVinod Koul2-0/+9
Since handling is abstracted in this driver, we need to add resin entry in id table along with pwrkey_data. Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-30Input: pm8941-pwrkey - abstract register offsets and event codeVinod Koul2-13/+58
In order to support resin thru the pwrkey driver (they are very similar in nature) we need to abstract the handling in this driver. First we abstract pull_up_bit and status_bit along in driver data. The event code sent for key events is quiried from DT. Since the device can be child of pon lookup regmap and reg from parent if lookup fails (we are child). Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Vinod Koul <vkoul@kernel.org> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-27Input: iforce - reorganize joystick configuration listsTim Schumacher1-14/+5
* btn_avb_pegasus and btn_avb_tw are the same. Unify them into btn_joystick_avb. * btn_wheel is an exact copy of btn_joystick, so remove it. Rename btn_avb_wheel into btn_wheel since it is the only sane configuration for a wheel. * Assign the (new) btn_wheel configuration to the "AVB Top Shot Force Feedback Racing Wheel", because the previous configuration was meant for a joystick. Signed-off-by: Tim Schumacher <timschumi@gmx.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-27Input: atmel_mxt_ts - move completion to after config crc is updatedNick Dyer1-2/+2
Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-27Input: atmel_mxt_ts - don't report zero pressure from T9Nick Dyer1-0/+4
If T9.CTRL DISAMP is set, then pressure is reported as zero. This means some app layers (eg tslib) will ignore the contact. Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-27Input: atmel_mxt_ts - zero terminate config firmware fileNick Dyer1-10/+24
We use sscanf to parse the configuration file, so it's necessary to zero terminate the configuration otherwise a truncated file can cause the parser to run off into uninitialised memory. Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-27Input: atmel_mxt_ts - refactor config update code to add context structNick Dyer1-52/+56
Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-27Input: atmel_mxt_ts - config CRC may start at T71Nick Dyer1-12/+22
On devices with the T71 object, the config CRC will start there, rather than at T7. Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-27Input: atmel_mxt_ts - remove unnecessary debug on ENOMEMNick Dyer1-6/+2
Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-27Input: atmel_mxt_ts - remove duplicate setup of ABS_MT_PRESSURENick Dyer1-6/+0
Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-27Input: atmel_mxt_ts - use BIT() macro everywhereNick Dyer1-18/+18
Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-27Input: atmel_mxt_ts - only use first T9 instanceNick Dyer1-3/+4
The driver only registers one input device, which uses the screen parameters from the first T9 instance. The first T63 instance also uses those parameters. It is incorrect to send input reports from the second instances of these objects if they are enabled: the input scaling will be wrong and the positions will be mashed together. This also causes problems on Android if the number of slots exceeds 32. In the future, this could be handled by looking for enabled touch object instances and creating an input device for each one. 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>
2018-07-27Input: aiptek - replace GFP_ATOMIC with GFP_KERNEL in aiptek_probe()Jia-Ju Bai1-1/+1
aiptek_probe() is never called in atomic context. It calls usb_alloc_coherent() with GFP_ATOMIC, which is not necessary. GFP_ATOMIC can be replaced with GFP_KERNEL. This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-27Input: appletouch - replace GFP_ATOMIC with GFP_KERNELJia-Ju Bai1-3/+3
atp_open(), atp_recover() and atp_resume() are never called in atomic context. They call usb_submit_urb() with GFP_ATOMIC, which is not necessary. GFP_ATOMIC can be replaced with GFP_KERNEL. This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-27Input: yealink - replace GFP_ATOMIC with GFP_KERNEL in usb_probe()Jia-Ju Bai1-2/+2
usb_probe() is never called in atomic context. It calls usb_alloc_coherent() with GFP_ATOMIC, which is not necessary. GFP_ATOMIC can be replaced with GFP_KERNEL. This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-27Input: powermate - replace GFP_ATOMIC with GFP_KERNEL in powermate_alloc_buffers()Jia-Ju Bai1-1/+1
powermate_alloc_buffers() is never called in atomic context. It calls usb_alloc_coherent() with GFP_ATOMIC, which is not necessary. GFP_ATOMIC can be replaced with GFP_KERNEL. This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-27Input: keyspan_remote - replace GFP_ATOMIC with GFP_KERNEL in keyspan_probe()Jia-Ju Bai1-1/+1
keyspan_probe() is never called in atomic context. It calls usb_alloc_coherent() with GFP_ATOMIC, which is not necessary. GFP_ATOMIC can be replaced with GFP_KERNEL. This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-27Input: wdt87xx_i2c - replace mdelay() with msleep() in wdt87xx_resume()Jia-Ju Bai1-1/+1
wdt87xx_resume() is never called in atomic context. It calls mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-27Input: iforce - assign BTN_DEAD only for specific devicesTim Schumacher1-5/+6
Move BTN_DEAD into the arrays with the specific button sets instead of assigning it for every iforce device. BTN_DEAD represents an optical sensor which detects if the user is interacting with the device. On devices without that optical sensor BTN_DEAD is repeatedly causing false inputs on every status update of the joystick. Signed-off-by: Tim Schumacher <timschumi@gmx.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-26Input: iforce - reformat the packet dump outputTim Schumacher4-11/+7
Previously, packets that have been dumped are shown in the kernel log like this: drivers/input/joystick/iforce/iforce-packets.c: info cmd = ff04, data = 56 02 04 00 Use dev_dbg to dump the packages only when requested and to list the parent device as well. Use printf logic to generate the hexdump instead of looping through every char that needs to be printed (which in turn fixes the unnecessary newlines and looks more clean in general). The resulting package dump output does now look like this: usb 2-8: iforce_dump_packet info cmd = ff04, data = 56 02 04 00 Signed-off-by: Tim Schumacher <timschumi@gmx.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-26Input: stop telling users to snail-mail VojtechDmitry Torokhov47-188/+0
I do not think Vojtech wants snail mail these days (and he mentioned that nobody has ever sent him snail mail), and the address is not even valid anymore, so let's remove snail-mail instructions from the sources. Acked-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-25Input: pxrc - flatten probe codeDmitry Torokhov1-49/+35
Instead of splitting probe code into separate USB and input setup, flatten it. This allows for easier inspection of order of set up steps, since the probe code is reasonably small. Move input-related initialization (phys) from USB block to input block. Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com> Tested-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-25Input: pxrc - do not store unneeded data in driver structureDmitry Torokhov1-18/+17
There is no need to store data buffer size, pointer to the buffer, or endpoint address in pxrc structure, as they are either only needed during setup, or are available from elsewhere. Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com> Tested-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-25Input: pxrc - move module device table closer to where it is usedDmitry Torokhov1-6/+6
There is no need to have the device table first in the file. Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com> Tested-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-25Input: pxrc - fix freeing URB on device teardownDmitry Torokhov1-36/+30
URB is the only resource that is not managed, and thus is destroyed too early, before we unregister input device and stop URB in pxrc_close(). To fix it let's install custom devm handler to free the URB at the right time in devm unwind sequence. Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com> Tested-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-25Input: pxrc - do not store USB device in private structMarcus Folkesson1-7/+6
The USB device is only needed during setup, so put it back after initialization and do not store it in our private struct. Also, the USB device is a parent of USB interface so our driver model rules ensure that USB device should not disappear while interface device is still there; there is no need to take reference to the USB device. Reported-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-18Input: gpio_keys - add missing include to gpio_keys.hMatti Vaittinen1-0/+2
gpio_keys.h uses 'bool' - type which is defined in linux/types.h. Include this header. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-18Input: i8042 - add Lenovo LaVie Z to the i8042 reset listChen-Yu Tsai1-0/+7
The Lenovo LaVie Z laptop requires i8042 to be reset in order to consistently detect its Elantech touchpad. The nomux and kbdreset quirks are not sufficient. It's possible the other LaVie Z models from NEC require this as well. Cc: stable@vger.kernel.org Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-18Input: egalax_ts - switch to SPDX identifierFabio Estevam1-4/+1
Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-16Input: elan_i2c - add another ACPI ID for Lenovo Ideapad 330-15ASTKT Liao1-0/+1
Add ELAN0622 to ACPI mapping table to support Elan touchpad found in Ideapad 330-15AST. Signed-off-by: KT Liao <kt.liao@emc.com.tw> Reported-by: Anant Shende <anantshende@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-04Input: iforce - use GFP_KERNEL in iforce_get_id_packet()Sebastian Andrzej Siewior1-1/+1
iforce_get_id_packet() invokes wait_event_interruptible_timeout() which means it has to be in non-atomic context at that point, thus we can use GFP_KERNEL instead of GFP_ATOMIC. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>