summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorAjay Gupta <ajayg@nvidia.com>2019-04-23 17:21:46 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-25 11:03:53 +0200
commit5fd958a4f67d49089126d3b8b2d9cc993d8853ef (patch)
tree726eda54ad881568746b5a3873c60ecba2fdf49d /drivers/i2c
parent5d438e200215f61ca6a7aa69f3c4e035ac54d8ee (diff)
downloadlinux-5fd958a4f67d49089126d3b8b2d9cc993d8853ef.tar.bz2
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 <heikki.krogerus@linux.intel.com> Signed-off-by: Ajay Gupta <ajayg@nvidia.com> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-nvidia-gpu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c
index 4e67d5ed480e..1c8f708f212b 100644
--- a/drivers/i2c/busses/i2c-nvidia-gpu.c
+++ b/drivers/i2c/busses/i2c-nvidia-gpu.c
@@ -253,6 +253,12 @@ static const struct pci_device_id 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)
{
struct i2c_client *ccgx_client;
@@ -267,6 +273,7 @@ static int gpu_populate_client(struct gpu_i2c_dev *i2cd, int irq)
sizeof(i2cd->gpu_ccgx_ucsi->type));
i2cd->gpu_ccgx_ucsi->addr = 0x8;
i2cd->gpu_ccgx_ucsi->irq = irq;
+ i2cd->gpu_ccgx_ucsi->properties = ccgx_props;
ccgx_client = i2c_new_device(&i2cd->adapter, i2cd->gpu_ccgx_ucsi);
if (!ccgx_client)
return -ENODEV;