[v3,07/13] i2c: nvidia-gpu: Add cypress,firmware-build as a well-known regex

Message ID 20221114124053.1873316-8-waynec@nvidia.com
State New
Headers
Series Enable USB host and device functions on Jetson |

Commit Message

Wayne Chang Nov. 14, 2022, 12:40 p.m. UTC
  ccgx is refer to the cypress cypd4226 typec controller.
add cypress,firmware-build as a well-known regex.

16-bit value is not sufficient for descriptiva names.
Using string instead of u16 to make it more descriptive.

Signed-off-by: Wayne Chang <waynec@nvidia.com>
---
V2 -> V3:nothing has changed
V1 -> V2:New change for adding cypress,firmware-build
 drivers/i2c/busses/i2c-nvidia-gpu.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Jon Hunter Nov. 15, 2022, 12:18 p.m. UTC | #1
On 14/11/2022 12:40, Wayne Chang wrote:
> ccgx is refer to the cypress cypd4226 typec controller.
> add cypress,firmware-build as a well-known regex.
> 
> 16-bit value is not sufficient for descriptiva names.
> Using string instead of u16 to make it more descriptive.
> 
> Signed-off-by: Wayne Chang <waynec@nvidia.com>
> ---
> V2 -> V3:nothing has changed
> V1 -> V2:New change for adding cypress,firmware-build
>   drivers/i2c/busses/i2c-nvidia-gpu.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c
> index 12e330cd7635..9b2e13bd44db 100644
> --- a/drivers/i2c/busses/i2c-nvidia-gpu.c
> +++ b/drivers/i2c/busses/i2c-nvidia-gpu.c
> @@ -261,6 +261,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_STRING("cypress,firmware-build", "nvidia,gpu"),
>   	{ }
>   };
>   


Reviewed-by: Jon Hunter <jonathanh@nvidia.com>

Thanks
Jon
  
Wolfram Sang Nov. 15, 2022, 8:52 p.m. UTC | #2
On Mon, Nov 14, 2022 at 08:40:47PM +0800, Wayne Chang wrote:
> ccgx is refer to the cypress cypd4226 typec controller.
> add cypress,firmware-build as a well-known regex.
> 
> 16-bit value is not sufficient for descriptiva names.
> Using string instead of u16 to make it more descriptive.
> 
> Signed-off-by: Wayne Chang <waynec@nvidia.com>

I assume this series goes upstream as a whole via some tree. So, for the
I2C changes:

Acked-by: Wolfram Sang <wsa@kernel.org>
  

Patch

diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c
index 12e330cd7635..9b2e13bd44db 100644
--- a/drivers/i2c/busses/i2c-nvidia-gpu.c
+++ b/drivers/i2c/busses/i2c-nvidia-gpu.c
@@ -261,6 +261,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_STRING("cypress,firmware-build", "nvidia,gpu"),
 	{ }
 };