lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230917152639.21443-16-alkuor@gmail.com>
Date:   Sun, 17 Sep 2023 11:26:39 -0400
From:   Abdel Alkuor <alkuor@...il.com>
To:     heikki.krogerus@...ux.intel.com, krzysztof.kozlowski+dt@...aro.org,
        bryan.odonoghue@...aro.org
Cc:     gregkh@...uxfoundation.org, robh+dt@...nel.org,
        linux-usb@...r.kernel.org, devicetree@...r.kernel.org,
        conor+dt@...nel.org, linux-kernel@...r.kernel.org,
        abdelalkuor@...tab.com
Subject: [PATCH v5 15/15] USB: typec: Do not check VID for tps25750

From: Abdel Alkuor <abdelalkuor@...tab.com>

tps25750 doesn't have VID register, check VID for PD controllers
other than tps25750

Signed-off-by: Abdel Alkuor <abdelalkuor@...tab.com>
---
 drivers/usb/typec/tipd/core.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
index 326c23bfa8e6..c1399e12a170 100644
--- a/drivers/usb/typec/tipd/core.c
+++ b/drivers/usb/typec/tipd/core.c
@@ -1142,10 +1142,6 @@ static int tps6598x_probe(struct i2c_client *client)
 	if (IS_ERR(tps->regmap))
 		return PTR_ERR(tps->regmap);
 
-	ret = tps6598x_read32(tps, TPS_REG_VID, &vid);
-	if (ret < 0 || !vid)
-		return -ENODEV;
-
 	/*
 	 * Checking can the adapter handle SMBus protocol. If it can not, the
 	 * driver needs to take care of block reads separately.
@@ -1176,6 +1172,12 @@ static int tps6598x_probe(struct i2c_client *client)
 
 	tps->irq_handler = irq_handler;
 
+	if (!tps->is_tps25750) {
+		ret = tps6598x_read32(tps, TPS_REG_VID, &vid);
+		if (ret < 0 || !vid)
+			return -ENODEV;
+	}
+
 	/* Make sure the controller has application firmware running */
 	ret = tps6598x_check_mode(tps, &mode);
 	if (ret)
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