local_irq_restore(flags);
wake_unlock(&bi->monitor_wake_lock);
- schedule_delayed_work(&bi->monitor_work, bi->update_time*HZ);
+ if (!bi->device_suspend)
+ schedule_delayed_work(&bi->monitor_work, bi->update_time*HZ);
}
static enum power_supply_property rt5025_battery_props[] = {
//rt5025_battery_parameter_backup(bi);
//rt5025_channel_cc(bi, false);
- cancel_delayed_work_sync(&bi->monitor_work);
//rt5025_update(bi);
bi->device_suspend = true;
+ cancel_delayed_work_sync(&bi->monitor_work);
/* prevent suspend before starting the alarm */
//bi->update_time = SUSPEND_POLL;
rt5025_alert_setting(bi,MAXVOLT, false);
cancel_delayed_work(&bi->monitor_work);
wake_lock_destroy(&bi->monitor_wake_lock);
kfree(bi);
+ RTINFO("\n");
return 0;
}
RTINFO("bi->cal_fcc=%d\n", bi->cal_fcc);
}
rt5025_battery_parameter_backup(bi);
+ RTINFO("\n");
}
static struct platform_driver rt5025_battery_driver =
rt5025_notify_charging_cable(swji, swji->cur_cable);
}
- schedule_delayed_work(&swji->thermal_reg_work, 5*HZ);
+ if (!swji->suspend)
+ schedule_delayed_work(&swji->thermal_reg_work, 5*HZ);
RTINFO("%s --", __func__);
}
swji->chip->jeita_info = NULL;
kfree(swji);
+ RTINFO("\n");
return 0;
}
static int rt5025_swjeita_suspend(struct platform_device *pdev, pm_message_t state)
{
struct rt5025_swjeita_info *swji = platform_get_drvdata(pdev);
- cancel_delayed_work_sync(&swji->thermal_reg_work);
swji->cur_therm_region = swji->dec_current = 0;
rt5025_notify_charging_cable(swji, swji->cur_cable);
swji->suspend = 1;
+ cancel_delayed_work_sync(&swji->thermal_reg_work);
RTINFO("\n");
return 0;
}