diff --git a/drivers/power/pm8921-bms.c b/drivers/power/pm8921-bms.c index 47620594f5e..bd6af0cdd3c 100644 --- a/drivers/power/pm8921-bms.c +++ b/drivers/power/pm8921-bms.c @@ -135,8 +135,6 @@ struct pm8921_bms_chip { int enable_fcc_learning; int shutdown_soc; int shutdown_iavg_ua; - int shutdown_soc_timer_expired; - struct delayed_work shutdown_soc_work; struct delayed_work calculate_soc_delayed_work; struct timespec t_soc_queried; int shutdown_soc_valid_limit; @@ -1902,17 +1900,6 @@ static int scale_soc_while_chg(struct pm8921_bms_chip *chip, return scaled_soc; } -#define SHOW_SHUTDOWN_SOC_MS 30000 -static void shutdown_soc_work(struct work_struct *work) -{ - struct pm8921_bms_chip *chip = container_of(work, - struct pm8921_bms_chip, shutdown_soc_work.work); - - pr_debug("not forcing shutdown soc anymore\n"); - /* it has been 30 seconds since init, no need to show shutdown soc */ - chip->shutdown_soc_timer_expired = 1; -} - static bool is_shutdown_soc_within_limits(struct pm8921_bms_chip *chip, int soc) { if (shutdown_soc_invalid) { @@ -2179,18 +2166,6 @@ static int report_state_of_charge(struct pm8921_bms_chip *chip) if (last_soc != -EINVAL && last_soc < soc && soc != 100) soc = scale_soc_while_chg(chip, delta_time_us, soc, last_soc); - if (chip->shutdown_soc != 0 - && !shutdown_soc_invalid - && !chip->shutdown_soc_timer_expired) { - /* - * force shutdown soc if it is valid and the shutdown soc show - * timer has not expired - */ - soc = chip->shutdown_soc; - - pr_debug("Forcing SHUTDOWN_SOC = %d\n", soc); - } - last_soc = soc; backup_soc_and_iavg(chip, batt_temp, last_soc); pr_debug("Reported SOC = %d\n", last_soc); @@ -3268,11 +3243,6 @@ static int __devinit pm8921_bms_probe(struct platform_device *pdev) pm8921_bms_get_percent_charge(), vbatt, chip->last_ocv_uv); - INIT_DELAYED_WORK(&chip->shutdown_soc_work, shutdown_soc_work); - schedule_delayed_work(&chip->shutdown_soc_work, - round_jiffies_relative(msecs_to_jiffies - (SHOW_SHUTDOWN_SOC_MS))); - return 0; free_irqs: