From patchwork Fri Apr 12 15:57:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heikki Krogerus X-Patchwork-Id: 10898625 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 60B0917E6 for ; Fri, 12 Apr 2019 15:57:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 460C528E67 for ; Fri, 12 Apr 2019 15:57:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3AADB28E6F; Fri, 12 Apr 2019 15:57:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE3B528E69 for ; Fri, 12 Apr 2019 15:57:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727112AbfDLP5k (ORCPT ); Fri, 12 Apr 2019 11:57:40 -0400 Received: from mga12.intel.com ([192.55.52.136]:29396 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727101AbfDLP5k (ORCPT ); Fri, 12 Apr 2019 11:57:40 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Apr 2019 08:57:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,341,1549958400"; d="scan'208";a="163892722" Received: from black.fi.intel.com (HELO black.fi.intel.com.) ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 12 Apr 2019 08:57:38 -0700 From: Heikki Krogerus To: Ajay Gupta Cc: linux-usb@vger.kernel.org Subject: [RFC PATCH 1/2] i2c: nvidia-gpu: Supply CCGx driver the firmware build information Date: Fri, 12 Apr 2019 18:57:35 +0300 Message-Id: <20190412155736.17274-2-heikki.krogerus@linux.intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190412155736.17274-1-heikki.krogerus@linux.intel.com> References: <20190412155736.17274-1-heikki.krogerus@linux.intel.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Adding device property "ccgx,firmware-build" for the CCGx device, so the CCGx driver knows the which firmware build it needs to be dealing with. Signed-off-by: Heikki Krogerus --- drivers/i2c/busses/i2c-nvidia-gpu.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c index 4e67d5ed480e..5604323ee0b9 100644 --- a/drivers/i2c/busses/i2c-nvidia-gpu.c +++ b/drivers/i2c/busses/i2c-nvidia-gpu.c @@ -253,6 +253,11 @@ static const struct pci_device_id gpu_i2c_ids[] = { }; MODULE_DEVICE_TABLE(pci, gpu_i2c_ids); +static const struct property_entry ccgx_props[] = { + PROPERTY_ENTRY_U16("ccgx,firmware-build", 0x766e), + { } +}; + static int gpu_populate_client(struct gpu_i2c_dev *i2cd, int irq) { struct i2c_client *ccgx_client; @@ -267,6 +272,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;