Message ID | 20230119111741.33901-6-jonathanh@nvidia.com |
---|---|
State | Changes Requested |
Headers | show |
Series | Add device-tree support for Cypress CYPD4226 | expand |
On 19/01/2023 11:17, Jon Hunter wrote: > 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> > --- > V5: Added this patch from V3 > > drivers/usb/typec/ucsi/ucsi_ccg.c | 17 +++++++---------- > 1 file changed, 7 insertions(+), 10 deletions(-) > > diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c > index 889a831e251d..0f18b32df8e6 100644 > --- a/drivers/usb/typec/ucsi/ucsi_ccg.c > +++ b/drivers/usb/typec/ucsi/ucsi_ccg.c > @@ -1358,16 +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; > } The above } should have been removed as well. Not a good start to the day ... > } >
diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c index 889a831e251d..0f18b32df8e6 100644 --- a/drivers/usb/typec/ucsi/ucsi_ccg.c +++ b/drivers/usb/typec/ucsi/ucsi_ccg.c @@ -1358,16 +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; } }