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

Commit 93e28fb6 authored by Pratham Pratap's avatar Pratham Pratap
Browse files

usb: phy: qusb2: Update tune value for host mode



Currently driver is relying on the efuse and the tune
value passed from DT for device mode to update the TUNE1
register. Since the host mode sequence can have a different
tune value passed from DT, it should be honored too.
This change removes an extra check for tune value which will
ensure that TUNE1 register gets updated both in device and
host mode.

Change-Id: Idbbd6426b7fd8c7cbdbacba1295849e1fe75c871
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent 0389e99d
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2014-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2014-2021, The Linux Foundation. All rights reserved.
 */

#include <linux/module.h>
@@ -519,7 +519,6 @@ static void qusb_phy_host_init(struct usb_phy *phy)
			qphy->host_init_seq_len, 0);

	if (qphy->efuse_reg) {
		if (!qphy->tune_val)
		qusb_phy_get_tune1_param(qphy);
	} else {
		/* For non fused chips we need to write the TUNE1 param as
@@ -621,7 +620,6 @@ static int qusb_phy_init(struct usb_phy *phy)
		qusb_phy_write_seq(qphy->base, qphy->qusb_phy_init_seq,
				qphy->init_seq_len, 0);
	if (qphy->efuse_reg) {
		if (!qphy->tune_val)
		qusb_phy_get_tune1_param(qphy);

		pr_debug("%s(): Programming TUNE1 parameter as:%x\n", __func__,