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

Commit 514e483a authored by Manaf Meethalavalappu Pallikunhi's avatar Manaf Meethalavalappu Pallikunhi Committed by Gerrit - the friendly Code Review server
Browse files

power: bcl_peripheral: Enable BCL LMH algorithm only once



Currently BCL LMH algorithm enable request goes for every time BCL
threshold enablement. It needs to be enabled only once. So Enable
BCL LMH algorithm only once.

Change-Id: I94c7326b7730830f71b71c92df21a589ddd2347b
Signed-off-by: default avatarManaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
parent 1e42f4cc
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
 * Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -482,8 +482,10 @@ static int bcl_access_monitor_enable(bool enable)
	if (enable == bcl_perph->enabled)
		goto access_exit;

	if ((bcl_perph_version == BCL_PMI8998) && !hw_enabled && enable)
	if ((bcl_perph_version == BCL_PMI8998) && !hw_enabled && enable) {
		bcl_lmh_dcvs_enable();
		hw_enabled = true;
	}

	for (; i < BCL_PARAM_MAX; i++) {
		perph_data = &bcl_perph->param[i];