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: NTodd Broch <tbroch@chromium.org> Reviewed-by: NVincent Palatin <vpalatin@chromium.org> Reviewed-by: NLuigi Semenzato <semenzato@chromium.org> Tested-by: NAndreas Färber <afaerber@suse.de> Signed-off-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
Showing
想要评论请 注册 或 登录