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

Commit 7be01eb5 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "soc: qcom: subsys_notif: Add support for auth_and_reset notifications"

parents 7aa51604 32c2d8c2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1121,6 +1121,7 @@ int pil_boot(struct pil_desc *desc)
	}

	trace_pil_event("before_auth_reset", desc);
	notify_before_auth_and_reset(desc->dev);
	ret = desc->ops->auth_and_reset(desc);
	if (ret) {
		pil_err(desc, "Failed to bring out of reset(rc:%d)\n", ret);
+11 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2011-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-2019, The Linux Foundation. All rights reserved.
 */

#define pr_fmt(fmt) "subsys-restart: %s(): " fmt, __func__
@@ -1342,6 +1342,16 @@ void notify_proxy_unvote(struct device *device)
		notify_each_subsys_device(&dev, 1, SUBSYS_PROXY_UNVOTE, NULL);
}

void notify_before_auth_and_reset(struct device *device)
{
	struct subsys_device *dev = desc_to_subsys(device);

	if (dev)
		notify_each_subsys_device(&dev, 1,
			SUBSYS_BEFORE_AUTH_AND_RESET, NULL);
}


static int subsys_device_open(struct inode *inode, struct file *file)
{
	struct subsys_device *device, *subsys_dev = 0;
+2 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2011, 2013-2014, 2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2011, 2013-2014, 2018-2019, The Linux Foundation. All rights reserved.
 */
/*
 * Subsystem restart notifier API header
@@ -17,6 +17,7 @@ enum subsys_notif_type {
	SUBSYS_AFTER_SHUTDOWN,
	SUBSYS_BEFORE_POWERUP,
	SUBSYS_AFTER_POWERUP,
	SUBSYS_BEFORE_AUTH_AND_RESET,
	SUBSYS_RAMDUMP_NOTIFICATION,
	SUBSYS_POWERUP_FAILURE,
	SUBSYS_PROXY_VOTE,
+3 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2014-2019, The Linux Foundation. All rights reserved.
 */

#ifndef __SUBSYS_RESTART_H
@@ -157,6 +157,7 @@ extern void subsys_set_crash_status(struct subsys_device *dev,
extern enum crash_status subsys_get_crash_status(struct subsys_device *dev);
void notify_proxy_vote(struct device *device);
void notify_proxy_unvote(struct device *device);
void notify_before_auth_and_reset(struct device *device);
void complete_err_ready(struct subsys_device *subsys);
void complete_shutdown_ack(struct subsys_device *subsys);
struct subsys_device *find_subsys_device(const char *str);
@@ -218,6 +219,7 @@ enum crash_status subsys_get_crash_status(struct subsys_device *dev)
}
static inline void notify_proxy_vote(struct device *device) { }
static inline void notify_proxy_unvote(struct device *device) { }
static inline void notify_before_auth_and_reset(struct device *device) { }
static inline int wait_for_shutdown_ack(struct subsys_desc *desc)
{
	return -EOPNOTSUPP;