diff mbox series

[V4,3/5] usb: typec: ucsi_ccg: Replace ccgx to well-known regex

Message ID 20230116155045.100780-4-jonathanh@nvidia.com (mailing list archive)
State New, archived
Headers show
Series Add device-tree support for Cypress CYP4226 | expand

Commit Message

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

ccgx is refer to the cypress cypd4226 typec controller.
Replace ccgx to well-known regex "cypress".

Signed-off-by: Wayne Chang <waynec@nvidia.com>
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
V2 -> V4: nothing has changed
V1 -> V2: new change added for adding cypress,firmware-build

 drivers/usb/typec/ucsi/ucsi_ccg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Heikki Krogerus Jan. 17, 2023, 12:02 p.m. UTC | #1
On Mon, Jan 16, 2023 at 03:50:43PM +0000, Jon Hunter wrote:
> From: Wayne Chang <waynec@nvidia.com>
> 
> ccgx is refer to the cypress cypd4226 typec controller.
> Replace ccgx to well-known regex "cypress".
> 
> Signed-off-by: Wayne Chang <waynec@nvidia.com>
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> ---
> V2 -> V4: nothing has changed
> V1 -> V2: new change added for adding cypress,firmware-build
> 
>  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 4bc31ed8e5bc..d6114fb8d5a9 100644
> --- a/drivers/usb/typec/ucsi/ucsi_ccg.c
> +++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
> @@ -1357,7 +1357,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);

You need to first add that property to
drivers/i2c/busses/i2c-nvidia-gpu.c.

>  	if (status)
>  		dev_err(uc->dev, "failed to get FW build information\n");
> -- 
> 2.25.1
Jon Hunter Jan. 17, 2023, 5:17 p.m. UTC | #2
On 17/01/2023 12:02, Heikki Krogerus wrote:
> On Mon, Jan 16, 2023 at 03:50:43PM +0000, Jon Hunter wrote:
>> From: Wayne Chang <waynec@nvidia.com>
>>
>> ccgx is refer to the cypress cypd4226 typec controller.
>> Replace ccgx to well-known regex "cypress".
>>
>> Signed-off-by: Wayne Chang <waynec@nvidia.com>
>> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
>> ---
>> V2 -> V4: nothing has changed
>> V1 -> V2: new change added for adding cypress,firmware-build
>>
>>   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 4bc31ed8e5bc..d6114fb8d5a9 100644
>> --- a/drivers/usb/typec/ucsi/ucsi_ccg.c
>> +++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
>> @@ -1357,7 +1357,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);
> 
> You need to first add that property to
> drivers/i2c/busses/i2c-nvidia-gpu.c.

Yes indeed! I will fix this.

Jon
Jon Hunter Jan. 17, 2023, 11:29 p.m. UTC | #3
On 17/01/2023 12:02, Heikki Krogerus wrote:
> On Mon, Jan 16, 2023 at 03:50:43PM +0000, Jon Hunter wrote:
>> From: Wayne Chang <waynec@nvidia.com>
>>
>> ccgx is refer to the cypress cypd4226 typec controller.
>> Replace ccgx to well-known regex "cypress".
>>
>> Signed-off-by: Wayne Chang <waynec@nvidia.com>
>> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
>> ---
>> V2 -> V4: nothing has changed
>> V1 -> V2: new change added for adding cypress,firmware-build
>>
>>   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 4bc31ed8e5bc..d6114fb8d5a9 100644
>> --- a/drivers/usb/typec/ucsi/ucsi_ccg.c
>> +++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
>> @@ -1357,7 +1357,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);
> 
> You need to first add that property to
> drivers/i2c/busses/i2c-nvidia-gpu.c.


Looking at this some more, I wonder if we need to keep 
'ccgx,firmware-build' as a fallback for AMD? It is not clear to me if 
they implement this property or not. Let me know what you think. I will 
still update the i2c-nvidia-gpu driver. 	

Thanks
Jon
Heikki Krogerus Jan. 18, 2023, 9:13 a.m. UTC | #4
On Tue, Jan 17, 2023 at 11:29:25PM +0000, Jon Hunter wrote:
> 
> On 17/01/2023 12:02, Heikki Krogerus wrote:
> > On Mon, Jan 16, 2023 at 03:50:43PM +0000, Jon Hunter wrote:
> > > From: Wayne Chang <waynec@nvidia.com>
> > > 
> > > ccgx is refer to the cypress cypd4226 typec controller.
> > > Replace ccgx to well-known regex "cypress".
> > > 
> > > Signed-off-by: Wayne Chang <waynec@nvidia.com>
> > > Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> > > ---
> > > V2 -> V4: nothing has changed
> > > V1 -> V2: new change added for adding cypress,firmware-build
> > > 
> > >   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 4bc31ed8e5bc..d6114fb8d5a9 100644
> > > --- a/drivers/usb/typec/ucsi/ucsi_ccg.c
> > > +++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
> > > @@ -1357,7 +1357,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);
> > 
> > You need to first add that property to
> > drivers/i2c/busses/i2c-nvidia-gpu.c.
> 
> 
> Looking at this some more, I wonder if we need to keep 'ccgx,firmware-build'
> as a fallback for AMD? It is not clear to me if they implement this property
> or not. Let me know what you think. I will still update the i2c-nvidia-gpu
> driver. 	

