Mark Pearson
dc8c9c171e
Input: atkbd - map F23 key to support default copilot shortcut
...
commit 907bc9268a upstream.
Microsoft defined Meta+Shift+F23 as the Copilot shortcut instead of a
dedicated keycode, and multiple vendors have their keyboards emit this
sequence in response to users pressing a dedicated "Copilot" key.
Unfortunately the default keymap table in atkbd does not map scancode
0x6e (F23) and so the key combination does not work even if userspace
is ready to handle it.
Because this behavior is common between multiple vendors and the
scancode is currently unused map 0x6e to keycode 193 (KEY_F23) so that
key sequence is generated properly.
MS documentation for the scan code:
https://learn.microsoft.com/en-us/windows/win32/inputdev/about-keyboard-input#scan-codes
Confirmed on Lenovo, HP and Dell machines by Canonical.
Tested on Lenovo T14s G6 AMD.
Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca >
Link: https://lore.kernel.org/r/20250107034554.25843-1-mpearson-lenovo@squebb.ca
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2025-02-01 18:37:56 +01:00
Nuno Sa
195e42c9a9
Input: adp5589-keys - fix adp5589_gpio_get_value()
...
commit c684771630 upstream.
The adp5589 seems to have the same behavior as similar devices as
explained in commit 910a9f5636 ("Input: adp5588-keys - get value from
data out when dir is out").
Basically, when the gpio is set as output we need to get the value from
ADP5589_GPO_DATA_OUT_A register instead of ADP5589_GPI_STATUS_A.
Fixes: 9d2e173644 ("Input: ADP5589 - new driver for I2C Keypad Decoder and I/O Expander")
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20241001-b4-dev-adp5589-fw-conversion-v1-2-fca0149dfc47@analog.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-10-10 11:57:57 +02:00
Nuno Sa
7c3f04223a
Input: adp5589-keys - fix NULL pointer dereference
...
commit fb5cc65f97 upstream.
We register a devm action to call adp5589_clear_config() and then pass
the i2c client as argument so that we can call i2c_get_clientdata() in
order to get our device object. However, i2c_set_clientdata() is only
being set at the end of the probe function which means that we'll get a
NULL pointer dereference in case the probe function fails early.
Fixes: 30df385e35 ("Input: adp5589-keys - use devm_add_action_or_reset() for register clear")
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20241001-b4-dev-adp5589-fw-conversion-v1-1-fca0149dfc47@analog.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-10-10 11:57:57 +02:00
Nuno Sa
2a26c3122d
Input: adp5588-keys - fix check on return code
...
commit eb017f4ea1 upstream.
During adp5588_setup(), we read all the events to clear the event FIFO.
However, adp5588_read() just calls i2c_smbus_read_byte_data() which
returns the byte read in case everything goes well. Hence, we need to
explicitly check for a negative error code instead of checking for
something different than 0.
Fixes: e960309ce3 ("Input: adp5588-keys - bail out on returned error")
Cc: stable@vger.kernel.org
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20240920-fix-adp5588-err-check-v1-1-81f6e957ef24@analog.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-10-04 16:29:46 +02:00
Andrei Lalaev
8f8b4da72f
Input: qt1050 - handle CHIP_ID reading error
...
[ Upstream commit 866a5c7e27 ]
If the device is missing, we get the following error:
qt1050 3-0041: ID -1340767592 not supported
Let's handle this situation and print more informative error
when reading of CHIP_ID fails:
qt1050 3-0041: Failed to read chip ID: -6
Fixes: cbebf5adde ("Input: qt1050 - add Microchip AT42QT1050 support")
Signed-off-by: Andrei Lalaev <andrei.lalaev@anton-paar.com >
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de >
Link: https://lore.kernel.org/r/20240617183018.916234-1-andrey.lalaev@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-08-03 08:53:58 +02:00
Uwe Kleine-König
bf18280d43
Input: gpio_keys_polled - suppress deferred probe error for gpio
...
[ Upstream commit 963465a331 ]
On a PC Engines APU our admins are faced with:
$ dmesg | grep -c "gpio-keys-polled gpio-keys-polled: unable to claim gpio 0, err=-517"
261
Such a message always appears when e.g. a new USB device is plugged in.
Suppress this message which considerably clutters the kernel log for
EPROBE_DEFER (i.e. -517).
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20240305101042.10953-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-03-26 18:19:15 -04:00
Hans de Goede
ac589a37bc
Input: atkbd - skip ATKBD_CMD_SETLEDS when skipping ATKBD_CMD_GETID
...
commit 683cd8259a upstream.
After commit 936e4d49ec ("Input: atkbd - skip ATKBD_CMD_GETID in
translated mode") the keyboard on Dell XPS 13 9350 / 9360 / 9370 models
has stopped working after a suspend/resume.
The problem appears to be that atkbd_probe() fails when called
from atkbd_reconnect() on resume, which on systems where
ATKBD_CMD_GETID is skipped can only happen by ATKBD_CMD_SETLEDS
failing. ATKBD_CMD_SETLEDS failing because ATKBD_CMD_GETID was
skipped is weird, but apparently that is what is happening.
Fix this by also skipping ATKBD_CMD_SETLEDS when skipping
ATKBD_CMD_GETID.
Fixes: 936e4d49ec ("Input: atkbd - skip ATKBD_CMD_GETID in translated mode")
Reported-by: Paul Menzel <pmenzel@molgen.mpg.de >
Closes: https://lore.kernel.org/linux-input/0aa4a61f-c939-46fe-a572-08022e8931c7@molgen.mpg.de/
Closes: https://bbs.archlinux.org/viewtopic.php?pid=2146300
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218424
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2260517
Tested-by: Paul Menzel <pmenzel@molgen.mpg.de >
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Link: https://lore.kernel.org/r/20240126160724.13278-2-hdegoede@redhat.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-02-16 19:10:55 +01:00
Hans de Goede
881720dcf6
Input: atkbd - use ab83 as id when skipping the getid command
...
commit 58f65f9db7 upstream.
Barnabás reported that the change to skip the getid command
when the controller is in translated mode on laptops caused
the Version field of his "AT Translated Set 2 keyboard"
input device to change from ab83 to abba, breaking a custom
hwdb entry for this keyboard.
Use the standard ab83 id for keyboards when getid is skipped
(rather then that getid fails) to avoid reporting a different
Version to userspace then before skipping the getid.
Fixes: 936e4d49ec ("Input: atkbd - skip ATKBD_CMD_GETID in translated mode")
Reported-by: Barnabás Pőcze <pobrn@protonmail.com >
Closes: https://lore.kernel.org/linux-input/W1ydwoG2fYv85Z3C3yfDOJcVpilEvGge6UGa9kZh8zI2-qkHXp7WLnl2hSkFz63j-c7WupUWI5TLL6n7Lt8DjRuU-yJBwLYWrreb1hbnd6A=@protonmail.com/
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Link: https://lore.kernel.org/r/20240116204325.7719-1-hdegoede@redhat.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-01-25 15:35:41 -08:00
Hans de Goede
274333f825
Input: atkbd - skip ATKBD_CMD_GETID in translated mode
...
[ Upstream commit 936e4d49ec ]
There have been multiple reports of keyboard issues on recent laptop models
which can be worked around by setting i8042.dumbkbd, with the downside
being this breaks the capslock LED.
It seems that these issues are caused by recent laptops getting confused by
ATKBD_CMD_GETID. Rather then adding and endless growing list of quirks for
this, just skip ATKBD_CMD_GETID alltogether on laptops in translated mode.
The main goal of sending ATKBD_CMD_GETID is to skip binding to ps/2
mice/touchpads and those are never used in translated mode.
Examples of laptop models which benefit from skipping ATKBD_CMD_GETID:
* "HP Laptop 15s-fq2xxx", "HP laptop 15s-fq4xxx" and "HP Laptop 15-dy2xxx"
models the kbd stops working for the first 2 - 5 minutes after boot
(waiting for EC watchdog reset?)
* On "HP Spectre x360 13-aw2xxx" atkbd fails to probe the keyboard
* At least 9 different Lenovo models have issues with ATKBD_CMD_GETID, see:
https://github.com/yescallop/atkbd-nogetid
This has been tested on:
1. A MSI B550M PRO-VDH WIFI desktop, where the i8042 controller is not
in translated mode when no keyboard is plugged in and with a ps/2 kbd
a "AT Translated Set 2 keyboard" /dev/input/event# node shows up
2. A Lenovo ThinkPad X1 Yoga gen 8 (always has a translated set 2 keyboard)
Reported-by: Shang Ye <yesh25@mail2.sysu.edu.cn >
Closes: https://lore.kernel.org/linux-input/886D6167733841AE+20231017135318.11142-1-yesh25@mail2.sysu.edu.cn/
Closes: https://github.com/yescallop/atkbd-nogetid
Reported-by: gurevitch <mail@gurevit.ch >
Closes: https://lore.kernel.org/linux-input/2iAJTwqZV6lQs26cTb38RNYqxvsink6SRmrZ5h0cBUSuf9NT0tZTsf9fEAbbto2maavHJEOP8GA1evlKa6xjKOsaskDhtJWxjcnrgPigzVo=@gurevit.ch/
Reported-by: Egor Ignatov <egori@altlinux.org >
Closes: https://lore.kernel.org/all/20210609073333.8425-1-egori@altlinux.org/
Reported-by: Anton Zhilyaev <anton@cpp.in >
Closes: https://lore.kernel.org/linux-input/20210201160336.16008-1-anton@cpp.in/
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2086156
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Link: https://lore.kernel.org/r/20231115174625.7462-1-hdegoede@redhat.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-01-20 11:51:44 +01:00
Haoran Liu
2a83824c6c
Input: ipaq-micro-keys - add error handling for devm_kmemdup
...
[ Upstream commit 59b6a747e2 ]
Check the return value of i2c_add_adapter. Static analysis revealed that
the function did not properly handle potential failures of
i2c_add_adapter, which could lead to partial initialization of the I2C
adapter and unstable operation.
Signed-off-by: Haoran Liu <liuhaoran14@163.com >
Link: https://lore.kernel.org/r/20231203164653.38983-1-liuhaoran14@163.com
Fixes: d7535ffa42 ("Input: driver for microcontroller keys on the iPaq h3xxx")
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-01-01 12:42:36 +00:00
Dmitry Torokhov
57b0c96f1e
Input: tca6416-keypad - switch to using input core's polling features
...
Instead of rolling custom polling implementation use input core
facilities.
Link: https://lore.kernel.org/r/20230724053024.352054-5-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-28 18:05:42 -07:00
Yangtao Li
91a4c69052
Input: tca6416-keypad - convert to use devm_* api
...
Use devm_* api to simplify code, this makes it unnecessary to explicitly
release resources.
Signed-off-by: Yangtao Li <frank.li@vivo.com >
Link: https://lore.kernel.org/r/20230724053024.352054-4-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-28 18:04:14 -07:00
Dmitry Torokhov
cc141c35af
Input: tca6416-keypad - fix interrupt enable disbalance
...
The driver has been switched to use IRQF_NO_AUTOEN, but in the error
unwinding and remove paths calls to enable_irq() were left in place, which
will lead to an incorrect enable counter value.
Fixes: bcd9730a04 ("Input: move to use request_irq by IRQF_NO_AUTOEN flag")
Link: https://lore.kernel.org/r/20230724053024.352054-3-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-28 18:04:14 -07:00
Dmitry Torokhov
d3176b2926
Input: tca6416-keypad - rely on I2C core to set up suspend/resume
...
tca6416_keypad_suspend() and tca6416_keypad_resume() only configure device
IRQ for wakeup. I2C core already does this by registering interrupt as a
wakeup IRQ in case when device is marked as wakeup-enabled, so we can
simply remove this code from the driver.
Link: https://lore.kernel.org/r/20230724053024.352054-2-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-28 18:04:14 -07:00
Dmitry Torokhov
687fe7dfb7
Input: tca6416-keypad - always expect proper IRQ number in i2c client
...
Remove option having i2c client contain raw gpio number instead of proper
IRQ number. There are no users of this facility in mainline and it will
allow cleaning up the driver code with regard to wakeup handling, etc.
Link: https://lore.kernel.org/r/20230724053024.352054-1-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-28 18:04:14 -07:00
Yangtao Li
fe45d12745
Input: lm8323 - convert to use devm_* api
...
Use devm_* api to simplify code, this makes it unnecessary to explicitly
release resources.
Signed-off-by: Yangtao Li <frank.li@vivo.com >
Link: https://lore.kernel.org/r/20230724052901.350240-2-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-28 18:04:00 -07:00
Dmitry Torokhov
0410595e23
Input: lm8323 - rely on device core to create kp_disable attribute
...
Device core now has facilities to create driver-specific device attributes
as part of driver probing, use them.
Link: https://lore.kernel.org/r/20230724052901.350240-1-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-28 18:04:00 -07:00
Yangtao Li
3e4bb047b2
Input: qt2160 - convert to use devm_* api
...
Use devm_* api to simplify code, this makes it unnecessary to explicitly
release resources.
Signed-off-by: Yangtao Li <frank.li@vivo.com >
Link: https://lore.kernel.org/r/20230714080611.81302-7-frank.li@vivo.com
Link: https://lore.kernel.org/r/20230724051345.335219-4-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-28 18:03:11 -07:00
Dmitry Torokhov
d675c9b573
Input: qt2160 - do not hard code interrupt trigger
...
Rely on the platform and ACPI/DT to set up the interrupt trigger.
Link: https://lore.kernel.org/r/20230724051345.335219-3-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-28 18:02:44 -07:00
Dmitry Torokhov
f1fbff609a
Input: qt2160 - switch to using threaded interrupt handler
...
Instead of using combination of normal IRQ and work item which required
careful handling on device teardown, use standard threaded interrupt that
allows communication wityh the chip over slow (I2C) bus directly in the
interrupt handler.
To support polling mode switch to standard polling support implemented by
the input core.
Link: https://lore.kernel.org/r/20230724051345.335219-2-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-28 18:02:44 -07:00
Dmitry Torokhov
f94c3bce74
Input: qt2160 - tweak check for i2c adapter functionality
...
i2c_check_functionality() returns essentially a boolean and not an error
code, so treat it as such.
Link: https://lore.kernel.org/r/20230724051345.335219-1-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-28 18:02:44 -07:00
Nathan Chancellor
8362bf82fb
Input: mcs-touchkey - fix uninitialized use of error in mcs_touchkey_probe()
...
Clang warns (or errors with CONFIG_WERROR=y):
drivers/input/keyboard/mcs_touchkey.c:149:49: error: variable 'error' is uninitialized when used here [-Werror,-Wuninitialized]
149 | dev_err(&client->dev, "i2c read error[%d]\n", error);
| ^~~~~
include/linux/dev_printk.h:144:65: note: expanded from macro 'dev_err'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
drivers/input/keyboard/mcs_touchkey.c:110:11: note: initialize the variable 'error' to silence this warning
110 | int error;
| ^
| = 0
1 error generated.
A refactoring updated the error handling in this block but did not
update the dev_err() call to use fw_ver instead of error. Do so now to
fix the warning and avoid printing uninitialized memory.
Closes: https://github.com/ClangBuiltLinux/linux/issues/1893
Fixes: e175eae16c ("Input: mcs-touchkey - convert to use devm_* api")
Signed-off-by: Nathan Chancellor <nathan@kernel.org >
Link: https://lore.kernel.org/r/20230725-mcs_touchkey-fix-wuninitialized-v1-1-615db39af51c@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-25 09:51:13 -07:00
Yangtao Li
447c095442
Input: qt1070 - convert to use devm_* api
...
Use devm_* api to simplify code, this makes it unnecessary to explicitly
release resources.
Signed-off-by: Yangtao Li <frank.li@vivo.com >
Link: https://lore.kernel.org/r/20230714080611.81302-5-frank.li@vivo.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-20 16:52:49 -07:00
Yangtao Li
e175eae16c
Input: mcs-touchkey - convert to use devm_* api
...
Use devm_* api to simplify code, this makes it unnecessary to explicitly
release resources.
Signed-off-by: Yangtao Li <frank.li@vivo.com >
Link: https://lore.kernel.org/r/20230714080611.81302-3-frank.li@vivo.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-20 16:52:49 -07:00
Yangtao Li
caddca33a0
Input: amikbd - convert to use devm_* api
...
Use devm_* api to simplify code, this makes it unnecessary to explicitly
release resources.
Signed-off-by: Yangtao Li <frank.li@vivo.com >
Link: https://lore.kernel.org/r/20230714080611.81302-2-frank.li@vivo.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-20 16:52:48 -07:00
Yangtao Li
2b6aa9e792
Input: lm8333 - convert to use devm_* api
...
Use devm_* api to simplify code, this makes it unnecessary to explicitly
release resources.
Signed-off-by: Yangtao Li <frank.li@vivo.com >
Link: https://lore.kernel.org/r/20230714080611.81302-1-frank.li@vivo.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-20 16:52:47 -07:00
Geert Uytterhoeven
904ef2c47d
Input: gpio-keys - convert to dev_err_probe()
...
Use the dev_err_probe() helper, instead of open-coding the same
operation.
While at it, invert the error checking logic to simplify code flow.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be >
Link: https://lore.kernel.org/r/d225a837c50e2b19a41555a8f7ce0f94b1689aa4.1689600353.git.geert+renesas@glider.be
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-17 10:03:08 -07:00
Rob Herring
dbce1a7d5d
Input: Explicitly include correct DT includes
...
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.
Signed-off-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230714174633.4058096-1-robh@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-17 10:03:07 -07:00
Krzysztof Kozlowski
0b64150c34
Input: bcm-keypad - correct dev_err_probe() error
...
Pass proper PTR_ERR as dev_err_probe() argument.
Fixes: a2c795b696 ("Input: bcm-keypad - simplify with dev_err_probe()")
Reported-by: kernel test robot <lkp@intel.com >
Reported-by: Dan Carpenter <dan.carpenter@linaro.org >
Closes: https://lore.kernel.org/r/202306261505.wTjCXRIO-lkp@intel.com/
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20230711072449.43569-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-12 11:54:19 -07:00
Yangtao Li
c0551abb05
Input: nomadik-ske-keypad - convert to use devm_* api
...
Use devm_* api to simplify code, this makes it unnecessary to explicitly
release resources.
Signed-off-by: Yangtao Li <frank.li@vivo.com >
Link: https://lore.kernel.org/r/20230705052346.39337-8-frank.li@vivo.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-10 17:44:29 -07:00
Yangtao Li
b1c5590045
Input: sun4i-lradc-keys - convert to devm_platform_ioremap_resource()
...
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com >
Link: https://lore.kernel.org/r/20230705052346.39337-7-frank.li@vivo.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-10 17:44:29 -07:00
Yangtao Li
198a2ccaaa
Input: pxa27x_keypad - convert to devm_platform_ioremap_resource()
...
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com >
Link: https://lore.kernel.org/r/20230705052346.39337-6-frank.li@vivo.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-10 17:44:28 -07:00
Yangtao Li
db9842298a
Input: opencores-kbd - convert to devm_platform_ioremap_resource()
...
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com >
Link: https://lore.kernel.org/r/20230705052346.39337-5-frank.li@vivo.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-10 17:44:27 -07:00
Yangtao Li
e79637731c
Input: omap4-keyad - convert to devm_platform_ioremap_resource()
...
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com >
Link: https://lore.kernel.org/r/20230705052346.39337-4-frank.li@vivo.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-10 17:44:27 -07:00
Yangtao Li
b1066df414
Input: nspire-keypad - use devm_platform_get_and_ioremap_resource()
...
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Yangtao Li <frank.li@vivo.com >
Link: https://lore.kernel.org/r/20230705052346.39337-3-frank.li@vivo.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-10 17:44:26 -07:00
Yangtao Li
3799836f60
Input: lpc32xx-keys - convert to devm_platform_ioremap_resource()
...
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com >
Link: https://lore.kernel.org/r/20230705052346.39337-2-frank.li@vivo.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-10 17:44:25 -07:00
Yangtao Li
5abb32411f
Input: bcm-keypad - convert to devm_platform_ioremap_resource()
...
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com >
Link: https://lore.kernel.org/r/20230705052346.39337-1-frank.li@vivo.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-10 17:44:24 -07:00
Martin Kaiser
80c268c339
Input: tegra-kbc - use devm_platform_ioremap_resource
...
devm_platform_get_and_ioremap_resource maps a resource and returns its
physical address. If we don't need the physical address, we should call
devm_platform_ioremap_resource instead.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Acked-by: Thierry Reding <treding@nvidia.com >
Link: https://lore.kernel.org/r/20230709134109.182418-1-martin@kaiser.cx
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-10 12:00:03 -07:00
Christophe JAILLET
26ab82616e
Input: adp5588-keys - use devm_regulator_get_enable()
...
Use devm_regulator_get_enable() instead of hand writing it. It saves some
line of code.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Acked-by: Michael Hennerich <michael.hennerich@analog.com >
Link: https://lore.kernel.org/r/af343b5b0d740cc9f8863264c30e3da4215721d7.1686985911.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-07 17:03:34 -07:00
Christophe JAILLET
3ce6e06202
Input: pinephone-keyboard - use devm_regulator_get_enable()
...
Use devm_regulator_get_enable() instead of hand writing it. It saves some
line of code.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Link: https://lore.kernel.org/r/78d7a4719ed7c372a7aa62afb66d4f1561799b5f.1686985515.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-07 17:03:26 -07:00
Krzysztof Kozlowski
a2c795b696
Input: bcm-keypad - simplify with dev_err_probe()
...
Common pattern of handling deferred probe can be simplified with
dev_err_probe() and devm_clk_get_optional(). Less code and the error
value gets printed.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Link: https://lore.kernel.org/r/20230625162817.100397-23-krzysztof.kozlowski@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-07 16:54:30 -07:00
Krzysztof Kozlowski
caec3d4416
Input: gpio_keys_polled - simplify with dev_err_probe()
...
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and also it prints the error value.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20230625162817.100397-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-07-07 16:54:26 -07:00
Geert Uytterhoeven
3615536c92
Input: gpio-keys - use input_report_key()
...
Use the input_report_key() helper instead of open-coding the same
operation.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be >
Link: https://lore.kernel.org/r/185f3320e39000159d4bd843fd3119b94c30d607.1684854795.git.geert+renesas@glider.be
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-05-23 14:48:57 -07:00
Dmitry Torokhov
c4c7eac8ee
Input: libps2 - introduce common interrupt handler
...
Instead of exposing inner workings of libps2 to drivers such as atkbd and
psmouse, have them define pre-receive and receive callbacks, and provide a
common handler that can be used with underlying serio port.
While at this add kerneldoc to the module.
Link: https://lore.kernel.org/r/ZGK81cxqjr/KS1kA@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-05-18 11:40:32 -07:00
Dmitry Torokhov
100e16959c
Input: libps2 - attach ps2dev instances as serio port's drvdata
...
In preparation of having unified interrupt handler for PS/2 devices,
instead of attaching instances of psmouse and atkbd structures as serio's
driver data, switch to attaching ps2dev instances.
Reviewed-by: Raul Rangel <rrangel@chromium.org >
Link: https://lore.kernel.org/r/20230511185252.386941-2-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-05-18 11:40:32 -07:00
Uwe Kleine-König
d8bde56dfd
Input: Switch i2c drivers back to use .probe()
...
After commit b8a1a4cd5a ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Link: https://lore.kernel.org/r/20230517164645.162294-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-05-17 09:59:11 -07:00
Uwe Kleine-König
6906f5060d
Input: iqs62x-keys - suppress duplicated error message in .remove()
...
If a platform driver's remove callback returns non-zero the driver core
emits an error message. In such a case however iqs62x_keys_remove()
already issued a (better) message. So return zero to suppress the
generic message.
This patch has no other side effects as platform_remove() ignores the
return value of .remove() after the warning.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Link: https://lore.kernel.org/r/20230318225110.261439-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-03-19 21:34:24 -07:00
Krzysztof Kozlowski
27e54d5193
Input: tm2-touchkey - drop of_match_ptr for ID table
...
The driver will match mostly by DT table (even thought there is regular
ID table) so there is little benefit in of_match_ptr (this also allows
ACPI matching via PRP0001, even though it might not be relevant here).
This also fixes !CONFIG_OF error:
drivers/input/keyboard/tm2-touchkey.c:335:34: error: ‘tm2_touchkey_of_match’ defined but not used [-Werror=unused-const-variable=]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20230312131514.351603-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-03-17 04:17:34 -07:00
Krzysztof Kozlowski
bb5e4f3e1a
Input: st-keyscan - drop of_match_ptr for ID table
...
The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it might not be relevant here). This
also fixes !CONFIG_OF error:
drivers/input/keyboard/st-keyscan.c:251:34: error: ‘keyscan_of_match’ defined but not used [-Werror=unused-const-variable=]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20230312131514.351603-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-03-17 04:17:32 -07:00
Rob Herring
12c7d0aeb3
Input: Use of_property_read_bool() for boolean properties
...
It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties.
Convert reading boolean properties to of_property_read_bool().
Signed-off-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230310144708.1542751-1-robh@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
2023-03-17 04:17:29 -07:00