Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c800464 authored by Kavya Nunna's avatar Kavya Nunna
Browse files

power: battery: Remove wakelock for parallel



Currently, wakelock is present to fix i2c access
failures when i2c bus is in suspend mode and smb1355 is
out of suspend and other drivers try to get the
power supply properties. Remove the wakelock as the
i2c failures are handled in smb1355 driver.

Change-Id: Ic6742eefcfd214f13c0d9bf07f5ea61e28d38d66
Signed-off-by: default avatarKavya Nunna <knunna@codeaurora.org>
parent 169b4ee8
Loading
Loading
Loading
Loading
+0 −19
Original line number Diff line number Diff line
@@ -66,7 +66,6 @@ struct pl_data {
	struct delayed_work	status_change_work;
	struct work_struct	pl_disable_forever_work;
	struct work_struct	pl_taper_work;
	struct delayed_work	pl_awake_work;
	struct delayed_work	fcc_stepper_work;
	bool			taper_work_running;
	struct power_supply	*main_psy;
@@ -1062,14 +1061,6 @@ static void pl_disable_forever_work(struct work_struct *work)
		vote(chip->hvdcp_hw_inov_dis_votable, PL_VOTER, false, 0);
}

static void pl_awake_work(struct work_struct *work)
{
	struct pl_data *chip = container_of(work,
			struct pl_data, pl_awake_work.work);

	vote(chip->pl_awake_votable, PL_VOTER, false, 0);
}

static bool is_batt_available(struct pl_data *chip)
{
	if (!chip->batt_psy)
@@ -1130,10 +1121,6 @@ static int pl_disable_vote_callback(struct votable *votable,
	total_fcc_ua = get_effective_result_locked(chip->fcc_votable);

	if (chip->pl_mode != POWER_SUPPLY_PL_NONE && !pl_disable) {
		/* keep system awake to talk to slave charger through i2c */
		cancel_delayed_work_sync(&chip->pl_awake_work);
		vote(chip->pl_awake_votable, PL_VOTER, true, 0);

		rc = validate_parallel_icl(chip, &disable);
		if (rc < 0)
			return rc;
@@ -1288,10 +1275,6 @@ static int pl_disable_vote_callback(struct votable *votable,
		}

		rerun_election(chip->fv_votable);

		cancel_delayed_work_sync(&chip->pl_awake_work);
		schedule_delayed_work(&chip->pl_awake_work,
						msecs_to_jiffies(5000));
	}

	/* notify parallel state change */
@@ -1787,7 +1770,6 @@ int qcom_batt_init(int smb_version)
	INIT_DELAYED_WORK(&chip->status_change_work, status_change_work);
	INIT_WORK(&chip->pl_taper_work, pl_taper_work);
	INIT_WORK(&chip->pl_disable_forever_work, pl_disable_forever_work);
	INIT_DELAYED_WORK(&chip->pl_awake_work, pl_awake_work);
	INIT_DELAYED_WORK(&chip->fcc_stepper_work, fcc_stepper_work);

	rc = pl_register_notifier(chip);
@@ -1845,7 +1827,6 @@ void qcom_batt_deinit(void)
	cancel_delayed_work_sync(&chip->status_change_work);
	cancel_work_sync(&chip->pl_taper_work);
	cancel_work_sync(&chip->pl_disable_forever_work);
	cancel_delayed_work_sync(&chip->pl_awake_work);
	cancel_delayed_work_sync(&chip->fcc_stepper_work);

	power_supply_unreg_notifier(&chip->nb);