Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 017f14e8 authored by Todd Broch's avatar Todd Broch Committed by Dmitry Torokhov
Browse files

Input: cros_ec_keyb - optimize ghosting algorithm



Previous algorithm was a bit conservative and complicating with respect to
identifying key ghosting.  This CL uses the bitops hamming weight function
(hweight8) to count the number of matching rows for colM & colN.  If that
number is > 1 ghosting is present.

Additionally it removes NULL keys and our one virtual keypress KEY_BATTERY
from consideration as these inputs are never physical keypresses.

Signed-off-by: default avatarTodd Broch <tbroch@chromium.org>
Reviewed-by: default avatarVincent Palatin <vpalatin@chromium.org>
Reviewed-by: default avatarLuigi Semenzato <semenzato@chromium.org>
Tested-by: default avatarAndreas Färber <afaerber@suse.de>
Signed-off-by: default avatarJavier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 516d5f8b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment