mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
power: qpnp-smbcharger-mmi: Disable Suspend Wakes
Add a module parameter to control whether we allow the suspend wakeup alarm to be configured in the heartbeat. This will allow testing of the feature in case it is needed. Change-Id: I3f3d0928289362e597c7cc3f20dbe529df4f62cd Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com> Reviewed-on: https://gerrit.mot.com/1275055 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Cesar Augusto Marcelino dos Santos <cmsantos@motorola.com> Reviewed-by: Ryan Lattrel <ryanl@motorola.com> Reviewed-by: Kenneth Kessler <kennykessler@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
b878a5f4e1
commit
a788daec12
1 changed files with 6 additions and 4 deletions
|
|
@ -2069,8 +2069,10 @@ void update_charging_limit_modes(struct smb_mmi_charger *chip, int batt_soc)
|
|||
|
||||
static int factory_kill_disable;
|
||||
module_param(factory_kill_disable, int, 0644);
|
||||
static int suspend_wakeups;
|
||||
module_param(suspend_wakeups, int, 0644);
|
||||
#define TWO_VOLT 2000000
|
||||
#define SMBCHG_HEARTBEAT_INTERVAL_NS 70000000000
|
||||
#define SMBCHG_HEARTBEAT_INTRVAL_NS 70000000000
|
||||
#define MONOTONIC_SOC 2 /* 2 percent */
|
||||
static void mmi_heartbeat_work(struct work_struct *work)
|
||||
{
|
||||
|
|
@ -2287,9 +2289,9 @@ static void mmi_heartbeat_work(struct work_struct *work)
|
|||
sch_hb:
|
||||
schedule_delayed_work(&chip->heartbeat_work,
|
||||
msecs_to_jiffies(hb_resch_time));
|
||||
|
||||
alarm_start_relative(&chip->heartbeat_alarm,
|
||||
ns_to_ktime(SMBCHG_HEARTBEAT_INTERVAL_NS));
|
||||
if (suspend_wakeups)
|
||||
alarm_start_relative(&chip->heartbeat_alarm,
|
||||
ns_to_ktime(SMBCHG_HEARTBEAT_INTRVAL_NS));
|
||||
|
||||
if (!chg_stat.charger_present)
|
||||
smb_mmi_awake_vote(chip, false);
|
||||
|
|
|
|||
Loading…
Reference in a new issue