input: fingerprint: fpc_tee: Disable regulator on disable

Idea from Mi 11 Lite 5G MIUI V12.5.6.0.RKIMIXM

Change-Id: I92dd9e31038d20cea1b867137b355ec937f67a64
This commit is contained in:
Arian 2022-01-09 23:58:52 +01:00 committed by Giovanni Ricca
parent a009784375
commit b6bfbde3cd
No known key found for this signature in database

View File

@ -625,7 +625,13 @@ static int device_prepare(struct fpc1020_data *fpc1020, bool enable)
(void)select_pin_ctl(fpc1020, "fpc1020_reset_reset"); (void)select_pin_ctl(fpc1020, "fpc1020_reset_reset");
usleep_range(PWR_ON_SLEEP_MIN_US, PWR_ON_SLEEP_MAX_US); usleep_range(PWR_ON_SLEEP_MIN_US, PWR_ON_SLEEP_MAX_US);
#ifndef CONFIG_FINGERPRINT_FP_VREG_CONTROL #ifdef CONFIG_FINGERPRINT_FP_VREG_CONTROL
rc = regulator_disable(vreg);
if (rc) {
dev_dbg(dev, "error disabling fp_vdd_vreg!\n");
goto exit;
}
#else
rc = vreg_setup(fpc1020, "vdd_ana", false); rc = vreg_setup(fpc1020, "vdd_ana", false);
if (rc) { if (rc) {
dev_dbg(dev, "fpc vreg power off failed. \n"); dev_dbg(dev, "fpc vreg power off failed. \n");