]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Input: tsc2004/5 - fix handling of VIO power supply
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 11 Jul 2024 17:27:12 +0000 (10:27 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 5 Aug 2024 01:10:40 +0000 (18:10 -0700)
commitd95f0c4e5b5350c1b0ba0280004449cba79cb2ad
tree07c316279d70200923dccd9211440e51434da154
parent8bd2aa8529aca1f39bc2bfac4f68adc47c6bd1d7
Input: tsc2004/5 - fix handling of VIO power supply

The chip needs to be powered up before calling tsc200x_stop_scan() which
communicates with it; move the call to enable the regulator earlier in
tsc200x_probe().

At the same time switch to using devm_regulator_get_enable() to simplify
error handling. This also makes sure that regulator is not shut off too
early when unbinding the driver.

Link: https://lore.kernel.org/r/20240711172719.1248373-1-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/tsc2004.c
drivers/input/touchscreen/tsc2005.c
drivers/input/touchscreen/tsc200x-core.c
drivers/input/touchscreen/tsc200x-core.h