Skip to content

Commit 5fd958a

Browse files
Ajay Guptagregkh
authored andcommitted
i2c: nvidia-gpu: Supply CCGx driver the fw build info
Adding device property "ccgx,firmware-build" for the CCGx device, so the CCGx driver knows which firmware binary to use for a specific vendor. Suggested-by: Heikki Krogerus <[email protected]> Signed-off-by: Ajay Gupta <[email protected]> Signed-off-by: Heikki Krogerus <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5d438e2 commit 5fd958a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/i2c/busses/i2c-nvidia-gpu.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,12 @@ static const struct pci_device_id gpu_i2c_ids[] = {
253253
};
254254
MODULE_DEVICE_TABLE(pci, gpu_i2c_ids);
255255

256+
static const struct property_entry ccgx_props[] = {
257+
/* Use FW built for NVIDIA (nv) only */
258+
PROPERTY_ENTRY_U16("ccgx,firmware-build", ('n' << 8) | 'v'),
259+
{ }
260+
};
261+
256262
static int gpu_populate_client(struct gpu_i2c_dev *i2cd, int irq)
257263
{
258264
struct i2c_client *ccgx_client;
@@ -267,6 +273,7 @@ static int gpu_populate_client(struct gpu_i2c_dev *i2cd, int irq)
267273
sizeof(i2cd->gpu_ccgx_ucsi->type));
268274
i2cd->gpu_ccgx_ucsi->addr = 0x8;
269275
i2cd->gpu_ccgx_ucsi->irq = irq;
276+
i2cd->gpu_ccgx_ucsi->properties = ccgx_props;
270277
ccgx_client = i2c_new_device(&i2cd->adapter, i2cd->gpu_ccgx_ucsi);
271278
if (!ccgx_client)
272279
return -ENODEV;

0 commit comments

Comments
 (0)