From 01d541eec7806835bf0f92e11810c746bf5b9e00 Mon Sep 17 00:00:00 2001 From: Alex Narita Date: Fri, 7 Jun 2019 19:28:27 -0300 Subject: [PATCH] Turn off ToF sensor force device on Turn off STMVL53L1 ToF sensor force_device_on and let the ToF power supllies (VDD) to disable during power down, otherwise ToF VDD will always On. Change-Id: I17363f88921868a05ef833ce63c94cff0c7b6ecb Reviewed-on: https://gerrit.mot.com/1368523 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Sumit Jamadar Reviewed-by: Rav(CR) Vembu Submit-Approved: Jira Key --- drivers/input/misc/vl53L1/stmvl53l1_module.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/input/misc/vl53L1/stmvl53l1_module.c b/drivers/input/misc/vl53L1/stmvl53l1_module.c index 6a64d37f44f3..9027f65093ac 100644 --- a/drivers/input/misc/vl53L1/stmvl53l1_module.c +++ b/drivers/input/misc/vl53L1/stmvl53l1_module.c @@ -179,7 +179,10 @@ static long stmvl53l1_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg); #endif -static bool force_device_on_en_default = true; +// Turn off force_device_on flag and let ToF power supplies power down when ToF +// sensor ToF sensor powers down. +// If flag is set to true then VDD regulator will never turn down. +static bool force_device_on_en_default = false; module_param(force_device_on_en_default, bool, 0444); MODULE_PARM_DESC(force_device_on_en_default,