Skip to content

Commit

Permalink
samsung-battery: Reduce battery-monitor wakelock timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
neobuddy89 committed Apr 6, 2013
1 parent df030ae commit b343cb4
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions drivers/battery/samsung_battery.c
Expand Up @@ -1781,8 +1781,8 @@ static void battery_monitor_work(struct work_struct *work)
info->prev_battery_health != info->battery_health ||
info->prev_charge_virt_state != info->charge_virt_state ||
info->prev_battery_soc != info->battery_soc) {
pr_info("%s: update wakelock(%d)\n", __func__, 3 * HZ);
wake_lock_timeout(&info->update_wake_lock, 3 * HZ);
pr_info("%s: update wakelock(%d)\n", __func__, HZ);
wake_lock_timeout(&info->update_wake_lock, HZ);
}
info->prev_cable_type = info->cable_type;
info->prev_battery_health = info->battery_health;
Expand All @@ -1793,11 +1793,9 @@ static void battery_monitor_work(struct work_struct *work)
if ((info->lpm_state == true) &&
(info->cable_type == POWER_SUPPLY_TYPE_BATTERY)) {
pr_info("%s: lpm with battery, maybe power off\n", __func__);
wake_lock_timeout(&info->monitor_wake_lock,
msecs_to_jiffies(10000));
wake_lock_timeout(&info->monitor_wake_lock, 3 * HZ);
} else {
wake_lock_timeout(&info->monitor_wake_lock,
msecs_to_jiffies(1000));
wake_lock_timeout(&info->monitor_wake_lock, HZ / 4);
}

#ifdef CONFIG_FAST_BOOT
Expand Down

0 comments on commit b343cb4

Please sign in to comment.