diff options
author | Marc Dietrich <marvin24@gmx.de> | 2024-04-06 14:31:20 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-11 13:59:19 +0200 |
commit | 41288dfaf1b8231bc21fd6966e7296b087e75969 (patch) | |
tree | 4c3de225f1e4e3792d88be38354e8313078f5127 /drivers/staging/nvec | |
parent | 244b6e92bd1a0b6ff1f6253b10a96dc208a315f2 (diff) | |
download | linux-41288dfaf1b8231bc21fd6966e7296b087e75969.tar.gz linux-41288dfaf1b8231bc21fd6966e7296b087e75969.tar.bz2 linux-41288dfaf1b8231bc21fd6966e7296b087e75969.zip |
staging: nvec: make keyboard init synchronous
Currently, we are constantly sending commands to the EC without waiting for them to be
executed. This can lead to confusion, especially if we initialize several different devices
one after the other.
To avoid this, we are switching from asynchronous to synchronous command transmission.
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Link: https://lore.kernel.org/r/20240406123123.37148-3-marvin24@gmx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/nvec')
-rw-r--r-- | drivers/staging/nvec/nvec_kbd.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/staging/nvec/nvec_kbd.c b/drivers/staging/nvec/nvec_kbd.c index f9a1da952c0a..d0259c80f810 100644 --- a/drivers/staging/nvec/nvec_kbd.c +++ b/drivers/staging/nvec/nvec_kbd.c @@ -148,15 +148,16 @@ static int nvec_kbd_probe(struct platform_device *pdev) nvec_register_notifier(nvec, &keys_dev.notifier, 0); /* Enable keyboard */ - nvec_write_async(nvec, enable_kbd, 2); + nvec_write_sync(nvec, enable_kbd, 2, NULL); /* configures wake on special keys */ - nvec_write_async(nvec, cnfg_wake, 4); + nvec_write_sync(nvec, cnfg_wake, 4, NULL); + /* enable wake key reporting */ - nvec_write_async(nvec, cnfg_wake_key_reporting, 3); + nvec_write_sync(nvec, cnfg_wake_key_reporting, 3, NULL); /* Disable caps lock LED */ - nvec_write_async(nvec, clear_leds, sizeof(clear_leds)); + nvec_write_sync(nvec, clear_leds, sizeof(clear_leds), NULL); return 0; } |