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

Commit a70e526f authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar
Browse files

power: qpnp-fg: dont reschedule upon property read



The current code cancels and reschedules the work to update FG
properties. This could lead to delays if there is a constant
read of properties.

Remove that cancel and reschedule, which guarantees that the properties
could be at most 30 seconds old.

Change-Id: I836155ac58b350e72a919767331732a493191787
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent c5564588
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -753,11 +753,6 @@ static int get_sram_prop_now(struct fg_chip *chip, unsigned int type)
			fg_data[type].address, fg_data[type].offset,
			fg_data[type].value);

	cancel_delayed_work_sync(
		&chip->update_sram_data);
	schedule_delayed_work(
		&chip->update_sram_data, msecs_to_jiffies(SRAM_DATA_DELAY_MS));

	if (type == FG_DATA_BATT_ID)
		return get_batt_id(fg_data[type].value,
				fg_data[FG_DATA_BATT_ID_INFO].value);