Commit 5fd958a4 authored by Ajay Gupta's avatar Ajay Gupta Committed by Greg Kroah-Hartman

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: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: default avatarAjay Gupta <ajayg@nvidia.com>
Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5d438e20
...@@ -253,6 +253,12 @@ static const struct pci_device_id gpu_i2c_ids[] = { ...@@ -253,6 +253,12 @@ static const struct pci_device_id gpu_i2c_ids[] = {
}; };
MODULE_DEVICE_TABLE(pci, gpu_i2c_ids); 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'),
{ }
};
static int gpu_populate_client(struct gpu_i2c_dev *i2cd, int irq) static int gpu_populate_client(struct gpu_i2c_dev *i2cd, int irq)
{ {
struct i2c_client *ccgx_client; struct i2c_client *ccgx_client;
...@@ -267,6 +273,7 @@ static int gpu_populate_client(struct gpu_i2c_dev *i2cd, int irq) ...@@ -267,6 +273,7 @@ static int gpu_populate_client(struct gpu_i2c_dev *i2cd, int irq)
sizeof(i2cd->gpu_ccgx_ucsi->type)); sizeof(i2cd->gpu_ccgx_ucsi->type));
i2cd->gpu_ccgx_ucsi->addr = 0x8; i2cd->gpu_ccgx_ucsi->addr = 0x8;
i2cd->gpu_ccgx_ucsi->irq = irq; i2cd->gpu_ccgx_ucsi->irq = irq;
i2cd->gpu_ccgx_ucsi->properties = ccgx_props;
ccgx_client = i2c_new_device(&i2cd->adapter, i2cd->gpu_ccgx_ucsi); ccgx_client = i2c_new_device(&i2cd->adapter, i2cd->gpu_ccgx_ucsi);
if (!ccgx_client) if (!ccgx_client)
return -ENODEV; return -ENODEV;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment