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

Commit f8185653 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: subsystem_restart: Add notification to indicate powerup failure"

parents f01561f1 de3cf520
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -25,6 +25,7 @@ enum subsys_notif_type {
	SUBSYS_BEFORE_POWERUP,
	SUBSYS_BEFORE_POWERUP,
	SUBSYS_AFTER_POWERUP,
	SUBSYS_AFTER_POWERUP,
	SUBSYS_RAMDUMP_NOTIFICATION,
	SUBSYS_RAMDUMP_NOTIFICATION,
	SUBSYS_POWERUP_FAILURE,
	SUBSYS_NOTIF_TYPE_COUNT
	SUBSYS_NOTIF_TYPE_COUNT
};
};


+8 −2
Original line number Original line Diff line number Diff line
@@ -500,14 +500,20 @@ static void subsystem_powerup(struct subsys_device *dev, void *data)
	pr_info("[%p]: Powering up %s\n", current, name);
	pr_info("[%p]: Powering up %s\n", current, name);
	init_completion(&dev->err_ready);
	init_completion(&dev->err_ready);


	if (dev->desc->powerup(dev->desc) < 0)
	if (dev->desc->powerup(dev->desc) < 0) {
		notify_each_subsys_device(&dev, 1, SUBSYS_POWERUP_FAILURE,
								NULL);
		panic("[%p]: Powerup error: %s!", current, name);
		panic("[%p]: Powerup error: %s!", current, name);
	}
	enable_all_irqs(dev);
	enable_all_irqs(dev);


	ret = wait_for_err_ready(dev);
	ret = wait_for_err_ready(dev);
	if (ret)
	if (ret) {
		notify_each_subsys_device(&dev, 1, SUBSYS_POWERUP_FAILURE,
								NULL);
		panic("[%p]: Timed out waiting for error ready: %s!",
		panic("[%p]: Timed out waiting for error ready: %s!",
			current, name);
			current, name);
	}
	subsys_set_state(dev, SUBSYS_ONLINE);
	subsys_set_state(dev, SUBSYS_ONLINE);
}
}