]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
Input: mtk-pmic-keys - move long press debounce mask to mtk_pmic_regs
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tue, 31 May 2022 21:26:34 +0000 (14:26 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 1 Jun 2022 04:03:45 +0000 (21:03 -0700)
commit69cf890d8b283c8d3a77d28dbd3024f58ae236a9
treebf7e78d3cde5b6c314ba28bdfe84f7a2f526cd8c
parentb581acb49aec5c3b0af9ab1c537fb73481b79069
Input: mtk-pmic-keys - move long press debounce mask to mtk_pmic_regs

As the second and last step of preparation to add support for more
PMICs in this driver, move the long press debounce mask to struct
mtk_pmic_regs and use that in mtk_pmic_keys_lp_reset_setup() instead
of directly using the definition.

While at it, remove the definition for MTK_PMIC_RST_DU_SHIFT as we
are able to calculate it dynamically and spares us some unnecessary
new definitions around for future per-PMIC variations of RST_DU_MASK.

Lastly, it was necessary to change the function signature of
mtk_pmic_keys_lp_reset_setup() to now pass a pointer to the main
mtk_pmic_regs structure, since that's where the reset debounce
mask now resides.

This commit brings no functional changes.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20220524093505.85438-3-angelogioacchino.delregno@collabora.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/mtk-pmic-keys.c