From patchwork Tue Apr 16 17:27:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Gupta X-Patchwork-Id: 10903577 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 00B5614DB for ; Tue, 16 Apr 2019 17:28:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D8DF428820 for ; Tue, 16 Apr 2019 17:28:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD37328832; Tue, 16 Apr 2019 17:28:29 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 70484289E8 for ; Tue, 16 Apr 2019 17:28:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729237AbfDPR22 (ORCPT ); Tue, 16 Apr 2019 13:28:28 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:35863 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726860AbfDPR22 (ORCPT ); Tue, 16 Apr 2019 13:28:28 -0400 Received: by mail-pl1-f194.google.com with SMTP id ck15so10685612plb.3 for ; Tue, 16 Apr 2019 10:28:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=q7FMFBEQHyRZF1P2ORkHPWGjoTYCtNVGdWU6Cx1wWAI=; b=JXNH2KXYtgwf099tvCAIg+vnVjQTiJNwlXfwbGTm9oMnWLSvMWuenw/SD3oGN+t03k 7wuqDOIPZimrOqO7XBiapiXWm82xAMvugUna+Ck/h2yr4TFbaD2Yqb/3dR1K+ejW68pM MfcTy+gPgQPZTimeDshzE+8tCDp0Aw9S1a8QfKD76w/q3InwaSJNAqmJhR4tewjycwS1 8g3tIPI61OX+C+6nJybVg9L4J19nB+Jm2gxJJOkNJKqMCSTnpgqzKVV5c03xtaIX03HG ceBf72motjJiUa3enPAfjiko0GG54q5P3CkIIuozpFPBVj2i9Z0ZJaJlkDS6tHjhx5xv fxZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=q7FMFBEQHyRZF1P2ORkHPWGjoTYCtNVGdWU6Cx1wWAI=; b=VLU3WV83fbs+M5rVwc2KhMETexyH4SJIFsU295Tk8SCa+5E0v4Wd0EZrQ5ZK0ONyCt Ar8NIPucNDZQ1w/9tJ60yurtWG5bIJsSOEFOU32K07UmO9Au1JuxSrG/LfL4GVf9AKJS nwdVuq6W4/kkk//SBxdBBOBzTua/ldpWSDfoCKtSyrvygeByl5Rl8Kt9XJdSdt23WHJk 4jAdtHsbHh9oaMwuaeyfQ1TMiG7/hzAOifP58vzo5wNQSI6l3HKtqXfPf8sPuljRgWEi gvPzeWHZMswYe5b94YMt63vBLEQOgLTOtML9PTeF20AvJyaq1yVCQ1GNmpX54zk5TrMW Qirw== X-Gm-Message-State: APjAAAWK5ayXvBaLzTZg3jCZnYQcvGCnbreGBKJp3C3pFLOoyEP2DV3v 4YtwBrMaaT6Or8Mm0hzt8Y8= X-Google-Smtp-Source: APXvYqwusxawy//svLli2Yp5A+XoNjBOwP2Td/MVRZXCuHwgru5jXtBq0v47ju6ZJlOgv3Xm7sjxdQ== X-Received: by 2002:a17:902:7c87:: with SMTP id y7mr29144708pll.5.1555435707182; Tue, 16 Apr 2019 10:28:27 -0700 (PDT) Received: from ajayg.nvidia.com (searspoint.nvidia.com. [216.228.112.21]) by smtp.gmail.com with ESMTPSA id k124sm85026233pgc.65.2019.04.16.10.28.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2019 10:28:26 -0700 (PDT) From: Ajay Gupta X-Google-Original-From: Ajay Gupta To: heikki.krogerus@linux.intel.com Cc: linux-usb@vger.kernel.org, Ajay Gupta Subject: [PATCH v8 2/3] i2c: nvidia-gpu: Supply CCGx driver the fw build info Date: Tue, 16 Apr 2019 10:27:46 -0700 Message-Id: <20190416172747.22139-3-ajayg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190416172747.22139-1-ajayg@nvidia.com> References: <20190416172747.22139-1-ajayg@nvidia.com> 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 From: Ajay Gupta 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 Signed-off-by: Ajay Gupta Signed-off-by: Heikki Krogerus --- Changes from v7->v8 - None 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;