[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e63e9d49-318f-93ae-178f-93a7023538c1@nvidia.com>
Date: Tue, 1 Nov 2022 15:07:38 +0000
From: Jon Hunter <jonathanh@...dia.com>
To: Wayne Chang <waynec@...dia.com>, gregkh@...uxfoundation.org,
robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
treding@...dia.com, thierry.reding@...il.com,
heikki.krogerus@...ux.intel.com, ajayg@...dia.com, kishon@...com,
vkoul@...nel.org, p.zabel@...gutronix.de, balbi@...nel.org,
mathias.nyman@...el.com, jckuo@...dia.com
Cc: linux-usb@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, singhanc@...dia.com,
linux-i2c@...r.kernel.org, linux-phy@...ts.infradead.org,
linux-tegra@...r.kernel.org
Subject: Re: [PATCH 07/11] i2c: nvidia-gpu: Replace ccgx to well-known regex
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@...dia.com>
> ---
> 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.
Jon
--
nvpublic
Powered by blists - more mailing lists