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

Commit 54c70d98 authored by Konstantin Dorfman's avatar Konstantin Dorfman
Browse files

soc: qcom: Add spss transport for Glink Probe driver



This changes adds support for Secure Processor communication.

Change-Id: I888eda75c5a6a25a70064ebf9b30fa46ef218f6c
Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>
parent c65aae7a
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -84,6 +84,26 @@ static void glink_probe_smem_unreg(struct edge_info *einfo)
	einfo->glink = NULL;
	GLINK_INFO("unregister for %s\n", einfo->ssr_label);
}
static int glink_probe_spss_reg(struct edge_info *einfo)
{
	struct device *dev = einfo->dev;

	einfo->glink = qcom_glink_spss_register(dev, einfo->node);
	if (IS_ERR_OR_NULL(einfo->glink)) {
		GLINK_ERR(dev, "register failed for %s\n", einfo->ssr_label);
		einfo->glink = NULL;
	}

	return 0;
}

static void glink_probe_spss_unreg(struct edge_info *einfo)
{
	if (einfo->glink)
		qcom_glink_spss_unregister(einfo->glink);

	einfo->glink = NULL;
}

static void probe_subsystem(struct device *dev, struct device_node *np)
{
@@ -120,6 +140,9 @@ static void probe_subsystem(struct device *dev, struct device_node *np)
	if (!strcmp(transport, "smem")) {
		einfo->register_fn = glink_probe_smem_reg;
		einfo->unregister_fn = glink_probe_smem_unreg;
	} else if (!strcmp(transport, "spss")) {
		einfo->register_fn = glink_probe_spss_reg;
		einfo->unregister_fn = glink_probe_spss_unreg;
	}

	einfo->nb.notifier_call = glink_probe_ssr_cb;