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

Commit d46d6c66 authored by Srinivasarao P's avatar Srinivasarao P Committed by Gerrit - the friendly Code Review server
Browse files

power: reset: Do hard reset when user reboots from UI



Reboot initiated by user from UI should be hard reset.
For UI reboots, userspace passes 'userrequested' as argument along
with reboot command so use this info to do hard reset.

Change-Id: I6503ea8b12efed2af62ee2269043ef4dc4bebfbf
Signed-off-by: default avatarSrinivasarao P <spathi@codeaurora.org>
parent 7c230230
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-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
@@ -287,7 +287,8 @@ static void msm_restart_prepare(const char *cmd)
			need_warm_reset = true;
	} else {
		need_warm_reset = (get_dload_mode() ||
				(cmd != NULL && cmd[0] != '\0'));
				((cmd != NULL && cmd[0] != '\0') &&
				strcmp(cmd, "userrequested")));
	}

	/* Hard reset the PMIC unless memory contents must be maintained. */