Input: cros_ec_keyb - optimize ghosting algorithm
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: Todd Broch <035f5b1f817cbb94019cec357b99778115602b63@chromium.org>
Reviewed-by: Vincent Palatin <70a9964ec8fd10b0b08fcc8623c2add25ddf99ac@chromium.org>
Reviewed-by: Luigi Semenzato <5004afe206914bdd0a6fc6438682f9b308a36be6@chromium.org>
Tested-by: Andreas Färber <e2dd33448c0d502d92fa832c8b393532a3b3f74b@suse.de>
Signed-off-by: Javier Martinez Canillas <039000e09e601bba70626bd0fbe59654c9cf8cac@collabora.co.uk>
Signed-off-by: Dmitry Torokhov <6b8646d310837fed93a129ed3c979b90c7f2674f@gmail.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs