linux-xiaomi-chiron/drivers/input/keyboard
AngeloGioacchino Del Regno 0dbc76cebe input: keyboard: Add Fast GPIO-driven keyboard/keypad matrix driver
This driver is a reimplementation of matrix_keyboard, on which it
is heavily based: the former was made back in 2009 and then
lightly updated in 2012 to add some support for device-tree / OF.

It turns out that this is not enough, nor OF is fully supported,
as the global (or "clustered") interrupt is never probed, nor it
made usage of the GPIOD API which, nowadays, really simplifies
the job - but not only: it also provides means to set GPIO arrays
for controllers that are supporting this.
The latter is very important when dealing with slow GPIOs such as
I2C and/or SPI expanders (and, again, not only); by using the new
APIs everything fits the new systems, from simplifications of the
probe/remove functions to opening possibility of using expanders
to drive key matrices with or without protection diodes.

But then, why wasn't the old matrix_keyboard driver modified
instead of creating a new one?
The problem there is that the old driver is made to support the
old platform_device style and it's currently still being used by
some PXA boards that are not (yet?) ported to device-tree, so it
would be impossible to modernize it for good, which means that to
support GPIOD (which is - really - required for the aforementioned
reasons) and to fully support DT it would be necessary to wrap the
old GPIO API around the new GPIOD one, creating overhead and also
probably unnecessary memory usage, other than a very big driver
which, at least on embedded devices (having limited resources),
would be simply bad. Leaving the fact that I haven't got any old
board so it's impossible for me to analyze and optimize for them.

Since 98% of the users of the old driver are infact platforms that
have been ported to (or are born with) DT, the introduction of a
new driver that's purely made for them seemed to be the best
choice, also because the expectations are (I think) that all of
the old ARM-based boards will be ported to DT anyway, which will
actually deprecate the good old matrix_keyboard driver.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
2022-10-31 01:55:32 +02:00
..
adc-keys.c Input: adc-keys - drop bogus __refdata annotation 2021-09-03 23:49:58 -07:00
adp5520-keys.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 149 2019-05-30 11:25:18 -07:00
adp5588-keys.c Input: adp5588-keys - use new PM macros 2022-08-30 21:16:35 -07:00
adp5589-keys.c Input: adp5589-keys - use the right header 2021-08-30 15:55:18 -07:00
amikbd.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
applespi.c Input: applespi - replace zero-length array with DECLARE_FLEX_ARRAY() helper 2022-09-26 22:02:32 -07:00
applespi.h Input: add Apple SPI keyboard and trackpad driver 2019-07-19 11:58:34 +03:00
applespi_trace.h Input: add Apple SPI keyboard and trackpad driver 2019-07-19 11:58:34 +03:00
atakbd.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
atkbd.c Input: atkbd - switch to using dev_groups for driver-specific attributes 2022-09-03 12:31:18 -07:00
bcm-keypad.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 2) 2022-06-10 14:51:35 +02:00
cap11xx.c Input: cap11xx - add support for cap1206 2021-11-02 17:03:04 -07:00
clps711x-keypad.c Input: clps711x-keypad - get rid of OF_GPIO dependency 2022-08-30 14:20:00 -07:00
cros_ec_keyb.c Input: cros_ec_keyb - handle x86 detachable/convertible Chromebooks 2022-05-27 21:49:37 -07:00
cypress-sf.c Input: cypress-sf - register a callback to disable the regulators 2022-04-08 19:34:46 -07:00
davinci_keyscan.c Input: remove dev_err() usage after platform_get_irq() 2019-08-14 10:49:01 -07:00
dlink-dir685-touchkeys.c Input: dlink-dir685-touchkeys - fix a typo in driver name 2020-04-22 14:15:06 -07:00
ep93xx_keypad.c Input: ep93xx_keypad - add missing linux/input.h include 2022-09-26 08:15:17 -07:00
goldfish_events.c Input: goldfish_events - replace zero-length array with flexible-array member 2020-02-13 17:09:47 -08:00
gpio_fastmatrix.c input: keyboard: Add Fast GPIO-driven keyboard/keypad matrix driver 2022-10-31 01:55:32 +02:00
gpio_keys.c Input: gpio-keys - cancel delayed work only in case of GPIO 2022-05-26 09:56:40 -07:00
gpio_keys_polled.c Input: gpio_keys_polled - replace zero-length array with flexible-array member 2020-02-14 17:19:19 -08:00
hil_kbd.c Input: hil_kbd - fix error return code in hil_dev_connect() 2021-05-24 20:57:04 -07:00
hilkbd.c parisc: Make struct parisc_driver::remove() return void 2021-08-30 10:18:25 +02:00
hpps2atkbd.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
imx_keypad.c Input: imx_keypad - add missing linux/input.h include 2022-09-26 08:15:10 -07:00
imx_sc_key.c Input: imx_sc_key - use devm_add_action_or_reset() to handle all cleanups 2020-05-13 10:34:58 -07:00
ipaq-micro-keys.c Input: use input_device_enabled() 2020-12-02 22:10:33 -08:00
iqs62x-keys.c Input: iqs62x-keys - drop unused device node references 2022-09-24 22:17:43 -07:00
jornada680_kbd.c Input: jornada680_kbd - switch to using polled mode of input devices 2019-10-29 17:13:44 -07:00
jornada720_kbd.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Kconfig input: keyboard: Add Fast GPIO-driven keyboard/keypad matrix driver 2022-10-31 01:55:32 +02:00
lkkbd.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
lm8323.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
lm8333.c Input: lm8333 - add missing linux/input.h include 2022-09-26 08:13:24 -07:00
locomokbd.c ARM: 9049/1: locomo: make locomo bus's remove callback return void 2021-02-01 19:44:30 +00:00
lpc32xx-keys.c Input: use input_device_enabled() 2020-12-02 22:10:33 -08:00
Makefile input: keyboard: Add Fast GPIO-driven keyboard/keypad matrix driver 2022-10-31 01:55:32 +02:00
maple_keyb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 64 2019-05-24 17:36:46 +02:00
matrix_keypad.c Input: matrix_keypad - add missed header inclusion 2022-09-23 11:51:33 -07:00
max7359_keypad.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mcs_touchkey.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
mpr121_touchkey.c Input: mpr121 - make use of the helper function devm_add_action_or_reset() 2021-09-22 21:56:50 -07:00
mt6779-keypad.c Input: mt6779-keypad - add missing linux/input.h include 2022-09-26 08:15:03 -07:00
mtk-pmic-keys.c Input: mtk-pmic-keys - add support for MT6331 PMIC keys 2022-09-13 09:52:14 -07:00
newtonkbd.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
nomadik-ske-keypad.c Input: nomadik-ske-keypad - provide some missing struct member docs 2020-11-08 22:19:53 -08:00
nspire-keypad.c Input: nspire-keypad - enable interrupts only when opened 2021-03-23 10:55:10 -07:00
omap-keypad.c input: omap: void using mach/*.h headers 2022-04-21 15:01:42 +02:00
omap4-keypad.c Input: omap4-keypad - switch to using pm_runtime_resume_and_get() 2022-05-27 21:38:32 -07:00
opencores-kbd.c Input: remove dev_err() usage after platform_get_irq() 2019-08-14 10:49:01 -07:00
pinephone-keyboard.c Input: pinephone-keyboard - support the proxied I2C bus 2022-10-09 22:26:52 -07:00
pmic8xxx-keypad.c Input: use input_device_enabled() 2020-12-02 22:10:33 -08:00
pxa27x_keypad.c Input: use input_device_enabled() 2020-12-02 22:10:33 -08:00
pxa930_rotary.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
qt1050.c Input: qt1050 - add Microchip AT42QT1050 support 2019-05-07 14:12:43 -07:00
qt1070.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
qt2160.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
samsung-keypad.c Input: use input_device_enabled() 2020-12-02 22:10:33 -08:00
sh_keysc.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
snvs_pwrkey.c Input: snvs_pwrkey - fix SNVS_HPVIDR1 register address 2022-09-27 07:18:30 -07:00
spear-keyboard.c Input: use input_device_enabled() 2020-12-02 22:10:33 -08:00
st-keyscan.c Input: st-keyscan - add missing linux/input.h and linux/of.h includes 2022-09-26 08:14:29 -07:00
stmpe-keypad.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 464 2019-06-19 17:09:10 +02:00
stowaway.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
sun4i-lradc-keys.c Input: sun4i-lradc-keys - add support for R329 and D1 2022-05-05 10:23:49 -07:00
sunkbd.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
tc3589x-keypad.c Input: tc3589x-keypad - use correct struct names in comment 2022-08-11 16:14:30 -07:00
tca6416-keypad.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
tca8418_keypad.c Input: tca8418 - remove set but not used variable 'max_keys' 2019-05-27 19:01:42 -07:00
tegra-kbc.c Input: move to use request_irq by IRQF_NO_AUTOEN flag 2021-03-25 15:27:56 -07:00
tm2-touchkey.c Input: tm2-touchkey - allow changing keycodes from userspace 2021-10-15 20:26:30 -07:00
twl4030_keypad.c Input: twl4030_keypad - fix handling of platform_get_irq() error 2020-09-16 10:42:15 -07:00
xtkbd.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00