diff mbox series

[06/11] usb: typec: ucsi_ccg: Replace ccgx to well-known regex

Message ID 20221024074128.1113554-7-waynec@nvidia.com (mailing list archive)
State Superseded
Headers show
Series Enable USB host and device functions on Jetson | expand

Commit Message

Wayne Chang Oct. 24, 2022, 7:41 a.m. UTC
ccgx is refer to the cypress cypd4226 typec controller.
Replace ccgx to well-known regex "cypress".

Signed-off-by: Wayne Chang <waynec@nvidia.com>
---
 drivers/usb/typec/ucsi/ucsi_ccg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Heikki Krogerus Oct. 24, 2022, 8:01 a.m. UTC | #1
On Mon, Oct 24, 2022 at 03:41:23PM +0800, Wayne Chang wrote:
> ccgx is refer to the cypress cypd4226 typec controller.
> Replace ccgx to well-known regex "cypress".
> 
> Signed-off-by: Wayne Chang <waynec@nvidia.com>
> ---
>  drivers/usb/typec/ucsi/ucsi_ccg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c
> index 139707a2f3d6..5d3099e6eb77 100644
> --- a/drivers/usb/typec/ucsi/ucsi_ccg.c
> +++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
> @@ -1358,7 +1358,7 @@ 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",
> +	status = device_property_read_u16(dev, "cypress,firmware-build",
>  					  &uc->fw_build);
>  	if (status)
>  		dev_err(uc->dev, "failed to get FW build information\n");

This will break bisectability. You need to first add that
"cyppress,firmware-build" identifier without removing the old
"ccgx,firmware-build" identifier, and then introduce a separate
clean-up patch where you remove it when it's safe to remove:

1. Add new - This patch.
2. Modify users - PATCH 7/11.
3. Remove old - *missing*.

thanks,
Felipe Balbi Oct. 24, 2022, 8:29 a.m. UTC | #2
Heikki Krogerus <heikki.krogerus@linux.intel.com> writes:

> On Mon, Oct 24, 2022 at 03:41:23PM +0800, Wayne Chang wrote:
>> ccgx is refer to the cypress cypd4226 typec controller.
>> Replace ccgx to well-known regex "cypress".
>> 
>> Signed-off-by: Wayne Chang <waynec@nvidia.com>
>> ---
>>  drivers/usb/typec/ucsi/ucsi_ccg.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c
>> index 139707a2f3d6..5d3099e6eb77 100644
>> --- a/drivers/usb/typec/ucsi/ucsi_ccg.c
>> +++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
>> @@ -1358,7 +1358,7 @@ 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",
>> +	status = device_property_read_u16(dev, "cypress,firmware-build",
>>  					  &uc->fw_build);
>>  	if (status)
>>  		dev_err(uc->dev, "failed to get FW build information\n");
>
> This will break bisectability. You need to first add that
> "cyppress,firmware-build" identifier without removing the old
> "ccgx,firmware-build" identifier, and then introduce a separate
> clean-up patch where you remove it when it's safe to remove:
>
> 1. Add new - This patch.
> 2. Modify users - PATCH 7/11.
> 3. Remove old - *missing*.

will it ever be safe to remove? What about potential products in the
market with little to no upgrade path? There are likely to be products
with a DTB that will never be updated, no?
Heikki Krogerus Oct. 24, 2022, 8:46 a.m. UTC | #3
On Mon, Oct 24, 2022 at 11:29:27AM +0300, Felipe Balbi wrote:
> Heikki Krogerus <heikki.krogerus@linux.intel.com> writes:
> 
> > On Mon, Oct 24, 2022 at 03:41:23PM +0800, Wayne Chang wrote:
> >> ccgx is refer to the cypress cypd4226 typec controller.
> >> Replace ccgx to well-known regex "cypress".
> >> 
> >> Signed-off-by: Wayne Chang <waynec@nvidia.com>
> >> ---
> >>  drivers/usb/typec/ucsi/ucsi_ccg.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >> 
> >> diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c
> >> index 139707a2f3d6..5d3099e6eb77 100644
> >> --- a/drivers/usb/typec/ucsi/ucsi_ccg.c
> >> +++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
> >> @@ -1358,7 +1358,7 @@ 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",
> >> +	status = device_property_read_u16(dev, "cypress,firmware-build",
> >>  					  &uc->fw_build);
> >>  	if (status)
> >>  		dev_err(uc->dev, "failed to get FW build information\n");
> >
> > This will break bisectability. You need to first add that
> > "cyppress,firmware-build" identifier without removing the old
> > "ccgx,firmware-build" identifier, and then introduce a separate
> > clean-up patch where you remove it when it's safe to remove:
> >
> > 1. Add new - This patch.
> > 2. Modify users - PATCH 7/11.
> > 3. Remove old - *missing*.
> 
> will it ever be safe to remove? What about potential products in the
> market with little to no upgrade path? There are likely to be products
> with a DTB that will never be updated, no?

Not the case here. OF support is only just added to this driver in
this series. That old identifier has been used as a build-in property
only.

thanks,
Wayne Chang Oct. 25, 2022, 7:26 a.m. UTC | #4
Thanks for the review.

On 10/24/22 16:46, Heikki Krogerus wrote:
> External email: Use caution opening links or attachments
> 
> 
> On Mon, Oct 24, 2022 at 11:29:27AM +0300, Felipe Balbi wrote:
>> Heikki Krogerus <heikki.krogerus@linux.intel.com> writes:
>>
>>> On Mon, Oct 24, 2022 at 03:41:23PM +0800, Wayne Chang wrote:
>>>> ccgx is refer to the cypress cypd4226 typec controller.
>>>> Replace ccgx to well-known regex "cypress".
>>>>
>>>> Signed-off-by: Wayne Chang <waynec@nvidia.com>
>>>> ---
>>>>   drivers/usb/typec/ucsi/ucsi_ccg.c | 2 +-
>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c
>>>> index 139707a2f3d6..5d3099e6eb77 100644
>>>> --- a/drivers/usb/typec/ucsi/ucsi_ccg.c
>>>> +++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
>>>> @@ -1358,7 +1358,7 @@ 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",
>>>> +  status = device_property_read_u16(dev, "cypress,firmware-build",
>>>>                                       &uc->fw_build);
>>>>     if (status)
>>>>             dev_err(uc->dev, "failed to get FW build information\n");
>>>
>>> This will break bisectability. You need to first add that
>>> "cyppress,firmware-build" identifier without removing the old
>>> "ccgx,firmware-build" identifier, and then introduce a separate
>>> clean-up patch where you remove it when it's safe to remove:
>>>
>>> 1. Add new - This patch.
>>> 2. Modify users - PATCH 7/11.
>>> 3. Remove old - *missing*.
>>

thanks for the guidance.
will update the changes in the next patchset.

thanks,
Wayne.

>> will it ever be safe to remove? What about potential products in the
>> market with little to no upgrade path? There are likely to be products
>> with a DTB that will never be updated, no?
> 
> Not the case here. OF support is only just added to this driver in
> this series. That old identifier has been used as a build-in property
> only.
> 
> thanks,
> 
> --
> heikki
>
diff mbox series

Patch

diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c
index 139707a2f3d6..5d3099e6eb77 100644
--- a/drivers/usb/typec/ucsi/ucsi_ccg.c
+++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
@@ -1358,7 +1358,7 @@  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",
+	status = device_property_read_u16(dev, "cypress,firmware-build",
 					  &uc->fw_build);
 	if (status)
 		dev_err(uc->dev, "failed to get FW build information\n");