Loading drivers/power/supply/qcom/fg-core.h +0 −1 Original line number Diff line number Diff line Loading @@ -417,7 +417,6 @@ struct fg_dev { int last_msoc; int last_recharge_volt_mv; bool profile_available; bool profile_loaded; enum prof_load_status profile_load_status; bool battery_missing; bool fg_restarting; Loading drivers/power/supply/qcom/fg-util.c +17 −10 Original line number Diff line number Diff line Loading @@ -886,19 +886,26 @@ int fg_get_msoc(struct fg_dev *fg, int *msoc) #define SKIP_BATT_TYPE "Skipped loading battery" const char *fg_get_battery_type(struct fg_dev *fg) { if (fg->battery_missing || fg->profile_load_status == PROFILE_MISSING) switch (fg->profile_load_status) { case PROFILE_MISSING: return DEFAULT_BATT_TYPE; case PROFILE_SKIPPED: return SKIP_BATT_TYPE; case PROFILE_LOADED: if (fg->bp.batt_type_str) return fg->bp.batt_type_str; break; case PROFILE_NOT_LOADED: return MISSING_BATT_TYPE; default: break; }; if (fg->profile_load_status == PROFILE_SKIPPED) return SKIP_BATT_TYPE; if (fg->battery_missing) return MISSING_BATT_TYPE; if (fg->bp.batt_type_str) { if (fg->profile_loaded) return fg->bp.batt_type_str; else if (fg->profile_available) if (fg->profile_available) return LOADING_BATT_TYPE; } return DEFAULT_BATT_TYPE; } Loading drivers/power/supply/qcom/qpnp-fg-gen3.c +0 −4 Original line number Diff line number Diff line Loading @@ -2560,9 +2560,6 @@ static void profile_load_work(struct work_struct *work) batt_psy_initialized(fg); fg_notify_charger(fg); if (fg->profile_load_status == PROFILE_LOADED) fg->profile_loaded = true; fg_dbg(fg, FG_STATUS, "profile loaded successfully"); out: fg->soc_reporting_ready = true; Loading Loading @@ -3927,7 +3924,6 @@ static irqreturn_t fg_batt_missing_irq_handler(int irq, void *data) if (fg->battery_missing) { fg->profile_available = false; fg->profile_loaded = false; fg->profile_load_status = PROFILE_NOT_LOADED; fg->soc_reporting_ready = false; fg->batt_id_ohms = -EINVAL; Loading drivers/power/supply/qcom/qpnp-fg-gen4.c +0 −4 Original line number Diff line number Diff line Loading @@ -1031,9 +1031,6 @@ static void profile_load_work(struct work_struct *work) batt_psy_initialized(fg); fg_notify_charger(fg); if (fg->profile_load_status == PROFILE_LOADED) fg->profile_loaded = true; fg_dbg(fg, FG_STATUS, "profile loaded successfully"); out: fg->soc_reporting_ready = true; Loading Loading @@ -1284,7 +1281,6 @@ static irqreturn_t fg_batt_missing_irq_handler(int irq, void *data) if (fg->battery_missing) { fg->profile_available = false; fg->profile_loaded = false; fg->profile_load_status = PROFILE_NOT_LOADED; fg->soc_reporting_ready = false; fg->batt_id_ohms = -EINVAL; Loading Loading
drivers/power/supply/qcom/fg-core.h +0 −1 Original line number Diff line number Diff line Loading @@ -417,7 +417,6 @@ struct fg_dev { int last_msoc; int last_recharge_volt_mv; bool profile_available; bool profile_loaded; enum prof_load_status profile_load_status; bool battery_missing; bool fg_restarting; Loading
drivers/power/supply/qcom/fg-util.c +17 −10 Original line number Diff line number Diff line Loading @@ -886,19 +886,26 @@ int fg_get_msoc(struct fg_dev *fg, int *msoc) #define SKIP_BATT_TYPE "Skipped loading battery" const char *fg_get_battery_type(struct fg_dev *fg) { if (fg->battery_missing || fg->profile_load_status == PROFILE_MISSING) switch (fg->profile_load_status) { case PROFILE_MISSING: return DEFAULT_BATT_TYPE; case PROFILE_SKIPPED: return SKIP_BATT_TYPE; case PROFILE_LOADED: if (fg->bp.batt_type_str) return fg->bp.batt_type_str; break; case PROFILE_NOT_LOADED: return MISSING_BATT_TYPE; default: break; }; if (fg->profile_load_status == PROFILE_SKIPPED) return SKIP_BATT_TYPE; if (fg->battery_missing) return MISSING_BATT_TYPE; if (fg->bp.batt_type_str) { if (fg->profile_loaded) return fg->bp.batt_type_str; else if (fg->profile_available) if (fg->profile_available) return LOADING_BATT_TYPE; } return DEFAULT_BATT_TYPE; } Loading
drivers/power/supply/qcom/qpnp-fg-gen3.c +0 −4 Original line number Diff line number Diff line Loading @@ -2560,9 +2560,6 @@ static void profile_load_work(struct work_struct *work) batt_psy_initialized(fg); fg_notify_charger(fg); if (fg->profile_load_status == PROFILE_LOADED) fg->profile_loaded = true; fg_dbg(fg, FG_STATUS, "profile loaded successfully"); out: fg->soc_reporting_ready = true; Loading Loading @@ -3927,7 +3924,6 @@ static irqreturn_t fg_batt_missing_irq_handler(int irq, void *data) if (fg->battery_missing) { fg->profile_available = false; fg->profile_loaded = false; fg->profile_load_status = PROFILE_NOT_LOADED; fg->soc_reporting_ready = false; fg->batt_id_ohms = -EINVAL; Loading
drivers/power/supply/qcom/qpnp-fg-gen4.c +0 −4 Original line number Diff line number Diff line Loading @@ -1031,9 +1031,6 @@ static void profile_load_work(struct work_struct *work) batt_psy_initialized(fg); fg_notify_charger(fg); if (fg->profile_load_status == PROFILE_LOADED) fg->profile_loaded = true; fg_dbg(fg, FG_STATUS, "profile loaded successfully"); out: fg->soc_reporting_ready = true; Loading Loading @@ -1284,7 +1281,6 @@ static irqreturn_t fg_batt_missing_irq_handler(int irq, void *data) if (fg->battery_missing) { fg->profile_available = false; fg->profile_loaded = false; fg->profile_load_status = PROFILE_NOT_LOADED; fg->soc_reporting_ready = false; fg->batt_id_ohms = -EINVAL; Loading