summaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
AgeCommit message (Collapse)Author
2020-12-14Merge branch 'next' into for-linusDmitry Torokhov
Prepare input updates for 5.11 merge window.
2020-12-14Input: da7280 - fix spelling mistake "sequemce" -> "sequence"Colin Ian King
There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20201214223109.82924-1-colin.king@canonical.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-12-11Input: sc27xx - add support for sc2730 and sc2721Nemo Han
Add new compatible strings and match data to support sc2730 and sc2721 which are two varieties of SC27XX family. Signed-off-by: Nemo Han <nemo.han@unisoc.com> Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com> Link: https://lore.kernel.org/r/20201117034949.47877-2-zhang.lyra@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-12-11Input: cm109 - do not stomp on control URBDmitry Torokhov
We need to make sure we are not stomping on the control URB that was issued when opening the device when attempting to toggle buzzer. To do that we need to mark it as pending in cm109_open(). Reported-and-tested-by: syzbot+150f793ac5bc18eee150@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-12-11Input: ipx4xx-beeper - convert comma to semicolonZheng Yongjun
Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Link: https://lore.kernel.org/r/20201211085032.2598-1-zhengyongjun3@huawei.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-12-11Input: new da7280 haptic driverRoy Im
Adds support for the Dialog DA7280 LRA/ERM Haptic Driver with multiple mode and integrated waveform memory and wideband support. It communicates via an I2C bus to the device. Signed-off-by: Roy Im <roy.im.opensource@diasemi.com> Reviewed-by: Jes Sorensen <Jes.Sorensen@gmail.com>. Link: https://lore.kernel.org/r/1e293e8c4830b09255af3b7e1721b73afaefdfa3.1606320459.git.Roy.Im@diasemi.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-12-09Input: add driver for power button on Dell Wyse 3020Lubomir Rintel
This adds support for the power button attached to the Embedded Controller on a Dell Wyse 3020 "Ariel" board. The Embedded Controller's SPI interface is actually capable sending and receiving the PS/2 keyboard and mouse protocol data, which looks like a good fit for a serio driver. Howerver, I don't know of any machines where this is actually used. My board only has a single power button and no way to connect an actual keyboard or a mouse. Using the atkbd driver with serio would be an overkill and would be inconvenient for the userspace. Therefore this driver registers an input device that is only capable of reporting the power button presses and releases. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Link: https://lore.kernel.org/r/20201201083533.1724287-3-lkundrak@v3.sk Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-12-06Input: soc_button_array - add Lenovo Yoga Tablet2 1051L to the ↵Hans de Goede
dmi_use_low_level_irq list Add the Lenovo Yoga Tablet2 1051L to the list of devices where the ACPI AML code is poking the GPIO config register directly changing the IRQ type to a low_level_irq, which we need to work around. This fixes the home button on the Lenovo Yoga Tablet2 1051L not working. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20201206161245.24798-1-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-12-02Input: use input_device_enabled()Andrzej Pietrasiewicz
Use the newly added helper in relevant input drivers. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> Link: https://lore.kernel.org/r/20200608112211.12125-3-andrzej.p@collabora.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-11-24Input: soc_button_array - add missing includeDmitry Torokhov
This fixes the following build errors: CC [M] drivers/input/misc/soc_button_array.o drivers/input/misc/soc_button_array.c:156:4: error: implicit declaration of function 'irq_set_irq_type' [-Werror,-Wimplicit-function-declaration] irq_set_irq_type(irq, IRQ_TYPE_LEVEL_LOW); ^ drivers/input/misc/soc_button_array.c:156:26: error: use of undeclared identifier 'IRQ_TYPE_LEVEL_LOW' irq_set_irq_type(irq, IRQ_TYPE_LEVEL_LOW); ^ 2 errors generated. Fixes: 78a5b53e9fb4 ("Input: soc_button_array - work around DSDTs which modify the irqflags") Reported-by: kernel test robot <lkp@intel.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20201123061508.GA1009828@dtor-ws Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-11-22Input: pcspkr - fix fall-through warnings for ClangGustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of just letting the code fall through to the next case. Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/4b659e3e65f2fa3c8bb7ed153e2016c3fb395bbc.1605896059.git.gustavoars@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-11-19Input: wm831x-on - source file headers are not good candidates for kernel-docLee Jones
Fixes the following W=1 kernel build warning(s): drivers/input/misc/wm831x-on.c:30: warning: cannot understand function prototype: 'struct wm831x_on ' Signed-off-by: Lee Jones <lee.jones@linaro.org> Acked-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20201112110204.2083435-10-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-11-19Input: mc13783-pwrbutton - file headers are not good candidates for kernel-docLee Jones
Fixes the following W=1 kernel build warning(s): drivers/input/misc/mc13783-pwrbutton.c:32: warning: cannot understand function prototype: 'struct mc13783_pwrb ' Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20201112110204.2083435-4-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-11-08Input: ab8500-ponkey - fix incorrect name in 'ab8500_ponkey' doc headerLee Jones
Fixes the following W=1 kernel build warning(s): drivers/input/misc/ab8500-ponkey.c:32: warning: Function parameter or member 'idev' not described in 'ab8500_ponkey' Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20201104162427.2984742-5-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-11-08Input: drv2667 - fix formatting and add missing member docsLee Jones
Fixes the following W=1 kernel build warning(s): drivers/input/misc/drv2667.c:109: warning: Function parameter or member 'input_dev' not described in 'drv2667_data' drivers/input/misc/drv2667.c:109: warning: Function parameter or member 'client' not described in 'drv2667_data' drivers/input/misc/drv2667.c:109: warning: Function parameter or member 'regmap' not described in 'drv2667_data' drivers/input/misc/drv2667.c:109: warning: Function parameter or member 'work' not described in 'drv2667_data' drivers/input/misc/drv2667.c:109: warning: Function parameter or member 'regulator' not described in 'drv2667_data' drivers/input/misc/drv2667.c:109: warning: Function parameter or member 'page' not described in 'drv2667_data' drivers/input/misc/drv2667.c:109: warning: Function parameter or member 'magnitude' not described in 'drv2667_data' drivers/input/misc/drv2667.c:109: warning: Function parameter or member 'frequency' not described in 'drv2667_data' Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20201104162427.2984742-19-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-11-08Input: drv2665 - fix formatting expected by kernel-docLee Jones
Fixes the following W=1 kernel build warning(s): drivers/input/misc/drv2665.c:59: warning: Function parameter or member 'input_dev' not described in 'drv2665_data' drivers/input/misc/drv2665.c:59: warning: Function parameter or member 'client' not described in 'drv2665_data' drivers/input/misc/drv2665.c:59: warning: Function parameter or member 'regmap' not described in 'drv2665_data' drivers/input/misc/drv2665.c:59: warning: Function parameter or member 'work' not described in 'drv2665_data' drivers/input/misc/drv2665.c:59: warning: Function parameter or member 'regulator' not described in 'drv2665_data' Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20201104162427.2984742-18-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-11-08Input: drv260x - fix kernel-doc formatting and remove one abuseLee Jones
Fixes the following W=1 kernel build warning(s): drivers/input/misc/drv260x.c:194: warning: Function parameter or member 'input_dev' not described in 'drv260x_data' drivers/input/misc/drv260x.c:194: warning: Function parameter or member 'client' not described in 'drv260x_data' drivers/input/misc/drv260x.c:194: warning: Function parameter or member 'regmap' not described in 'drv260x_data' drivers/input/misc/drv260x.c:194: warning: Function parameter or member 'work' not described in 'drv260x_data' drivers/input/misc/drv260x.c:194: warning: Function parameter or member 'enable_gpio' not described in 'drv260x_data' drivers/input/misc/drv260x.c:194: warning: Function parameter or member 'regulator' not described in 'drv260x_data' drivers/input/misc/drv260x.c:194: warning: Function parameter or member 'magnitude' not described in 'drv260x_data' drivers/input/misc/drv260x.c:194: warning: Function parameter or member 'mode' not described in 'drv260x_data' drivers/input/misc/drv260x.c:194: warning: Function parameter or member 'library' not described in 'drv260x_data' drivers/input/misc/drv260x.c:194: warning: Function parameter or member 'rated_voltage' not described in 'drv260x_data' drivers/input/misc/drv260x.c:194: warning: Function parameter or member 'overdrive_voltage' not described in 'drv260x_data' drivers/input/misc/drv260x.c:244: warning: Function parameter or member 'voltage' not described in 'drv260x_calculate_voltage' Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20201104162427.2984742-17-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-10-26Input: adxl34x - clean up a data type in adxl34x_probe()Dan Carpenter
The "revid" is used to store negative error codes so it should be an int type. Fixes: e27c729219ad ("Input: add driver for ADXL345/346 Digital Accelerometers") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Link: https://lore.kernel.org/r/20201026072824.GA1620546@mwanda Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-09-13Input: soc_button_array - work around DSDTs which modify the irqflagsHans de Goede
Some 2-in-1s which use the soc_button_array driver have this ugly issue in their DSDT where the _LID method modifies the irq-type settings of the GPIOs used for the power and home buttons. The intend of this AML code is to disable these buttons when the lid is closed. The AML does this by directly poking the GPIO controllers registers. This is problematic because when re-enabling the irq, which happens whenever _LID gets called with the lid open (e.g. on boot and on resume), it sets the irq-type to IRQ_TYPE_LEVEL_LOW. Where as the gpio-keys driver programs the type to, and expects it to be, IRQ_TYPE_EDGE_BOTH. This commit adds a workaround for this which (on affected devices) does not set gpio_keys_button.gpio on these 2-in-1s, instead it gets the irq for the GPIO, configures it as IRQ_TYPE_LEVEL_LOW (to match how the _LID AML code configures it) and passes the irq in gpio_keys_button.irq. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20200906122016.4628-2-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-09-13Input: soc_button_array - add support for INT33D3 tablet-mode switch devicesHans de Goede
According to the Microsoft documentation for Windows 8 convertible devices, these devices should implement a PNP0C60 "laptop/slate mode state indicator" ACPI device. This device can work in 2 ways, if there is a GPIO which directly indicates the device is in tablet-mode or not then the direct-gpio mode should be used. If there is no such GPIO, but instead the events are coming from e.g. the embedded-controller, then there should still be a PNP0C60 ACPI device and event-injection should be used to send the events. The drivers/platform/x86/intel-vbtn.c code is an example from a standardized manner of doing the latter. On various 2-in-1s with either a detachable keyboard, or with 360° hinges, the direct GPIO mode is indicated by an ACPI device with a HID of INT33D3, which contains a single GpioInt in its ACPI resource table, which directly indicates if the device is in tablet-mode or not. This commit adds support for this to the soc_button_array code, as well as for the alternative ID9001 HID which some devices use instead of the INT33D3 HID. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20200826150601.12137-3-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-09-13Input: soc_button_array - add active_low setting to soc_button_infoHans de Goede
This is a preparation patch for adding support for Intel INT33D3 ACPI devices. These INT33D3 devices follow yet another Intel defined (but not documented) ACPI GPIO button standard. Unlike the ACPI GPIO button devices supported so far, the GPIO used in the INT33D3 devices is active-high, rather then active-low. This commit makes setting the gpio_keys_button.active_low flag configurable through the soc_button_info struct and enables it for all currently supported devices. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20200826150601.12137-2-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-08-06Input: ims-pcu - return error code rather than -ENOMEMColin Ian King
Currently the assignment of -ENOMEM to error is redundant because error is not being read and -ENOMEM is being hard coded as an error return. Fix this by returning the error code in variable 'error'; this also allows the error code from a failed call to input_register_device to be preserved and returned to the caller rather than just returning a possibly inappropriate -ENOMEM. Kudos to Dan Carpenter for the suggestion of an improved fix. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20200603152151.139337-1-colin.king@canonical.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-07-21Input: ati_remote2 - add missing newlines when printing module parametersXiongfeng Wang
When I cat some module parameters by sysfs, it displays as follows. It's better to add a newline for easy reading. root@syzkaller:~# cat /sys/module/ati_remote2/parameters/mode_mask 0x1froot@syzkaller:~# cat /sys/module/ati_remote2/parameters/channel_mask 0xffffroot@syzkaller:~# Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com> Link: https://lore.kernel.org/r/20200720092148.9320-1-wangxiongfeng2@huawei.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-07-07Input: Use fallthrough pseudo-keywordGustavo A. R. Silva
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20200707180857.GA30600@embeddedor Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-07-07Input: cm109 - remove needless check before usb_free_coherent()Xu Wang
usb_free_coherent() is safe with NULL addr and this check is not required. Signed-off-by: Xu Wang <vulab@iscas.ac.cn> Link: https://lore.kernel.org/r/20200707030905.3123-1-vulab@iscas.ac.cn Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-05-18Input: iqs269a - add missing I2C dependencyJeff LaBundy
If CONFIG_INPUT_IQS269A is selected yet CONFIG_I2C is not, the build fails. To solve this problem, add I2C as a dependency. Signed-off-by: Jeff LaBundy <jeff@labundy.com> Reported-by: kbuild test robot <lkp@intel.com> Fixes: 04e49867fad1 ("Input: add support for Azoteq IQS269A") Link: https://lore.kernel.org/r/1589809466-22748-1-git-send-email-jeff@labundy.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-05-17Merge branch 'for-linus' into nextDmitry Torokhov
Merge for-linus branch to sync Elan touchscreen driver code.
2020-05-17Input: add support for Azoteq IQS269AJeff LaBundy
This patch adds support for the Azoteq IQS269A capacitive touch controller. Signed-off-by: Jeff LaBundy <jeff@labundy.com> Link: https://lore.kernel.org/r/1588352982-5117-2-git-send-email-jeff@labundy.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-05-13Input: remove msm-vibrator driverBrian Masney
The address referenced by this driver is within the Qualcomm Clock namespace so let's drop the msm-vibrator bindings so that a more generic solution can be used instead. No one is currently using driver so this won't affect any users. Signed-off-by: Brian Masney <masneyb@onstation.org> Link: https://lore.kernel.org/r/20200513013140.69935-3-masneyb@onstation.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-05-12Input: introduce input_mt_report_slot_inactive()Jiada Wang
input_mt_report_slot_state() ignores "tool" argument when the slot is closed, which has caused a bit of confusion. Let's introduce input_mt_report_slot_inactive() to report inactive slot state. Suggested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiada Wang <jiada_wang@mentor.com> Link: https://lore.kernel.org/r/20200508055656.96389-2-jiada_wang@mentor.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-05-12Merge tag 'v5.6' into nextDmitry Torokhov
Sync up with mainline to get device tree and other changes.
2020-05-05Input: axp20x-pek - always register interrupt handlersHans de Goede
On some X86 devices we do not register an input-device, because the power-button is also handled by the soc_button_array (GPIO) input driver, and we want to avoid reporting power-button presses to userspace twice. Sofar when we did this we also did not register our interrupt handlers, since those were only necessary to report input events. But on at least 2 device models the Medion Akoya E1239T and the GPD win, the GPIO pin used by the soc_button_array driver for the power-button cannot wakeup the system from suspend. Why this does not work is not clear, I've tried comparing the value of all relevant registers on the Cherry Trail SoC, with those from models where this does work. I've checked: PMC registers: FUNC_DIS, FUNC_DIS2, SOIX_WAKE_EN, D3_STS_0, D3_STS_1, D3_STDBY_STS_0, D3_STDBY_STS_1; PMC ACPI I/O regs: PM1_STS_EN, GPE0a_EN and they all have identical contents in the working and non working cases. I suspect that the firmware either sets some unknown register to a value causing this, or that it turns off a power-plane which is necessary for GPIO wakeups to work during suspend. What does work on the Medion Akoya E1239T is letting the AXP288 wakeup the system on a power-button press (the GPD win has a different PMIC). Move the registering of the power-button press/release interrupt-handler from axp20x_pek_probe_input_device() to axp20x_pek_probe() so that the PMIC will wakeup the system on a power-button press, even if we do not register an input device. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Link: https://lore.kernel.org/r/20200426155757.297087-1-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-04-19Input: delete unused GP2AP002A00F driverLinus Walleij
There is now an IIO driver for GP2AP002A00F and GP2AP002S00F in drivers/iio/light/gp2ap002.c. Delete this driver, it is unused in the kernel tree and new users can make use of the IIO driver. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20200417203059.8151-1-linus.walleij@linaro.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-01-31Merge branch 'next' into for-linusDmitry Torokhov
Prepare input updates for 5.6 merge window.
2020-01-21Input: axp20x-pek - enable wakeup for all AXP variantsSamuel Holland
There are many devices, including several mobile battery-powered devices, using other AXP variants as their PMIC. Allow them to use the power key as a wakeup source. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Samuel Holland <samuel@sholland.org> Link: https://lore.kernel.org/r/20200115051253.32603-3-samuel@sholland.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-01-21Input: axp20x-pek - respect userspace wakeup configurationSamuel Holland
Unlike most other power button drivers, this driver unconditionally enables its wakeup IRQ. It should be using device_may_wakeup() to respect the userspace configuration of wakeup sources. Because the AXP20x MFD device uses regmap-irq, the AXP20x PEK IRQs are nested off of regmap-irq's threaded interrupt handler. The device core ignores such interrupts, so to actually disable wakeup, we must explicitly disable all non-wakeup interrupts during suspend. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20200115051253.32603-2-samuel@sholland.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-01-20Input: pm8xxx-vib - fix handling of separate enable registerStephan Gerhold
Setting the vibrator enable_mask is not implemented correctly: For regmap_update_bits(map, reg, mask, val) we give in either regs->enable_mask or 0 (= no-op) as mask and "val" as value. But "val" actually refers to the vibrator voltage control register, which has nothing to do with the enable_mask. So we usually end up doing nothing when we really wanted to enable the vibrator. We want to set or clear the enable_mask (to enable/disable the vibrator). Therefore, change the call to always modify the enable_mask and set the bits only if we want to enable the vibrator. Fixes: d4c7c5c96c92 ("Input: pm8xxx-vib - handle separate enable register") Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Link: https://lore.kernel.org/r/20200114183442.45720-1-stephan@gerhold.net Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-01-16Input: keyspan-remote - fix control-message timeoutsJohan Hovold
The driver was issuing synchronous uninterruptible control requests without using a timeout. This could lead to the driver hanging on probe due to a malfunctioning (or malicious) device until the device is physically disconnected. While sleeping in probe the driver prevents other devices connected to the same hub from being added to (or removed from) the bus. The USB upper limit of five seconds per request should be more than enough. Fixes: 99f83c9c9ac9 ("[PATCH] USB: add driver for Keyspan Digital Remote") Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: stable <stable@vger.kernel.org> # 2.6.13 Link: https://lore.kernel.org/r/20200113171715.30621-1-johan@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-01-16Input: max77650-onkey - add of_match tableBartosz Golaszewski
We need the of_match table if we want to use the compatible string in the pmic's child node and get the onkey driver loaded automatically. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-12-19Input: axp20x-pek - make device attributes staticBen Dooks (Codethink)
The two device attrbitues are not declared outside this file so make them static to avoid the following warnings: drivers/input/misc/axp20x-pek.c:194:1: warning: symbol 'dev_attr_startup' was not declared. Should it be static? drivers/input/misc/axp20x-pek.c:195:1: warning: symbol 'dev_attr_shutdown' was not declared. Should it be static? Signed-off-by: Ben Dooks (Codethink) <ben.dooks@codethink.co.uk> Acked-by: Chen-Yu Tsai <wens@csie.org> Link: https://lore.kernel.org/r/20191217152541.2167080-1-ben.dooks@codethink.co.uk Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-12-13Input: input_event - fix struct padding on sparc64Arnd Bergmann
Going through all uses of timeval, I noticed that we screwed up input_event in the previous attempts to fix it: The time fields now match between kernel and user space, but all following fields are in the wrong place. Add the required padding that is implied by the glibc timeval definition to fix the layout, and use a struct initializer to avoid leaking kernel stack data. Fixes: 141e5dcaa735 ("Input: input_event - fix the CONFIG_SPARC64 mixup") Fixes: 2e746942ebac ("Input: input_event - provide override for sparc64") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20191213204936.3643476-2-arnd@arndb.de Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-12-13Input: uinput - always report EPOLLOUTDmitry Torokhov
uinput device is always available for writing so we should always report EPOLLOUT and EPOLLWRNORM bits, not only when there is nothing to read from the device. Fixes: d4b675e1b527 ("Input: uinput - fix returning EPOLLOUT from uinput_poll") Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/20191209202254.GA107567@dtor-ws Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-12-04Input: uinput - fix returning EPOLLOUT from uinput_pollMarcel Holtmann
Always return EPOLLOUT from uinput_poll to allow polling /dev/uinput for writable state. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Link: https://lore.kernel.org/r/20191204025014.5189-1-marcel@holtmann.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-10-29Input: kxtj9 - switch to using polled mode of input devicesDmitry Torokhov
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts kxtj9 driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. note that with regular input devices handling polling, there is no longer a benefit in having separate INPUT_KXTJ9_POLLED_MODE config option. Link: https://lore.kernel.org/r/20191017204217.106453-23-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-10-29Input: kxtj9 - switch to using managed resourcesDmitry Torokhov
Using devm API allows to clean up error handling and drop the remove() method. Link: https://lore.kernel.org/r/20191017204217.106453-22-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-10-29Input: bma150 - switch to using polled mode of input devicesDmitry Torokhov
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts bma150 driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/20191017204217.106453-21-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-10-29Input: bma150 - use managed resources helpersJonathan Bakker
The driver can be cleaned up by using managed resource helpers. Signed-off-by: Jonathan Bakker <xc-racer2@live.ca> Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com> [dtor: do not explicitly set parent of input device since we are using devm] Link: https://lore.kernel.org/r/20191017204217.106453-20-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-10-29Input: mma8450 - switch to using polled mode of input devicesDmitry Torokhov
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts mma8450 driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/20191017204217.106453-19-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-10-29Input: gpio_decoder - switch to using polled mode of input devicesDmitry Torokhov
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts gpio_decoder driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/20191017204217.106453-18-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-10-29Input: rb532_button - switch to using polled mode of input devicesDmitry Torokhov
We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts rb532_button driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/20191017204217.106453-17-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>