- 25 Mar, 2021 5 commits
-
-
Paul Cercueil authored
Dealing with input, timing is important; if the button should be released in one millisecond, then it should be done in one millisecond and not a hundred milliseconds. Therefore, the standard timer API is not really suitable for this task. Convert the gpio-keys driver to use a hrtimer instead of the standard timer to address this issue. Note that by using a hard IRQ for the hrtimer callback, we can get rid of the spin_lock_irqsave() and spin_unlock_irqrestore(). Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20210307222240.380583-2-paul@crapouillou.netSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Paul Cercueil authored
The input_sync() function is already called after the loop in gpio_keys_report_state(), so it does not need to be called after each iteration within gpio_keys_gpio_report_event(). Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20210307222240.380583-1-paul@crapouillou.netSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Heikki Krogerus authored
The old device property API is about to be removed, so explaing how to use complete software nodes instead. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20210304090948.27014-1-heikki.krogerus@linux.intel.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Krzysztof Kozlowski authored
The touchscreen can be a wake up source and it's being used in DTS: arch/arm/boot/dts/exynos5250-spring.dt.yaml: trackpad@4b: 'wakeup-source' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20210212163806.69996-1-krzk@kernel.orgSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Uwe Kleine-König authored
The for loop is just a complicate way to express a division. Replace it by the actual division which is both simpler to understand for a human and more efficient for a CPU to calculate. Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Link: https://lore.kernel.org/r/20210316212233.50765-1-uwe@kleine-koenig.orgSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 21 Mar, 2021 3 commits
-
-
Dmitry Osipenko authored
According to datasheets, chips like mXT1386 have a WAKE line, it is used to wake the chip up from deep sleep mode before communicating with it via the I2C-compatible interface. If the WAKE line is connected to a GPIO line, the line must be asserted 25 ms before the host attempts to communicate with the controller. If the WAKE line is connected to the SCL pin, the controller will send a NACK on the first attempt to address it, the host must then retry 25 ms later. Implement the wake-up methods in the driver. Touchscreen now works properly on devices like Acer A500 tablet, fixing problems like this: atmel_mxt_ts 0-004c: __mxt_read_reg: i2c transfer failed (-121) atmel_mxt_ts 0-004c: mxt_bootloader_read: i2c recv failed (-121) atmel_mxt_ts 0-004c: Trying alternate bootloader address atmel_mxt_ts 0-004c: mxt_bootloader_read: i2c recv failed (-121) atmel_mxt_ts: probe of 0-004c failed with error -121 Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jiada Wang <jiada_wang@mentor.com> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20210302102158.10533-3-digetx@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Osipenko authored
Some Atmel touchscreen controllers have a WAKE line that needs to be asserted low in order to wake up controller from a deep sleep. Document the wakeup methods and the new GPIO properties. Reviewed-by: Rob Herring <robh@kernel.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20210302102158.10533-2-digetx@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
edison.jiang authored
There is error from cppcheck tool. "Shifting signed 32-bit value by 31 bits is undefined behaviour errors" Signed-off-by: edison.jiang <jiangzhipeng@yulong.com> Link: https://lore.kernel.org/r/20210316153150.1207-1-jzp0409@163.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 20 Mar, 2021 1 commit
-
-
Johan Hovold authored
The driver data for the data interface has already been set by usb_driver_claim_interface() so drop the subsequent redundant assignment. Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20210318155525.22496-1-johan@kernel.orgSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 16 Mar, 2021 2 commits
-
-
Andy Shevchenko authored
Device property API allows to gather device resources from different sources, such as ACPI. Convert the drivers to unleash the power of device property API. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20210314210951.645783-2-andy.shevchenko@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Andy Shevchenko authored
This converts the driver to use GPIO descriptors. Note that it now uses logical polarity and thus nagation has been dropped. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20210314210951.645783-1-andy.shevchenko@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 10 Mar, 2021 1 commit
-
-
Jingle Wu authored
Newer controllers, such as Voxel, Delbin, Magple, Bobba and others, do not need to be reset after issuing power-on command, and skipping reset saves at least 100ms from resume time. Note that if first attempt of re-initializing device fails we will not be skipping reset on the subsequent ones. Signed-off-by: Jingle Wu <jingle.wu@emc.com.tw> Link: https://lore.kernel.org/r/20210226073537.4926-1-jingle.wu@emc.com.twSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 08 Mar, 2021 4 commits
-
-
Lucas Stach authored
Add a sysfs attribute to query the type of the touchscreen device. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Link: https://lore.kernel.org/r/20210125182527.1225245-5-l.stach@pengutronix.deSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Lucas Stach authored
If the device is stuck in bootloader (maybe due to blank or corrupted application firmware) it won't answer a query for the firmware version. Fall back to returning the bootloader version in that case. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Link: https://lore.kernel.org/r/20210125182527.1225245-4-l.stach@pengutronix.deSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Lucas Stach authored
Factor out the vendor data i2c request handling to make it reusable for other functions. Also don't cache the model and firmware version string in the device private data as we never use the cached version, but always read from the device. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Link: https://lore.kernel.org/r/20210125182527.1225245-3-l.stach@pengutronix.deSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Lucas Stach authored
Split out the multitouch event handling into its own function to allow other events to be handled in the IRQ handler without disturbing the MT handling. Now that things are separated a bit more, stop treating vendor data requests special by cehcking for a locked mutex, but just look at the event ID to figure out if the message is a MT report or a vendor data query reply. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Link: https://lore.kernel.org/r/20210125182527.1225245-2-l.stach@pengutronix.deSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 23 Feb, 2021 8 commits
-
-
Jiapeng Chong authored
Fix the following coccicheck warning: ./drivers/input/tablet/aiptek.c:1629:8-16: WARNING: use scnprintf or sprintf. Reported-by: Abaci Robot<abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Link: https://lore.kernel.org/r/1612419191-1078-1-git-send-email-jiapeng.chong@linux.alibaba.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Bhaskar Chowdhury authored
s/postive/positive/ Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Pali Rohár <pali@kernel.org> Link: https://lore.kernel.org/r/20210222075439.32201-1-unixbhaskar@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Philip Chen authored
The common cros-ec keymap has been defined as macros. This patch uses the macros to simply linux,keymap in cros-ec-keyboard.dtsi file. This patch also creates an alias for keyboard-controller to make it easier to override the keymap in board-specific dts later. Signed-off-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20210115143555.v6.2.I9ec9c3c61eded22a5f7fbff838d23fc95ec7cfe0@changeidSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Philip Chen authored
Decouple LOCK from F13 and directly map the LOCK key (KSI3/KSO9) to KEY_SLEEP action key code. Signed-off-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Acked-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20210115143555.v6.3.I96134907488f41f358d03f3c1b08194f9547e670@changeidSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Philip Chen authored
In Chrome OS, the keyboard matrix can be split to two groups: The keymap for the top row keys can be customized based on OEM preference, while the keymap for the other keys is generic/fixed across boards. This patch creates marcos for the keymaps of these two groups, making it easier to reuse the generic portion of keymap when we override the keymap in the board-specific dts for custom top row design. Signed-off-by: Philip Chen <philipchen@chromium.org> Acked-by: Rob Herring <robh@kernel.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20210115143555.v6.1.Iaa8a60cf2ed4b7ad5e2fbb4ad76a1c600ee36113@changeidSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Philip Chen authored
The top-row keys in a keyboard usually have dual functionalities. E.g. A function key "F1" is also an action key "Browser back". Therefore, when an application receives an action key code from a top-row key press, the application needs to know how to correlate the action key code with the function key code and do the conversion whenever necessary. Since the userpace already knows the key scanlines (row/column) associated with a received key code. Essentially, the userspace only needs a mapping between the key row/column and the matching physical location in the top row. So, enhance the cros-ec-keyb driver to create such a mapping and expose it to userspace in the form of a function_row_physmap attribute. The attribute would be a space separated ordered list of row/column codes for the keys in the function row, in a left-to-right order. The attribute will only be present when the device has a custom design for the top-row keys. Signed-off-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20210115122412.v7.2.I6542d7d9d0b246e7079bb16b41e697b2ac4b4e39@changeidSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Philip Chen authored
Add a new property `function-row-physmap` to the device tree for the custom keyboard top row design. The property describes the rows/columns of the top row keys from left to right. Signed-off-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20210115122412.v7.1.I025fb861cd5fa0ef5286b7dce514728e9df7ae74@changeidSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
Merge with mainline to get latest APIs and device tree bindings.
-
- 19 Feb, 2021 6 commits
-
-
Ronald Tschalär authored
For some reason, when the system is under heavy CPU load, the read following the write sometimes occurs unusually quickly, resulting in the read data not being quite ready and hence a bad packet getting read. Adding another delay after reading the status message appears to fix this. Signed-off-by: Ronald Tschalär <ronald@innovation.ch> Link: https://lore.kernel.org/r/20210217190718.11035-2-ronald@innovation.chSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Ronald Tschalär authored
The response to a command may never arrive or it may be corrupted (and hence dropped) for some reason. While exceedingly rare, when it did happen it blocked all further commands. One way to fix this was to do a suspend/resume. However, recovering automatically seems like a nicer option. Hence this puts a time limit (1 sec) on how long we're willing to wait for a response, after which we assume it got lost. Signed-off-by: Ronald Tschalär <ronald@innovation.ch> Link: https://lore.kernel.org/r/20210217190718.11035-1-ronald@innovation.chSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
zinitix_init_touch() returns error code or 0 for success and therefore return type must be int, not bool. Fixes: 26822652 ("Input: add zinitix touchscreen driver") Reported-by: kernel test robot <lkp@intel.com> Reported-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Link: https://lore.kernel.org/r/YC8z2bXc3Oy8pABa@google.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Marcos Paulo de Souza authored
After commit 77b42539 ("Input: i8042 - use chassis info to skip selftest on Asus laptops"), all modern Asus laptops have the i8042 selftest disabled. It has done by using chassys type "10" (laptop). The Asus Zenbook Flip suffers from similar suspend/resume issues, but it _sometimes_ work and sometimes it doesn't. Setting noselftest makes it work reliably. In this case, we need to add chassis type "31" (convertible) in order to avoid selftest in this device. Reported-by: Ludvig Norgren Guldhag <ludvigng@gmail.com> Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com> Link: https://lore.kernel.org/r/20210219164638.761-1-mpdesouza@suse.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
devm_ioremap_resource() is only guaranteed to be present if CONFIG_HAS_IOMEM is set. Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/YCyauGyqxut69JNz@google.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dan Carpenter authored
The problem here is that "len" might be less than "joydev->nabs" so the loops which verfy abspam[i] and keypam[] might read beyond the buffer. Fixes: 999b874f ("Input: joydev - validate axis/button maps before clobbering current ones") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YCyzR8WvFRw4HWw6@mwanda [dtor: additional check for len being even in joydev_handle_JSIOCSBTNMAP] Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 18 Feb, 2021 1 commit
-
-
Dan Carpenter authored
If elo_setup_10() fails then this should return an error code instead of success. Fixes: fae3006e ("Input: elo - add support for non-pressure-sensitive touchscreens") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YBKFd5CvDu+jVmfW@mwandaSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 17 Feb, 2021 1 commit
-
-
Dan Carpenter authored
If v4l2_ctrl_handler_setup() fails then probe() should return an error code instead of returning success. Fixes: cee1e3e2 ("media: add video control handlers using V4L2 control framework") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YBKFkbATXa5fA3xj@mwandaSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 16 Feb, 2021 2 commits
-
-
Josh Poimboeuf authored
If an enum value were to get added without updating this switch statement, the unreachable() annotation would trigger undefined behavior, causing execution to fall through the end of the function, into the next one. Make the error handling more robust for an unexpected enum value, by doing BUG() instead of unreachable(). Fixes the following objtool warning: drivers/input/touchscreen/elants_i2c.o: warning: objtool: elants_i2c_initialize() falls through to next function elants_i2c_resume() Reported-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Reviewed-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Link: https://lore.kernel.org/r/59e2e82d1e40df11ab38874c03556a31c6b2f484.1612974132.git.jpoimboe@redhat.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Yang Li authored
Eliminate the following coccicheck warning: ./drivers/input/touchscreen/zinitix.c:164:31-32: Unneeded semicolon Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://lore.kernel.org/r/1612319443-115831-1-git-send-email-yang.lee@linux.alibaba.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 14 Feb, 2021 6 commits
-
-
Linus Torvalds authored
-
git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-ledsLinus Torvalds authored
Pull LED fix from Pavel Machek: "One-liner fixing a build problem" * 'for-rc8-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds: leds: rt8515: add V4L2_FLASH_LED_CLASS dependency
-
Linus Torvalds authored
Merge tag 'kbuild-fixes-v5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Fix CONFIG_TRIM_UNUSED_KSYMS build for ppc64 - Use pkg-config for scripts/sign-file.c CFLAGS * tag 'kbuild-fixes-v5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: scripts: set proper OpenSSL include dir also for sign-file sparc: remove wrong comment from arch/sparc/include/asm/Kbuild kbuild: fix CONFIG_TRIM_UNUSED_KSYMS build for ppc64
-
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds authored
Pull x86 fixes from Borislav Petkov: "I kinda knew while typing 'I hope this is the last batch of x86/urgent updates' last week, Murphy was reading too and uttered 'Hold my beer!'. So here's more fixes... Thanks Murphy. Anyway, three more x86/urgent fixes for 5.11 final. We should be finally ready (famous last words). :-) - An SGX use after free fix - A fix for the fix to disable CET instrumentation generation for kernel code. We forgot 32-bit, which we seem to do very often nowadays - A Xen PV fix to irqdomain init ordering" * tag 'x86_urgent_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/pci: Create PCI/MSI irqdomain after x86_init.pci.arch_init() x86/build: Disable CET instrumentation in the kernel for 32-bit too x86/sgx: Maintain encl->refcount for each encl->mm_list entry
-
Arnd Bergmann authored
The leds-rt8515 driver can optionall use the v4l2 flash led class, but it causes a link error when that class is in a loadable module and the rt8515 driver itself is built-in: ld.lld: error: undefined symbol: v4l2_flash_init >>> referenced by leds-rt8515.c >>> leds/flash/leds-rt8515.o:(rt8515_probe) in archive drivers/built-in.a Adding 'depends on V4L2_FLASH_LED_CLASS' in Kconfig would avoid that, but it would make it impossible to use the driver without the v4l2 support. Add the same dependency that the other users of this class have instead, which just prevents the broken configuration. Fixes: e1c6edcb ("leds: rt8515: Add Richtek RT8515 LED driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
-
Rolf Eike Beer authored
Fixes: 2cea4a7a ("scripts: use pkg-config to locate libcrypto") Signed-off-by: Rolf Eike Beer <eb@emlix.com> Cc: stable@vger.kernel.org # 5.6.x Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
-