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

Commit 80e47d47 authored by Satyajit Desai's avatar Satyajit Desai
Browse files

coresight-dummy: add device tree property for source devices



Add device tree property to indicate the type of dummy device.
This can be used to distinguish between different types of dummy
devices.

Change-Id: Ic729c64c0acf8e38147ec2d709d51081fafd40f9
Signed-off-by: default avatarSatyajit Desai <sadesai@codeaurora.org>
parent 5276454d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -84,6 +84,9 @@ its hardware characteristcs.

	* coresight-name: unique descriptive name of the component.

* Additional required property for coresight-dummy devices:
	* qcom,dummy-source: Configure the device as source.

* Optional properties for all components:
	* reg-names: names corresponding to each reg property value.

+9 −2
Original line number Diff line number Diff line
@@ -84,8 +84,15 @@ static int dummy_probe(struct platform_device *pdev)

	drvdata->traceid = traceid++;

	if (of_property_read_bool(pdev->dev.of_node, "qcom,dummy-source")) {
		desc->type = CORESIGHT_DEV_TYPE_SOURCE;
	desc->subtype.source_subtype = CORESIGHT_DEV_SUBTYPE_SOURCE_PROC;
		desc->subtype.source_subtype =
					CORESIGHT_DEV_SUBTYPE_SOURCE_PROC;
	} else {
		dev_info(dev, "Device type not set.\n");
		return -EINVAL;
	}

	desc->ops = &dummy_cs_ops;
	desc->pdata = pdev->dev.platform_data;
	desc->dev = &pdev->dev;