From f1c63607d6afed2f722f73a2937ea23508f65fa5 Mon Sep 17 00:00:00 2001 From: Erfan Abdi Date: Tue, 30 Nov 2021 23:49:32 +0330 Subject: [PATCH] techpack: camera: Add wait for AF regulator hw disabling on K11 Change-Id: Ia1d68f57f040ac7f7c2e5fb82aa6794431de7802 --- techpack/camera/drivers/cam_utils/cam_soc_util.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/techpack/camera/drivers/cam_utils/cam_soc_util.c b/techpack/camera/drivers/cam_utils/cam_soc_util.c index c7cb0524f2de..98eff57d5003 100644 --- a/techpack/camera/drivers/cam_utils/cam_soc_util.c +++ b/techpack/camera/drivers/cam_utils/cam_soc_util.c @@ -9,6 +9,7 @@ #include #include #include +#include #include "cam_soc_util.h" #include "cam_debug_util.h" #include "cam_cx_ipeak.h" @@ -1446,6 +1447,11 @@ int cam_soc_util_regulator_disable(struct regulator *rgltr, else if (rgltr_delay_ms) usleep_range(rgltr_delay_ms * 1000, (rgltr_delay_ms * 1000) + 1000); + else if (get_hw_version_platform() == HARDWARE_PROJECT_K11) { + CAM_DBG(CAM_UTIL, "need wait 1ms for AF regulator hardware disabling"); + if (!strcmp(rgltr_name,"cam_vaf")) //just for L11C OCP(K11) + usleep_range(1000,2000); + } if (regulator_count_voltages(rgltr) > 0) { regulator_set_load(rgltr, 0);