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

Commit f91fe2d5 authored by Kiran Gunda's avatar Kiran Gunda Committed by Gerrit - the friendly Code Review server
Browse files

input: qpnp-power-on: Fix ship-mode enable logic



Make the ship-mode enable configuration independent of the
'qcom,secondary-pon-reset' configuration.

Change-Id: Iace5b2ebd99f2e71bd5e36089b3cf14a765e4791
Signed-off-by: default avatarKiran Gunda <kgunda@codeaurora.org>
parent 59a6fd58
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/debugfs.h>
@@ -682,6 +682,8 @@ int qpnp_pon_system_pwr_off(enum pon_power_off_type type)
		}
	}

out:
	spin_unlock_irqrestore(&spon_list_slock, flags);
	/* Set ship mode here if it has been requested */
	if (!!pon_ship_mode_en) {
		batt_psy = power_supply_get_by_name("battery");
@@ -694,8 +696,6 @@ int qpnp_pon_system_pwr_off(enum pon_power_off_type type)
				dev_err(sys_reset_dev->dev, "Failed to set ship mode\n");
		}
	}
out:
	spin_unlock_irqrestore(&spon_list_slock, flags);

	return rc;
}