Skip to content

Commit 8b5ee4b

Browse files
nichcreamzeelog
authored andcommitted
power: qpnp-smbcharger: Hide charge counter
Some devices have a bug where querying the charge counter during deep sleep takes an excessively long amount of time. BatteryService looks up this prop during deep sleep, resulting in a very slow wakeup on these devices. Mido is affected with this bug. Add a filter to hide the charge counter, so BatteryService does not attempt to read the prop. It is unknown as to whether this is a firmware or a hardware issue. Change-Id: I4a4034090c165b795ddbbd1994b79afc61ce8127
1 parent 9d1786d commit 8b5ee4b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

drivers/power/qpnp-smbcharger.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,11 @@ enum wake_reason {
417417
#define HVDCP_OTG_VOTER "HVDCP_OTG_VOTER"
418418
#define HVDCP_PULSING_VOTER "HVDCP_PULSING_VOTER"
419419

420+
/* fg cc workaround */
421+
#if defined(CONFIG_MACH_XIAOMI_MIDO)
422+
#define NO_CHARGE_COUNTER
423+
#endif
424+
420425
static int smbchg_debug_mask;
421426
module_param_named(
422427
debug_mask, smbchg_debug_mask, int, S_IRUSR | S_IWUSR
@@ -6199,7 +6204,9 @@ static enum power_supply_property smbchg_battery_properties[] = {
61996204
POWER_SUPPLY_PROP_FLASH_ACTIVE,
62006205
POWER_SUPPLY_PROP_FLASH_TRIGGER,
62016206
POWER_SUPPLY_PROP_DP_DM,
6207+
#ifndef NO_CHARGE_COUNTER
62026208
POWER_SUPPLY_PROP_CHARGE_COUNTER,
6209+
#endif
62036210
POWER_SUPPLY_PROP_INPUT_CURRENT_LIMITED,
62046211
POWER_SUPPLY_PROP_RERUN_AICL,
62056212
POWER_SUPPLY_PROP_RESTRICTED_CHARGING,

0 commit comments

Comments
 (0)