diff mbox series

[V6,5/6] usb: typec: ucsi_ccg: Remove ccgx,firmware-build property

Message ID 20230119121639.226729-6-jonathanh@nvidia.com
State Superseded
Headers show
Series Add device-tree support for Cypress CYPD4226 | expand

Commit Message

Jon Hunter Jan. 19, 2023, 12:16 p.m. UTC
From: Wayne Chang <waynec@nvidia.com>

Remove the property 'ccgx,firmware-build' now we have migrated devices
to using the 'firmware-name' property.

Signed-off-by: Wayne Chang <waynec@nvidia.com>
Co-developed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
V6: fixed compilation
V5: Added this patch from V3

 drivers/usb/typec/ucsi/ucsi_ccg.c | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)
diff mbox series

Patch

diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c
index 661a3988b39d..8f5ad2094f26 100644
--- a/drivers/usb/typec/ucsi/ucsi_ccg.c
+++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
@@ -1358,17 +1358,13 @@  static int ucsi_ccg_probe(struct i2c_client *client)
 	INIT_WORK(&uc->pm_work, ccg_pm_workaround_work);
 
 	/* Only fail FW flashing when FW build information is not provided */
-	status = device_property_read_u16(dev, "ccgx,firmware-build",
-					  &uc->fw_build);
-	if (status) {
-		status = device_property_read_string(dev, "firmware-name",
-						     &fw_name);
-		if (!status) {
-			if (!strcmp(fw_name, "nvidia,jetson-agx-xavier"))
-				uc->fw_build = CCG_FW_BUILD_NVIDIA_TEGRA;
-			else if (!strcmp(fw_name, "nvidia,gpu"))
-				uc->fw_build = CCG_FW_BUILD_NVIDIA;
-		}
+	status = device_property_read_string(dev, "firmware-name",
+					     &fw_name);
+	if (!status) {
+		if (!strcmp(fw_name, "nvidia,jetson-agx-xavier"))
+			uc->fw_build = CCG_FW_BUILD_NVIDIA_TEGRA;
+		else if (!strcmp(fw_name, "nvidia,gpu"))
+			uc->fw_build = CCG_FW_BUILD_NVIDIA;
 	}
 
 	if (!uc->fw_build)