From 0145dd0928e4309c64ea347921d8fe97cccc6ca3 Mon Sep 17 00:00:00 2001 From: Ryan Lattrel Date: Mon, 27 Jan 2020 11:25:45 -0600 Subject: [PATCH] p938x_charger: Wait for LDO to report charging There are too many cases of a wireless charger showing as charging when it is not. Only show when LDO is turned on even if it sacrifices some detection speed. Change-Id: I9bd1cb03428f4be4fcd2847b50fd7f0e9122154e Signed-off-by: Ryan Lattrel Reviewed-on: https://gerrit.mot.com/1488807 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Ling Jin Submit-Approved: Jira Key --- drivers/power/p938x_charger/p938x_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/p938x_charger/p938x_charger.c b/drivers/power/p938x_charger/p938x_charger.c index f6038fab1624..f6a23b65573f 100644 --- a/drivers/power/p938x_charger/p938x_charger.c +++ b/drivers/power/p938x_charger/p938x_charger.c @@ -344,7 +344,7 @@ static inline int p938x_is_chip_on(struct p938x_charger *chip) static inline int p938x_is_tx_connected(struct p938x_charger *chip) { - return (p938x_is_chip_on(chip) && (chip->stat & ST_VRECT_ON)); + return (p938x_is_chip_on(chip) && (chip->stat & ST_VOUT_ON)); } static inline int p938x_is_ldo_on(struct p938x_charger *chip)