android_kernel_oneplus_msm8998/drivers/input
codeworkx 061081b187 tri_state_key: import driver from msm8996
input: tri-state-key: Fix trivial code style issue in IRQ handler

Change-Id: Ie1e9396cf4674586a68dbf606a1d51fbffeaaca4
Signed-off-by: Sultanxda <sultanxda@gmail.com>

input: tri-state-key: Use ffz() instead of find_first_zero_bit()

find_first_zero_bit() is intended for large bitmaps; ffz() is much faster
when only a single word needs to be searched through.

Change-Id: Ib81b742805489947164af96bb8603f6732d64e8b
Suggested-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Sultanxda <sultanxda@gmail.com>

input: tri-state-key: Clean up some code styling

Use a macro to store the number of states, reduce the curr_state member in
the struct to uint8_t (since it only needs to contain 3 bits), and use
find_first_zero_bit() instead of a loop to find the first zero bit.

Change-Id: I35f369dc30186ab95033a4d27b550a07e4dc2dd8
Suggested-by: Joel Porquet <joel@porquet.org>
Signed-off-by: Sultanxda <sultanxda@gmail.com>

input: tri-state-key: Rewrite and optimize

A driver for such a simple device shouldn't be so ugly. Clean it up and
optimize it in the process.

Summary of changes:
-Remove unneeded switch device
-Remove unused/unnecessary struct members
-Remove module references (this driver will always be built in)
-Utilize fixed loops and clever logic to eliminate significant amounts of
 code duplication
-Remove unused pinctrl code
-Use a threaded interrupt handler
-Process interrupts directly in the threaded interrupt handler (which runs
 with realtime priority) rather than a worker
-Read the initial switch state upon init (so userspace gets the correct
 switch state upon boot)
-Refactor code wherever possible to make it cleaner

Note that although the procfs naming scheme is non-standard (i.e.
"keyCode_top" instead of "keycode_top"), the old naming scheme is retained
in order to maintain compatibility with userspace.

Change-Id: Ic2de6ddeb223aa7669d61c186be0b57a15e1488b
Signed-off-by: Sultanxda <sultanxda@gmail.com>
2019-03-10 10:57:09 +01:00
..
fingerprint fpc1020: bring inline with lineage-15.1 2018-12-26 08:21:03 +01:00
gameport
joystick
keyboard Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
misc tri_state_key: import driver from msm8996 2019-03-10 10:57:09 +01:00
mouse Input: elan_i2c - add another ACPI ID for Lenovo Ideapad 330-15AST 2018-08-06 16:24:29 +02:00
serio Input: i8042 - add Lenovo LaVie Z to the i8042 reset list 2018-08-06 16:24:29 +02:00
tablet Input: gtco - fix potential out-of-bound access 2017-11-02 09:40:49 +01:00
touchscreen synaptics S3320: bring inline with lineage-15.1 2018-12-26 08:21:03 +01:00
apm-power.c
evbug.c
evdev.c
ff-core.c
ff-memless.c
input-compat.c
input-compat.h
input-leds.c Input: leds - fix out of bound access 2018-05-16 10:06:48 +02:00
input-mt.c
input-polldev.c
input.c synaptics S3320: bring inline with lineage-15.1 2018-12-26 08:21:03 +01:00
joydev.c
Kconfig Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
keycombo.c
keyreset.c
Makefile Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
matrix-keymap.c
mousedev.c Input: mousedev - fix implicit conversion warning 2018-04-08 11:51:57 +02:00
sparse-keymap.c