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

Commit 052bfe12 authored by Arun Kumar Neelakantam's avatar Arun Kumar Neelakantam Committed by Matt Wagantall
Browse files

soc: qcom: sleepstate: Send interrupt on state update



SMP2P interrupt is masked to avoid waking up the remote core on
modifying the sleep state bit, but the remote side cannot always
poll for the awake status.

Trigger the SMP2P interrupt to notify the remote core about item update.

Change-Id: I898695558e25d2c0a753f0811a5ea5f30e5deedf
Signed-off-by: default avatarArun Kumar Neelakantam <aneela@codeaurora.org>
parent d91fb219
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2015, 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
@@ -34,13 +34,11 @@ static int sleepstate_pm_notifier(struct notifier_block *nb,
{
	switch (event) {
	case PM_SUSPEND_PREPARE:
		gpio_set_value(slst_gpio_base_id + PROC_AWAKE_ID,
						SMP2P_GPIO_NO_INT | 0);
		gpio_set_value(slst_gpio_base_id + PROC_AWAKE_ID, 0);
		break;

	case PM_POST_SUSPEND:
		gpio_set_value(slst_gpio_base_id + PROC_AWAKE_ID,
						SMP2P_GPIO_NO_INT | 1);
		gpio_set_value(slst_gpio_base_id + PROC_AWAKE_ID, 1);
		break;
	}
	return NOTIFY_DONE;
@@ -65,8 +63,7 @@ static int smp2p_sleepstate_probe(struct platform_device *pdev)
	}


	gpio_set_value(slst_gpio_base_id + PROC_AWAKE_ID,
					SMP2P_GPIO_NO_INT | 1);
	gpio_set_value(slst_gpio_base_id + PROC_AWAKE_ID, 1);

	ret = register_pm_notifier(&sleepstate_pm_nb);
	if (ret)