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

Commit 190e0783 authored by Yuanfang Zhang's avatar Yuanfang Zhang
Browse files

coresight: tpdm: fix tpdm probe fail issue



If fail to get the pdata during tpdm probe, this may because
some resources are not ready, so retry the probe.

Change-Id: If32e144275d26c48b52fa7a1777e08ee1e3328f7
Signed-off-by: default avatarYuanfang Zhang <zhangyuanfang@codeaurora.org>
parent a9013b58
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2014-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2014-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/kernel.h>
@@ -4333,8 +4333,10 @@ static int tpdm_probe(struct amba_device *adev, const struct amba_id *id)
	u32 scm_ret = 0;

	pdata = of_get_coresight_platform_data(dev, adev->dev.of_node);
	if (IS_ERR(pdata))
		return PTR_ERR(pdata);
	if (IS_ERR(pdata)) {
		dev_dbg(dev, "failed to get pdata, defer probe\n");
		return -EPROBE_DEFER;
	}
	adev->dev.platform_data = pdata;

	if (of_property_read_bool(adev->dev.of_node, "qcom,hw-enable-check")) {