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

Commit a815c515 authored by Runmin Wang's avatar Runmin Wang
Browse files

soc: qcom: gladiator_hang: Add support for sdm855



Add bit offset and expose sysfs entry for gladiator hang driver
on sdm855.

Change-Id: Ia642b6f8974115e610b9bb6ef4e14ce15c53560a
Signed-off-by: default avatarRunmin Wang <runminw@codeaurora.org>
parent b1aa209d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ detection on PCIO port

Required properties:
- compatible : "qcom,gladiator-hang-detect" or "qcom,gladiator-hang-detect-v2"
				or "qcom,gladiator-hang-detect-v3"
- qcom, threshold-arr:
		Array of APCS_COMMON_GLADIATOR_HANG_THRESHOLD_n register
		address
+12 −0
Original line number Diff line number Diff line
@@ -460,6 +460,12 @@ static struct attribute *hang_attrs_v2[] = {
	NULL
};

static struct attribute *hang_attrs_v3[] = {
	&hang_attr_ace_threshold.attr,
	&hang_attr_ace_enable.attr,
	NULL
};

static struct attribute_group hang_attr_group = {
	.attrs = hang_attrs,
};
@@ -467,6 +473,7 @@ static struct attribute_group hang_attr_group = {
static const struct of_device_id msm_gladiator_hang_detect_table[] = {
	{ .compatible = "qcom,gladiator-hang-detect" },
	{ .compatible = "qcom,gladiator-hang-detect-v2" },
	{ .compatible = "qcom,gladiator-hang-detect-v3" },
	{}
};

@@ -503,6 +510,11 @@ static int msm_gladiator_hang_detect_probe(struct platform_device *pdev)
		hang_det->IO_offset = 1;
		NR_GLA_REG = 2;
		hang_attr_group.attrs = hang_attrs_v2;
	} else if (of_device_is_compatible(node,
			"qcom,gladiator-hang-detect-v3")) {
		hang_det->ACE_offset = 0;
		NR_GLA_REG = 1;
		hang_attr_group.attrs = hang_attrs_v3;
	}

	hang_det->threshold = devm_kzalloc(&pdev->dev,