AMD needs to answer to that one. Sanket, do you have that device
property ("ccgx,firmware-build") in your ACPI tables (as _DSD device
property) for this device?

thanks,
Jon Hunter Jan. 19, 2023, 10:45 a.m. UTC | #5
On 18/01/2023 09:13, Heikki Krogerus wrote:
> On Tue, Jan 17, 2023 at 11:29:25PM +0000, Jon Hunter wrote:
>>
>> On 17/01/2023 12:02, Heikki Krogerus wrote:
>>> On Mon, Jan 16, 2023 at 03:50:43PM +0000, Jon Hunter wrote:
>>>> From: Wayne Chang <waynec@nvidia.com>
>>>>
>>>> ccgx is refer to the cypress cypd4226 typec controller.
>>>> Replace ccgx to well-known regex "cypress".
>>>>
>>>> Signed-off-by: Wayne Chang <waynec@nvidia.com>
>>>> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
>>>> ---
>>>> V2 -> V4: nothing has changed
>>>> V1 -> V2: new change added for adding cypress,firmware-build
>>>>
>>>>    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 4bc31ed8e5bc..d6114fb8d5a9 100644
>>>> --- a/drivers/usb/typec/ucsi/ucsi_ccg.c
>>>> +++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
>>>> @@ -1357,7 +1357,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);
>>>
>>> You need to first add that property to
>>> drivers/i2c/busses/i2c-nvidia-gpu.c.
>>
>>
>> Looking at this some more, I wonder if we need to keep 'ccgx,firmware-build'
>> as a fallback for AMD? It is not clear to me if they implement this property
>> or not. Let me know what you think. I will still update the i2c-nvidia-gpu
>> driver. 	
> 
> AMD needs to answer to that one. Sanket, do you have that device
> property ("ccgx,firmware-build") in your ACPI tables (as _DSD device
> property) for this device?


I will resend the series now, but we can wait on Sanket's response on 
whether we pick this one up or drop it. If the rest are OK, I would like 
to get them in queued for v6.3.

Thanks
Jon
Goswami, Sanket Jan. 20, 2023, 7:19 a.m. UTC | #6
Hi Heikki,

On 18-Jan-23 14:43, Heikki Krogerus wrote:
> On Tue, Jan 17, 2023 at 11:29:25PM +0000, Jon Hunter wrote:
>>
>> On 17/01/2023 12:02, Heikki Krogerus wrote:
>>> On Mon, Jan 16, 2023 at 03:50:43PM +0000, Jon Hunter wrote:
>>>> From: Wayne Chang <waynec@nvidia.com>
>>>>
>>>> ccgx is refer to the cypress cypd4226 typec controller.
>>>> Replace ccgx to well-known regex "cypress".
>>>>
>>>> Signed-off-by: Wayne Chang <waynec@nvidia.com>
>>>> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
>>>> ---
>>>> V2 -> V4: nothing has changed
>>>> V1 -> V2: new change added for adding cypress,firmware-build
>>>>
>>>>   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 4bc31ed8e5bc..d6114fb8d5a9 100644
>>>> --- a/drivers/usb/typec/ucsi/ucsi_ccg.c
>>>> +++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
>>>> @@ -1357,7 +1357,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);
>>>
>>> You need to first add that property to
>>> drivers/i2c/busses/i2c-nvidia-gpu.c.
>>
>>
>> Looking at this some more, I wonder if we need to keep 'ccgx,firmware-build'
>> as a fallback for AMD? It is not clear to me if they implement this property
>> or not. Let me know what you think. I will still update the i2c-nvidia-gpu
>> driver. 	
> 
> AMD needs to answer to that one. Sanket, do you have that device
> property ("ccgx,firmware-build") in your ACPI tables (as _DSD device
> property) for this device?

We have not included this property in the ACPI tables, so there will be no impact on us.

Thanks,
Sanket
diff mbox series

Patch

diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c
index 4bc31ed8e5bc..d6114fb8d5a9 100644
--- a/drivers/usb/typec/ucsi/ucsi_ccg.c
+++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
@@ -1357,7 +1357,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");