Re: [PATCH 07/11] i2c: nvidia-gpu: Replace ccgx to well-known regex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 11/1/22 23:07, Jon Hunter wrote:
> 
> On 24/10/2022 08:41, 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@xxxxxxxxxx>
>> ---
>>   drivers/i2c/busses/i2c-nvidia-gpu.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c 
>> b/drivers/i2c/busses/i2c-nvidia-gpu.c
>> index 12e330cd7635..0934f8ad7f49 100644
>> --- a/drivers/i2c/busses/i2c-nvidia-gpu.c
>> +++ b/drivers/i2c/busses/i2c-nvidia-gpu.c
>> @@ -260,7 +260,7 @@ MODULE_DEVICE_TABLE(pci, gpu_i2c_ids);
>>   static const struct property_entry ccgx_props[] = {
>>       /* Use FW built for NVIDIA (nv) only */
>> -    PROPERTY_ENTRY_U16("ccgx,firmware-build", ('n' << 8) | 'v'),
>> +    PROPERTY_ENTRY_U16("cypress,firmware-build", ('n' << 8) | 'v'),
>>       { }
>>   };
> 
> 
> Could we change this to be PROPERTY_ENTRY_STRING instead of 
> PROPERTY_ENTRY_U16? The benefit of this would be to allow us to use a 
> proper string identifier in device-tree for the Tegra devices which is 
> more flexible and descriptive.
> 
> So given that this is for NVIDIA GPUs, we could simply make this ...
> 
>   PROPERTY_ENTRY_STRING("cypress,firmware-build", "nvidia,gpu"),
> 
> Then in the ucsi_ccg.c driver, when we read the device property 
> "cypress,firmware-build", if it is 'nvidia,gpu' then we set the 
> uc->fw_build variable to CCG_FW_BUILD_NVIDIA.
> 

Yes, it should be nice to have the change.
Thanks for the review.
I'll make the changes and using string instead of u16 in the next patch 
series.

thanks,
Wayne.


> Jon
> 




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux