- struct jz_battery_info *bat_info = container_of(work,struct jz_battery_info, bat_work.work);
-
- jz_bat_update(&bat_info->bat);
- queue_delayed_work(bat_info->monitor_wqueue,
- &bat_info->bat_work, interval);
-}
-
-#ifdef CONFIG_PM
-static int jz_bat_suspend(struct platform_device *pdev, pm_message_t state)
-{
- struct jz_battery_info *bat_info = platform_get_drvdata(pdev);
-
- bat_info->bat_status = POWER_SUPPLY_STATUS_UNKNOWN;
-
- return 0;
-}
-
-static int jz_bat_resume(struct platform_device *pdev)
-{
- struct jz_battery_info *bat_info = platform_get_drvdata(pdev);
-
- bat_info->bat_status = POWER_SUPPLY_STATUS_UNKNOWN;
-
- cancel_delayed_work(&bat_info->bat_work);
- queue_delayed_work(bat_info->monitor_wqueue, &bat_info->bat_work, HZ/10);