]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
Input: goodix - refactor reset handling
authorHans de Goede <hdegoede@redhat.com>
Tue, 21 Sep 2021 04:08:26 +0000 (21:08 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 16 Sep 2022 08:52:01 +0000 (10:52 +0200)
commita8cfdcb3aa67d5e2c859129509b058d46ec663e8
tree56c7afa52c4bcd397b997bb76fdc4aa45fb537ee
parentfc13e7c7db17ae057e4094402514d7d46258ced2
Input: goodix - refactor reset handling

BugLink: https://bugs.launchpad.net/bugs/1987451
[ Upstream commit 209bda4741f68f102cf2f272227bfc938e387b51 ]

Refactor reset handling a bit, change the main reset handler
into a new goodix_reset_no_int_sync() helper and add a
goodix_reset() wrapper which calls goodix_int_sync()
separately.

Also push the dev_err() call on reset failure into the
goodix_reset_no_int_sync() and goodix_int_sync() functions,
so that we don't need to have separate dev_err() calls in
all their callers.

This is a preparation patch for adding support for controllers
without flash, which need to have their firmware uploaded and
need some other special handling too.

Reviewed-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210920150643.155872-4-hdegoede@redhat.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/input/touchscreen/goodix.c
drivers/input/touchscreen/goodix.h