From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ajay Gupta <ajayg@nvidia.com>, linux-usb@vger.kernel.org
Subject: [v2,1/7] i2c: nvidia-gpu: Supply CCGx driver the fw build info
Date: Mon, 15 Apr 2019 15:09:25 +0300 [thread overview]
Message-ID: <20190415120931.61328-2-heikki.krogerus@linux.intel.com> (raw)
From: Ajay Gupta <ajayg@nvidia.com>
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>
---
drivers/i2c/busses/i2c-nvidia-gpu.c | 7 +++++++
1 file changed, 7 insertions(+)
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;
WARNING: multiple messages have this Message-ID (diff)
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ajay Gupta <ajayg@nvidia.com>, linux-usb@vger.kernel.org
Subject: [PATCH v2 1/7] i2c: nvidia-gpu: Supply CCGx driver the fw build info
Date: Mon, 15 Apr 2019 15:09:25 +0300 [thread overview]
Message-ID: <20190415120931.61328-2-heikki.krogerus@linux.intel.com> (raw)
Message-ID: <20190415120925.k73dejRlsWL41B_GmfYc62BWez3XTCLBCXAKy_xCxy4@z> (raw)
In-Reply-To: <20190415120931.61328-1-heikki.krogerus@linux.intel.com>
From: Ajay Gupta <ajayg@nvidia.com>
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>
---
drivers/i2c/busses/i2c-nvidia-gpu.c | 7 +++++++
1 file changed, 7 insertions(+)
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;
--
2.20.1
next prev reply other threads:[~2019-04-15 12:09 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-15 12:09 [PATCH v2 0/7] usb: typec: Remaining changes for v5.2 Heikki Krogerus
2019-04-15 12:09 ` Heikki Krogerus [this message]
2019-04-15 12:09 ` [PATCH v2 1/7] i2c: nvidia-gpu: Supply CCGx driver the fw build info Heikki Krogerus
2019-04-15 12:09 ` [v2,2/7] usb: typec: ucsi: ccg: add get_fw_info function Heikki Krogerus
2019-04-15 12:09 ` [PATCH v2 2/7] " Heikki Krogerus
2019-04-15 12:09 ` [v2,3/7] usb: typec: ucsi: ccg: add firmware flashing support Heikki Krogerus
2019-04-15 12:09 ` [PATCH v2 3/7] " Heikki Krogerus
2019-04-16 10:00 ` [v2,3/7] " Greg Kroah-Hartman
2019-04-16 10:00 ` [PATCH v2 3/7] " Greg Kroah-Hartman
2019-04-15 12:09 ` [v2,4/7] usb: typec: ucsi: Preliminary support for alternate modes Heikki Krogerus
2019-04-15 12:09 ` [PATCH v2 4/7] " Heikki Krogerus
2019-04-15 12:09 ` [v2,5/7] usb: typec: ucsi: Support for DisplayPort alt mode Heikki Krogerus
2019-04-15 12:09 ` [PATCH v2 5/7] " Heikki Krogerus
2019-04-15 12:09 ` [v2,6/7] usb: typec: displayport: Export probe and remove functions Heikki Krogerus
2019-04-15 12:09 ` [PATCH v2 6/7] " Heikki Krogerus
2019-04-16 0:45 ` [v2,6/7] " Ajay Gupta
2019-04-16 0:45 ` [PATCH v2 6/7] " Ajay Gupta
2019-04-16 6:27 ` [v2,6/7] " Heikki Krogerus
2019-04-16 6:27 ` [PATCH v2 6/7] " Heikki Krogerus
2019-04-16 7:46 ` [v2,6/7] " Heikki Krogerus
2019-04-16 7:46 ` [PATCH v2 6/7] " Heikki Krogerus
2019-04-16 10:03 ` [v2,6/7] " Greg Kroah-Hartman
2019-04-16 10:03 ` [PATCH v2 6/7] " Greg Kroah-Hartman
2019-04-15 12:09 ` [v2,7/7] usb: typec: Add driver for NVIDIA Alt Modes Heikki Krogerus
2019-04-15 12:09 ` [PATCH v2 7/7] " Heikki Krogerus
2019-04-15 21:12 ` kbuild test robot
2019-04-16 10:02 ` [v2,7/7] " Greg Kroah-Hartman
2019-04-16 10:02 ` [PATCH v2 7/7] " Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190415120931.61328-2-heikki.krogerus@linux.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=ajayg@nvidia.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).