summaryrefslogtreecommitdiff
path: root/drivers/input/misc (unfollow)
Commit message (Collapse)Author
2022-07-27drivers: input: add hall switch driverYaroslav Furman
Used in accessories with magnets to lock/unlock device and etc. 4.4 Linux version. Signed-off-by: Yaroslav Furman <yaro330@gmail.com>
2022-07-27drv2605l: Fix building on 4.4Davide Garberi
* Fixes drivers/input/misc/vibrator/drv2605l.c: In function 'drv2605l_probe': drivers/input/misc/vibrator/drv2605l.c:979:39: error: too few arguments to function 'devm_gpiod_get' haptics->platform_data.enable_gpio = devm_gpiod_get(&client->dev, "enable"); * Vibration doesn't work on row even with this commit Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
2022-07-27z2_row: Add vibrator driverchenzc
Change-Id: Ibe196b420b37040b4abeabab101f4cf867f8d333 Signed-off-by: dd3boh <dade.garberi@gmail.com> Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
2021-01-23Input: uinput - avoid FF flush when destroying deviceDmitry Torokhov
commit e8b95728f724797f958912fd9b765a695595d3a6 upstream. Normally, when input device supporting force feedback effects is being destroyed, we try to "flush" currently playing effects, so that the physical device does not continue vibrating (or executing other effects). Unfortunately this does not work well for uinput as flushing of the effects deadlocks with the destroy action: - if device is being destroyed because the file descriptor is being closed, then there is noone to even service FF requests; - if device is being destroyed because userspace sent UI_DEV_DESTROY, while theoretically it could be possible to service FF requests, userspace is unlikely to do so (they'd need to make sure FF handling happens on a separate thread) even if kernel solves the issue with FF ioctls deadlocking with UI_DEV_DESTROY ioctl on udev->mutex. To avoid lockups like the one below, let's install a custom input device flush handler, and avoid trying to flush force feedback effects when we destroying the device, and instead rely on uinput to shut off the device properly. NMI watchdog: Watchdog detected hard LOCKUP on cpu 3 ... <<EOE>> [<ffffffff817a0307>] _raw_spin_lock_irqsave+0x37/0x40 [<ffffffff810e633d>] complete+0x1d/0x50 [<ffffffffa00ba08c>] uinput_request_done+0x3c/0x40 [uinput] [<ffffffffa00ba587>] uinput_request_submit.part.7+0x47/0xb0 [uinput] [<ffffffffa00bb62b>] uinput_dev_erase_effect+0x5b/0x76 [uinput] [<ffffffff815d91ad>] erase_effect+0xad/0xf0 [<ffffffff815d929d>] flush_effects+0x4d/0x90 [<ffffffff815d4cc0>] input_flush_device+0x40/0x60 [<ffffffff815daf1c>] evdev_cleanup+0xac/0xc0 [<ffffffff815daf5b>] evdev_disconnect+0x2b/0x60 [<ffffffff815d74ac>] __input_unregister_device+0xac/0x150 [<ffffffff815d75f7>] input_unregister_device+0x47/0x70 [<ffffffffa00bac45>] uinput_destroy_device+0xb5/0xc0 [uinput] [<ffffffffa00bb2de>] uinput_ioctl_handler.isra.9+0x65e/0x740 [uinput] [<ffffffff811231ab>] ? do_futex+0x12b/0xad0 [<ffffffffa00bb3f8>] uinput_ioctl+0x18/0x20 [uinput] [<ffffffff81241248>] do_vfs_ioctl+0x298/0x480 [<ffffffff81337553>] ? security_file_ioctl+0x43/0x60 [<ffffffff812414a9>] SyS_ioctl+0x79/0x90 [<ffffffff817a04ee>] entry_SYSCALL_64_fastpath+0x12/0x71 Reported-by: Rodrigo Rivas Costa <rodrigorivascosta@gmail.com> Reported-by: Clément VUCHENER <clement.vuchener@gmail.com> Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=193741 Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-29Input: cm109 - do not stomp on control URBDmitry Torokhov
commit 82e06090473289ce63e23fdeb8737aad59b10645 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-11-24Input: adxl34x - clean up a data type in adxl34x_probe()Dan Carpenter
[ Upstream commit 33b6c39e747c552fa770eecebd1776f1f4a222b1 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-29Input: keyspan-remote - fix control-message timeoutsJohan Hovold
commit ba9a103f40fc4a3ec7558ec9b0b97d4f92034249 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-10Input: uinput - add compat ioctl number translation for UI_*_FF_UPLOADAndrey Smirnov
commit 7c7da40da1640ce6814dab1e8031b44e19e5a3f6 upstream. In the case of compat syscall ioctl numbers for UI_BEGIN_FF_UPLOAD and UI_END_FF_UPLOAD need to be adjusted before being passed on uinput_ioctl_handler() since code built with -m32 will be passing slightly different values. Extend the code already covering UI_SET_PHYS to cover UI_BEGIN_FF_UPLOAD and UI_END_FF_UPLOAD as well. Reported-by: Pierre-Loup A. Griffais <pgriffais@valvesoftware.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-20Input: bma150 - register input device after setting private dataJonathan Bakker
commit 90cc55f067f6ca0e64e5e52883ece47d8af7b67b upstream. Otherwise we introduce a race condition where userspace can request input before we're ready leading to null pointer dereference such as input: bma150 as /devices/platform/i2c-gpio-2/i2c-5/5-0038/input/input3 Unable to handle kernel NULL pointer dereference at virtual address 00000018 pgd = (ptrval) [00000018] *pgd=55dac831, *pte=00000000, *ppte=00000000 Internal error: Oops: 17 [#1] PREEMPT ARM Modules linked in: bma150 input_polldev [last unloaded: bma150] CPU: 0 PID: 2870 Comm: accelerometer Not tainted 5.0.0-rc3-dirty #46 Hardware name: Samsung S5PC110/S5PV210-based board PC is at input_event+0x8/0x60 LR is at bma150_report_xyz+0x9c/0xe0 [bma150] pc : [<80450f70>] lr : [<7f0a614c>] psr: 800d0013 sp : a4c1fd78 ip : 00000081 fp : 00020000 r10: 00000000 r9 : a5e2944c r8 : a7455000 r7 : 00000016 r6 : 00000101 r5 : a7617940 r4 : 80909048 r3 : fffffff2 r2 : 00000000 r1 : 00000003 r0 : 00000000 Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: 54e34019 DAC: 00000051 Process accelerometer (pid: 2870, stack limit = 0x(ptrval)) Stackck: (0xa4c1fd78 to 0xa4c20000) fd60: fffffff3 fc813f6c fd80: 40410581 d7530ce3 a5e2817c a7617f00 a5e29404 a5e2817c 00000000 7f008324 fda0: a5e28000 8044f59c a5fdd9d0 a5e2945c a46a4a00 a5e29668 a7455000 80454f10 fdc0: 80909048 a5e29668 a5fdd9d0 a46a4a00 806316d0 00000000 a46a4a00 801df5f0 fde0: 00000000 d7530ce3 a4c1fec0 a46a4a00 00000000 a5fdd9d0 a46a4a08 801df53c fe00: 00000000 801d74bc a4c1fec0 00000000 a4c1ff70 00000000 a7038da8 00000000 fe20: a46a4a00 801e91fc a411bbe0 801f2e88 00000004 00000000 80909048 00000041 fe40: 00000000 00020000 00000000 dead4ead a6a88da0 00000000 ffffe000 806fcae8 fe60: a4c1fec8 00000000 80909048 00000002 a5fdd9d0 a7660110 a411bab0 00000001 fe80: dead4ead ffffffff ffffffff a4c1fe8c a4c1fe8c d7530ce3 20000013 80909048 fea0: 80909048 a4c1ff70 00000001 fffff000 a4c1e000 00000005 00026038 801eabd8 fec0: a7660110 a411bab0 b9394901 00000006 a696201b 76fb3000 00000000 a7039720 fee0: a5fdd9d0 00000101 00000002 00000096 00000000 00000000 00000000 a4c1ff00 ff00: a6b310f4 805cb174 a6b310f4 00000010 00000fe0 00000010 a4c1e000 d7530ce3 ff20: 00000003 a5f41400 a5f41424 00000000 a6962000 00000000 00000003 00000002 ff40: ffffff9c 000a0000 80909048 d7530ce3 a6962000 00000003 80909048 ffffff9c ff60: a6962000 801d890c 00000000 00000000 00020000 a7590000 00000004 00000100 ff80: 00000001 d7530ce3 000288b8 00026320 000288b8 00000005 80101204 a4c1e000 ffa0: 00000005 80101000 000288b8 00026320 000288b8 000a0000 00000000 00000000 ffc0: 000288b8 00026320 000288b8 00000005 7eef3bac 000264e8 00028ad8 00026038 ffe0: 00000005 7eef3300 76f76e91 76f78546 800d0030 000288b8 00000000 00000000 [<80450f70>] (input_event) from [<a5e2817c>] (0xa5e2817c) Code: e1a08148 eaffffa8 e351001f 812fff1e (e590c018) ---[ end trace 1c691ee85f2ff243 ]--- Signed-off-by: Jonathan Bakker <xc-racer2@live.ca> Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-25hbtp_inpu.c: add 800s power down uevent in suspend funcXin Hua Lu
Add 800s power down uevent in suspend func. Signed-off-by: Xin Hua Lu <luxinhua@codeaurora.org> Change-Id: I53987407554e53e5b14d9d73e78e7832e7e8b345
2018-04-29Input: drv260x - fix initializing overdrive voltageDmitry Torokhov
commit 74c82dae6c474933f2be401976e1530b5f623221 upstream. We were accidentally initializing haptics->rated_voltage twice, and did not initialize overdrive voltage. Acked-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Amit Pundir <amit.pundir@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-24Input: twl4030-pwrbutton - use correct device for irq requestSebastian Reichel
[ Upstream commit 3071e9dd6cd3f2290d770117330f2c8b2e9a97e4 ] The interrupt should be requested for the platform device and not for the input device. Fixes: 7f9ce649d267 ("Input: twl4030-pwrbutton - simplify driver using devm_*") Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-02ANDROID: keychord: Check for write data sizeSuren Baghdasaryan
keychord driver causes a kernel warning when writing more than (1 << (MAX_ORDER - 1)) * PAGE_SIZE bytes to /dev/keychord. In reality writes to this file should be much smaller, so limiting data size to PAGE_SIZE seems to be appropriate. This change checks write data size and if it's more than PAGE_SIZE causes write to fail. Bug: 73962978 Change-Id: I8a064a396d4259ffca924fa35d80e9700c4f8d79 Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-02-22input: misc: hbtp_input: fix list corruption in completion queueVevek Venkatesan
Fix list corruption in task completion wait queue, in hbtp_input driver. Change-Id: Ic9967a196a575ce8aaad62a85ecbf055cf66a6f0 Signed-off-by: Vevek Venkatesan <vevekv@codeaurora.org>
2018-01-23Input: twl4030-vibra - fix sibling-node lookupJohan Hovold
commit 5b189201993ab03001a398de731045bfea90c689 upstream. A helper purported to look up a child node based on its name was using the wrong of-helper and ended up prematurely freeing the parent of-node while searching the whole device tree depth-first starting at the parent node. Fixes: 64b9e4d803b1 ("input: twl4030-vibra: Support for DT booted kernel") Fixes: e661d0a04462 ("Input: twl4030-vibra - fix ERROR: Bad of_node_put() warning") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-23Input: twl6040-vibra - fix child-node lookupJohan Hovold
commit dcaf12a8b0bbdbfcfa2be8dff2c4948d9844b4ad upstream. Fix child-node lookup during probe, which ended up searching the whole device tree depth-first starting at parent rather than just matching on its children. Later sanity checks on node properties (which would likely be missing) should prevent this from causing much trouble however, especially as the original premature free of the parent node has already been fixed separately (but that "fix" was apparently never backported to stable). Fixes: e7ec014a47e4 ("Input: twl6040-vibra - update for device tree support") Fixes: c52c545ead97 ("Input: twl6040-vibra - fix DT node memory management") Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: H. Nikolaus Schaller <hns@goldelico.com> (on Pyra OMAP5 hardware) Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-23Input: twl6040-vibra - fix DT node memory managementH. Nikolaus Schaller
commit c52c545ead97fcc2f4f8ea38f1ae3c23211e09a8 upstream. commit e7ec014a47e4 ("Input: twl6040-vibra - update for device tree support") made the separate vibra DT node to a subnode of the twl6040. It now calls of_find_node_by_name() to locate the "vibra" subnode. This function has a side effect to call of_node_put on() for the twl6040 parent node passed in as a parameter. This causes trouble later on. Solution: we must call of_node_get() before of_find_node_by_name() Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-18Input: ims-psu - check if CDC union descriptor is saneDmitry Torokhov
commit ea04efee7635c9120d015dcdeeeb6988130cb67a upstream. Before trying to use CDC union descriptor, try to validate whether that it is sane by checking that intf->altsetting->extra is big enough and that descriptor bLength is not too big and not too small. Reported-by: Andrey Konovalov <andreyknvl@google.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-24input: misc: speed up suspend and resume for QTC800S panelJin Fu
Mount QT800S suspend and resume actions to early fb event, so speed up touch response. Change-Id: I1ca610131e94af806dab4dfa8709fdd9c0556971 Signed-off-by: Jin Fu <jinf@codeaurora.org>
2017-08-11ANDROID: keychord: Fix for a memory leak in keychord.Mohan Srinivasan
Fixes a steady memory leak in the keychord release code. A close of the keychord device will leak 1 keychord structure. Easily reproducible by a simple program that does an open()->write()->close() of the keychord device. Bug: 64483974 Change-Id: I1fa402c666cffb00b8cfd6379d9fe47a0989152c Signed-off-by: Mohan Srinivasan <srmohan@google.com> (cherry picked from commit 72a8dae2c25d0277e48672ee85b70236268add01)
2017-08-11ANDROID: keychord: Fix races in keychord_write.Mohan Srinivasan
There are multiple bugs caused by threads racing in keychord_write. 1) Threads racing through this function can cause the same element to be added to a linked list twice (multiple calls to input_register_handler() for the same input_handler struct). And the races can also cause an element in a linked list that doesn't exist attempted to be removed (multiple calls to input_unregister_handler() with the same input_handler struct). 2) The races can also cause duplicate kfree's of the keychords struct. Bug: 64133562 Bug: 63974334 Change-Id: I6329a4d58c665fab5d3e96ef96391e07b4941e80 Signed-off-by: Mohan Srinivasan <srmohan@google.com> (cherry picked from commit 59584701f1e2ce8ce024570576b206bea6ac69cf)
2017-08-11Use %zu to print resid (size_t).Mohan Srinivasan
Print resid (size_t) portably. Signed-off-by: Mohan Srinivasan <srmohan@google.com> Change-Id: Ic5c9dc498bfeef2be21594ec5efd45a98a3c4b4d (cherry picked from commit a1e4c795e1b6de6b34b8cbc75499d1675608c36b)
2017-08-11ANDROID: keychord: Fix a slab out-of-bounds read.Mohan Srinivasan
Fix a slab out of bounds read in keychord_write(), detected by KASAN. Signed-off-by: Mohan Srinivasan <srmohan@google.com> Bug: 63962952 Change-Id: Iafef48b5d7283750ac0f39f5aaa767b1c3bf2004 (cherry picked from commit 913d980e07d84a843f5323acc55d185212a2abec)
2017-08-08Revert "input: misc: hbtp_input: fix memory corruption in list"aranja
This reverts commit e6b2b08383f6 ("input: misc: hbtp_input: fix memory corruption in list_del_entry"). This change introduces kernel crash during adb reboot. Change-Id: Ia6f53e2d62344b9f08eb056d901ae39e884e3a96 Signed-off-by: Vevek Venkatesan <vevekv@codeaurora.org>
2017-07-26input: misc: hbtp_input: fix memory corruption in list_del_entryVevek Venkatesan
Fix memory corruption in the hbtp_input driver by adding complete in the release routine to resolve the Kernel crash in __list_del_entry corruption. Signed-off-by: Vevek Venkatesan <vevekv@codeaurora.org> Change-Id: I764923317f720137bfd4e7adfc6bf763a36911c3
2017-05-11input: misc: fix error path for hbtp touch driverShantanu Jain
Fix error path for hbtp touch driver where error variable is not given proper error code while bailing out from the function. Change-Id: I56e2654ecffb021a60dd07ea5b5afe45a70a1c85 Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2017-05-09input: misc: fix error path for hbtp touch screen driverShantanu Jain
Fix error path for hbtp touch screen driver where error variable is not initialized to a error value before bailing out from the driver function. Change-Id: Ife3376891950216971cafaf33fd8308697b7f904 Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2017-05-05input: stm: Fix NULL dereference in laser driverWei Ding
Fix issues where we are referring to a null pointer and uninitialized variable. Change-Id: I9289a41fdef57a916781ad246ca06bfd2e031807 Signed-off-by: Wei Ding <weiding@codeaurora.org>
2017-04-27input: misc: hbtp-input: Support for FB_BLANK_NORMAL eventAlex Sarraf
Add support for handling FB_BLANK_NORMAL event. Change-Id: Ifd3c1c1eb2e1101bfcd354252711eb67fc362c57 Signed-off-by: Alex Sarraf <asarraf@codeaurora.org>
2017-04-27input: qpnp-power-on: Add debounce for KPDPWR_N rising edgeAnirudh Ghayal
On certain PMICs, an unexpected assertion on KPDPWR_DBC may be seen during falling edge of KPDPWR_N when it is closer to the rising edge of SLEEP_CLK. This triggers spurious KPDPWR interrupts. Handle this by adding a debounce in SW when the first KPDPWR_N falling edge is seen. The debounce logic is enabled by the DT property 'qcom,kpdpwr-sw-debounce'. CRs-Fixed: 2032520 Change-Id: I7655c13bda47fa6e2983650d7bec21e52aa91c2f Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2017-04-19input: misc: hbtp_input: filter out fb eventsAlex Sarraf
Filter out the fb events which don't need to be handled. Change-Id: I0dd748aec54594454f0d5333255f1ccb71b49201 Signed-off-by: Alex Sarraf <asarraf@codeaurora.org>
2017-04-18input: laser: disable laser sensor when camera crashWei Ding
Disable the laser sensor when camera crash to avoid call CCI funciton after CCI released. Change-Id: Ic9654730f936da68a74c0d9fa41801c7a1470971 Signed-off-by: Wei Ding <weiding@codeaurora.org>
2017-04-13input: misc: hbtp_input: Support for Region of Interest/sensorsAlex Sarraf
Add support for sensor and Region of Interest (ROI) events. Create new ioctl to receive sensor data from userspace. Create binary sysfs entries to expose data from kernel to userspace. Change-Id: Ifa76f08eb293c3da0618c22c07e65976319ea926 Signed-off-by: Alex Sarraf <asarraf@codeaurora.org>
2017-03-30Input: cm109 - validate number of endpoints before using themJohan Hovold
commit ac2ee9ba953afe88f7a673e1c0c839227b1d7891 upstream. Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack endpoints. Fixes: c04148f915e5 ("Input: add driver for USB VoIP phones with CM109...") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-30Input: yealink - validate number of endpoints before using themJohan Hovold
commit 5cc4a1a9f5c179795c8a1f2b0f4361829d6a070e upstream. Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack endpoints. Fixes: aca951a22a1d ("[PATCH] input-driver-yealink-P1K-usb-phone") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-30Input: ims-pcu - validate number of endpoints before using themJohan Hovold
commit 1916d319271664241b7aa0cd2b05e32bdb310ce9 upstream. Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack control-interface endpoints. Fixes: 628329d52474 ("Input: add IMS Passenger Control Unit driver") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-30Input: stm: optimize the laser sensor driverWei Ding
Enable laser sensor IRQ mode and change I2C speed 400K to improve laser performance and quality. Change-Id: I2b2b8ca964e6b031ceacff674104f9ae75f7ee0f Signed-off-by: Wei Ding <weiding@codeaurora.org>
2017-03-16input: vl53l0: Enable laser sensor Kconfig and Makefile entriesBikas Gurung
Laser sensor is connected using CCI interface. Add support to configure and enable laser sensor driver. CRs-fixed: 1051771 Change-Id: Ia9eab96862b1c2a657d40272867f015a0a91e0ed Signed-off-by: Bikas Gurung <bgurung@codeaurora.org>
2017-01-16stm: laser: STM laser sensor driver.Bikas Gurung
Add STM laser sensor driver to configure and access laser data using i2c and cci configuration. This is a squash of the following commits from https://github.com/STFlightSenseLinuxDrivers/vl53l0-driver: commit ee84aaad0cc1b7b195dcade15b201829dd87d537 Author: Kalyan Vadlamudi <kalyan-kumar.vadlamudireddy@st.com> Date: Wed Jan 11 09:27:48 2017 -0800 STM Laser: Remove Proprietary License header in vl53l0_i2c_platform.c. Description: vl53l0_i2c_platform.c mentions Proprietary/Confidential information. Remove this and commit 3355587f03c25fbdd7febd68172d3d4339762665 Author: Kalyan Vadlamudi <kalyan-kumar.vadlamudireddy@st.com> Date: Thu Dec 8 15:11:32 2016 -0800 STM Laser: Fix compliation issue in stmvl53l0_module-cci.c. Description: Missing ending brace in stmvl53l0_cci_init() for the cci_client->cci_subdev check commit f85423250c4df248c15ffeddf35ec43d01751793 Author: Kalyan Vadlamudi <kalyan-kumar.vadlamudireddy@st.com> Date: Thu Nov 3 16:55:33 2016 -0700 STM Laser: Fix checkpatch warnings and errors. Description: Use checkpatch script from 4.4 kernel and fix the errors and errors. There are still few typedef related warning in the header files commit 6b3796838d66acb6dbcbdf004b554468f3dc1218 Author: Kalyan Vadlamudi <kalyan-kumar.vadlamudireddy@st.com> Date: Tue Aug 16 17:50:44 2016 -0700 STM Laser : Fix Laser initialization failure Description : Revert the code which powers up Laser device during module init time. CCI probe can happen after STM laser driver probe, which is causing issues during device initialization. Code has been modified to not power up the device during STM laser driver probe. commit 93b6897a2a8c6828169c2501690df7cccf8221c6 Author: Kalyan Vadlamudi <kalyan-kumar.vadlamudireddy@st.com> Date: Tue Aug 2 10:38:23 2016 -0700 Set Default build to USE_CCI commit 357b47b5d809334e8e7bdcad73950ac2bf817043 Author: Kalyan Vadlamudi <kalyan-kumar.vadlamudireddy@st.com> Date: Mon Aug 1 14:27:24 2016 -0700 Update stmvl53l0-cci.h with new fields in cci_data commit 95d072e03e5724445aba17c3a055c1518be9fc7e Author: Kalyan Vadlamudi <kalyan-kumar.vadlamudireddy@st.com> Date: Mon Aug 1 13:55:29 2016 -0700 Add support in CCI driver to read device tree files for gpios information and configure them if present. Power up the device before calling stmvl53l0_setupAPIFunctions commit 1a86a1fcfbbd55059a243588fde8691e1f9ae106 Author: Kalyan Vadlamudi <kalyan-kumar.vadlamudireddy@st.com> Date: Thu Jul 21 14:05:09 2016 -0700 first commit CRs-fixed: 1051771 Change-Id: I47d33f99e264d17549b0d0de174462796cf61978 Git-repo: https://github.com/STFlightSenseLinuxDrivers/vl53l0-driver Git-commit: 1a86a1fcfbbd55059a243588fde8691e1f9ae106 Git-commit: 95d072e03e5724445aba17c3a055c1518be9fc7e Git-commit: 357b47b5d809334e8e7bdcad73950ac2bf817043 Git-commit: 93b6897a2a8c6828169c2501690df7cccf8221c6 Git-commit: 6b3796838d66acb6dbcbdf004b554468f3dc1218 Git-commit: f85423250c4df248c15ffeddf35ec43d01751793 Git-commit: 3355587f03c25fbdd7febd68172d3d4339762665 Git-commit: ee84aaad0cc1b7b195dcade15b201829dd87d537 [bgurung@codeaurora.org: removed license and readme text files. Also removed executable permissions from files.] Signed-off-by: Bikas Gurung <bgurung@codeaurora.org>
2017-01-11input: qpnp-power-on: set boot_reason when system-reset existsMao Jinlong
Some platforms don't configure qcom,secondary-pon-reset like 8998. So set boot_reason when "qcom,system-reset" node exists to avoid setting a wrong value to boot_reason. CRs-Fixed: 1102732 Change-Id: I9e9ff2f2d0ffac6baa5d0663664001eb30638e87 Signed-off-by: Mao Jinlong <c_jmao@codeaurora.org>
2017-01-09Input: drv260x - fix input device's parent assignmentJingkui Wang
commit 5a8a6b89c15766446d845671d574a9243b6d8786 upstream. We were assigning I2C bus controller instead of client as parent device. Besides being logically wrong, it messed up with devm handling of input device. As a result we were leaving input device and event node behind after rmmod-ing the driver, which lead to a kernel oops if one were to access the event node later. Let's remove the assignment and rely on devm_input_allocate_device() to set it up properly for us. Signed-off-by: Jingkui Wang <jkwang@google.com> Fixes: 7132fe4f5687 ("Input: drv260x - add TI drv260x haptics driver") Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-06input: move qpnp-power-on driver into input/misc directoryDavid Collins
Move the qpnp-power-on driver from the drivers/input directory into the drivers/input/misc directory. This is the standard location where other power key drivers are kept. Also make a small fix to use octal instead of symbolic permissions for the ship_mode_en module parameter. Change-Id: I4d80c2ca0f161bd443dbfe0fcef822459c9fe44b Signed-off-by: David Collins <collinsd@codeaurora.org>
2016-12-23input: misc: fix heap overflow issue in hbtp_input.cVevek Venkatesan
Add the boundary check for ABS code before setting ABS params, to avoid heap overflow. Change-Id: I6aad9916c92d2f775632406374dbb803063148de Signed-off-by: Vevek Venkatesan <vevekv@codeaurora.org>
2016-12-06input: misc: add condition check for ddic resetJin Fu
LCD can control DDIC reset by itself, so add condition check and allow not to define DDIC reset pin in device tree. CRs-Fixed: 1097675 Change-ID: I802bb0ecc86349c7e0380b54811bfae776a41f49 Signed-off-by: Jin Fu <jinf@codeaurora.org>
2016-10-25input: misc: hbtp_input: Add support for multiple AFEAlex Sarraf
Add support for both HI04 and JDI/Rohm with DDIC synchronization. Change-Id: Ib6bddd5f43b41660304d240db39f4e273ede3af0 Signed-off-by: Alex Sarraf <asarraf@codeaurora.org>
2016-10-18input: misc: pat9125: add sysfs for suspend-resume testShantanu Jain
Add sysfs for suspend-resume test in pixart pat9125 driver. This sysfs is used for doing regression testing for pixart pat9125 device. Change-Id: Ia90832f9280f69c367c5d9f404b0d27c656e5c28 Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2016-10-18input: misc: pat9125: add regulator framework supportVevek Venkatesan
Add regulator framework support for Pixart pat9125 driver. Change-Id: Ia4893c31eefcb5ac23440c67669af936620b31c1 Signed-off-by: Vevek Venkatesan <vevekv@codeaurora.org>
2016-10-14input: misc: pat9125: add gpio configuration and pinctrl supportVevek Venkatesan
Pat9125 is a gpio driven i2c slave. This change adds the gpio configuration and pinctrl support for pat9125 driver. Change-Id: I2a9b379715622b5f010a5780ca481da7f9619400 Signed-off-by: Vevek Venkatesan <vevekv@codeaurora.org> Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2016-10-12input: pat9125: add support of sending rotating switch eventsVevek Venkatesan
Add support of reading the status of the device, parsing it and sending it to the Input framework using the input APIs. Change-Id: Iebc3767e9dbcf10a541b8b02f8696da84312447a Signed-off-by: Vevek Venkatesan <vevekv@codeaurora.org> Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2016-10-11input: misc: add Kconfig and Makefile for pat9125Vevek Venkatesan
Add Makefile and Kconfig to build Pixart PAT9125 rotating switch driver. Change-Id: I5e7bc2ed8dce0b1dde4931e653db4233e90ed1cd Signed-off-by: Vevek Venkatesan <vevekv@codeaurora.org>