Message ID | 20221024074128.1113554-8-waynec@nvidia.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp307357wru; Mon, 24 Oct 2022 00:44:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4ieFFgvLKxqKLDwNOy0Ly86Vf2LagFZR5WzTzV17MOAVgXggmPdHltJqaQsnn4eFbRAI5Y X-Received: by 2002:a63:6e81:0:b0:46e:9fda:21a8 with SMTP id j123-20020a636e81000000b0046e9fda21a8mr18023682pgc.30.1666597484134; Mon, 24 Oct 2022 00:44:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1666597484; cv=pass; d=google.com; s=arc-20160816; b=ZvNPy5hYTQieUuDk+Bi6MObllFqob7374qfVjYbP/XAwZ3BkrbMyG70NCdpF7Q6lig PdwBg1EmtTYc3gkvaDFpaoxaTU+zrj0+Jd9rp/bWqUY/9zWmfONmXUiA6N9I0JaoWBsZ A9VcjphGKXAqcAFJQoVmoaLB0Iw87XPPTmyLT5bDRdpPCA7VixOEVO+vfUWOy9CbHjfd jKq6nq8Alq2xyFGpitKfoLGQ1rNwjtgRpC4OeIGEjQfpD0H98Z7DUSCGiD3VYtQb+SXX zwgF6cW+yfP3Xk+yH4rzMO+4bbjGrYpcEtZ7w5KNtiKd5JYOvKCvuFrn6U2chL5t7dax MLNg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TcBLF/mq2RZ/H9uP6zpacL5O9ahpQcoGYxQCfS4Y3W0=; b=UDM2C8Ak9WVTbymcCVxNz2O9je9VK0Iz4LogYQm7l9DxBPJT5Tzh40mU5Yzp7J+QN1 cFmqHY858vlDFhLE8OAmxnqqzh5ioAwKuTZhsj4ZQguQBhri8zthblcYo4VWjh9gZkgT tyrE5BQLS2R53LJ2QyK8WtxgPjqaVClL4r98y/l1IZTbvJgGEvsTTjYQ55llITZbfidb bsGqHafUpFXcyTgO7dvrHEmqqAuS5SIiISUqXFDwsQu2lflxynUZoXbplme7chUmjQE5 UYGSLkrejPv5TfVBALkOmTmn7zSd/dYWUC3OELH5KL5xoaMKtUG5XIXf0sE80VOWaMua mQpw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=Vuy472l7; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q13-20020a17090311cd00b00172f8a4b3e1si38197032plh.81.2022.10.24.00.44.31; Mon, 24 Oct 2022 00:44:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=Vuy472l7; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230064AbiJXHmn (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Mon, 24 Oct 2022 03:42:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229961AbiJXHmU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 24 Oct 2022 03:42:20 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2058.outbound.protection.outlook.com [40.107.93.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69E6460EA1; Mon, 24 Oct 2022 00:42:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VXt552mDWxAU7NCkMZyfwVTVFMC7WEIXYK1ImOkdw9u+OSsZdgb6RGek3x0iXn1j60HisMytygPcBQ7+wpL+QHoXwz2tbJbsU/FgNHpeV4xsiahxxHcKTmd5LCfRuxp499+fs+hIUcSJl6zA25WvPtNH0Yh3phb+otYwUzgebjr2Gpc4RAoW0ZiPwwICDysrncNULVp1e2+A3nTB5knfscIeSp0FqO8TOcr/44+Q2bg6CjJK27xif5lc5f2oiO1L0Rjb2DU/FZ96rRI6wDYXzSf1vxaNZ4T6MDUCt81AMNDP7Cu76+eIjeG+n2J9mIKqniSN8l5tVOanf+BonZgBQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TcBLF/mq2RZ/H9uP6zpacL5O9ahpQcoGYxQCfS4Y3W0=; b=DjtJ8w9+1Qn6VG/KaOsBYG47PTGxrs/HTJfLBKa+wgcGNH+AqU5/zA8p6nT5/QkVxYDeMLLmylfEzPgElTB75dTurDkNx2jfPAYFElAL5XaosrcR6dUaPInzfKY+A3M/mRVqcyT2oR4Vy7chcXGdSlhkF8b0Bgm5/xscbgVB6SwBPfi6+NYomE+i5wziAKf46YImYe5mFeQNTbHt7ZkyrQfbcgp4DGYi3A0P3jZJ+GkSNF0z8xAOQuG9vT8uR4wiQCbGzhoO/FYwfsh5jRi9PD8RTQnV8+uvJA1/FsIdVlO8AFuZ15NhZgsi5M3hN8GCih4ys2Fp7A1YN9iewNvKpQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=linuxfoundation.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TcBLF/mq2RZ/H9uP6zpacL5O9ahpQcoGYxQCfS4Y3W0=; b=Vuy472l7svX9No3w1Hoj/mPjmwvmFPk994IfQ7cEr5lYr7lAmkfdXBdf2uqom1kUH4s01f0KtF7UB5BOPcLP9vNJyhGj6gw6nAsYRbxSAFA3cPbJF5s2bc/qmMY3T3L1ZI8H2NAdPp3yGG5QMIkxcnDhE1gkZEWXmZdxKdECxHToxVNezUN5ozuWsEXAt1lzFzG5ETXL/O7Eo5V7P/gsh2mIhTVDBmuA8BSp1Iaee6m2J+JM5jG+CqH817pgLvIMmXRlLU5/q3BjmzXp6pxUcK4KZBAisB9WovGg9UGxPiXA8wMICj7IX7If8f4SkcHWz/jaXd3hiRRXRStYghi8ng== Received: from DS7PR03CA0163.namprd03.prod.outlook.com (2603:10b6:5:3b2::18) by CH2PR12MB4199.namprd12.prod.outlook.com (2603:10b6:610:a7::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Mon, 24 Oct 2022 07:42:10 +0000 Received: from DM6NAM11FT087.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b2:cafe::50) by DS7PR03CA0163.outlook.office365.com (2603:10b6:5:3b2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.26 via Frontend Transport; Mon, 24 Oct 2022 07:42:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by DM6NAM11FT087.mail.protection.outlook.com (10.13.172.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16 via Frontend Transport; Mon, 24 Oct 2022 07:42:10 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Mon, 24 Oct 2022 00:42:03 -0700 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Mon, 24 Oct 2022 00:42:02 -0700 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.29 via Frontend Transport; Mon, 24 Oct 2022 00:41:59 -0700 From: Wayne Chang <waynec@nvidia.com> To: <gregkh@linuxfoundation.org>, <robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>, <treding@nvidia.com>, <jonathanh@nvidia.com>, <thierry.reding@gmail.com>, <heikki.krogerus@linux.intel.com>, <ajayg@nvidia.com>, <kishon@ti.com>, <vkoul@kernel.org>, <p.zabel@pengutronix.de>, <balbi@kernel.org>, <mathias.nyman@intel.com>, <jckuo@nvidia.com> CC: <waynec@nvidia.com>, <linux-usb@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <singhanc@nvidia.com>, <linux-i2c@vger.kernel.org>, <linux-phy@lists.infradead.org>, <linux-tegra@vger.kernel.org> Subject: [PATCH 07/11] i2c: nvidia-gpu: Replace ccgx to well-known regex Date: Mon, 24 Oct 2022 15:41:24 +0800 Message-ID: <20221024074128.1113554-8-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221024074128.1113554-1-waynec@nvidia.com> References: <20221024074128.1113554-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT087:EE_|CH2PR12MB4199:EE_ X-MS-Office365-Filtering-Correlation-Id: 821a76a5-297f-4167-afd3-08dab593422d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: awsvsxhX3GX0baoJMZfFpPwrQe0P3DTdUEESirzhPYV8PnxkUoSIVEWT6a+3eEYXQ7YU6KpWbOAcFI/Yog0mLJ2QmulK6GFjjXRdO6/YWkABf57DlnPC4rv7h0p0dxQF20y6tU4Clvyd3BPCQXRd5Tuyei+jY6iXyZuhoswwzpkvHaYQUdfrLrT/m3OnKA05/nwU5njEErPzkRfRIJhLvZBABUutkbbcYvLzbDt5H19NhXXUp14qkuemgWo2z9gzffjekMkBTsqEGUI2jovG480Mp5cHBOxnSHolyyFA+8QOZnRv1QcOjjnQ+pAJJhsg53gbqvGQc0K0lQnlHAeRygwHTP0ydNJWPxrbHqbSm10Gj0aq6TWDy3XpB1dj/nO2qTHiDswz/dN0hFreyGojRZQ9P1ttLuFsN6YAEgraEwKHZ92RmEisI6lUqb6UM9MxDEXoyfRj9TG3SLO+tgRSkXugjKlGDasPssuuFRs04oiHLpiKCLDjWbYJkTTUy/hKi/HCEqsj/33/+nnBod5UDwR0C59rcBEXPUNCNlWeWgW5olBoqpy7rN+B4xpI8hk1Ea0GtfFQZCZ8mKNaWoir3RRLzO2SIukWzQ+OJiMq3kDAD52VcCImVwwXrXHItwKq7xTzfqAFw7Os6riEKRXIs8tRMmSEFEKqSRNhmwTaGNKLyfyJ9qNYTt+LItHm15EpUTXzfMRLUA8usR1mxdI+lxQ/fnL3IaT10nLtJzMwaObOAeqJ+b9Kqe54VFyZ8PVfALpKhPPb0yUkhoslvfn8qYoQAbChKee+n9odnx1fTok= X-Forefront-Antispam-Report: CIP:216.228.118.233;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge2.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(346002)(136003)(376002)(396003)(39860400002)(451199015)(46966006)(36840700001)(40470700004)(6666004)(2616005)(26005)(7696005)(1076003)(36860700001)(426003)(47076005)(336012)(186003)(83380400001)(4744005)(2906002)(7416002)(40480700001)(40460700003)(82310400005)(6636002)(54906003)(110136005)(316002)(478600001)(41300700001)(5660300002)(8936002)(70206006)(70586007)(4326008)(8676002)(86362001)(36756003)(82740400003)(921005)(7636003)(356005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2022 07:42:10.0050 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 821a76a5-297f-4167-afd3-08dab593422d X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.233];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT087.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4199 X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747554123427025619?= X-GMAIL-MSGID: =?utf-8?q?1747554123427025619?= |
Series |
Enable USB host and device functions on Jetson
|
|
Commit Message
Wayne Chang
Oct. 24, 2022, 7:41 a.m. UTC
ccgx is refer to the cypress cypd4226 typec controller.
Replace ccgx to well-known regex "cypress".
Signed-off-by: Wayne Chang <waynec@nvidia.com>
---
drivers/i2c/busses/i2c-nvidia-gpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 24/10/2022 08:41, Wayne Chang wrote: > ccgx is refer to the cypress cypd4226 typec controller. > Replace ccgx to well-known regex "cypress". > > Signed-off-by: Wayne Chang <waynec@nvidia.com> > --- > drivers/i2c/busses/i2c-nvidia-gpu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c > index 12e330cd7635..0934f8ad7f49 100644 > --- a/drivers/i2c/busses/i2c-nvidia-gpu.c > +++ b/drivers/i2c/busses/i2c-nvidia-gpu.c > @@ -260,7 +260,7 @@ 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'), > + PROPERTY_ENTRY_U16("cypress,firmware-build", ('n' << 8) | 'v'), > { } > }; > Could we change this to be PROPERTY_ENTRY_STRING instead of PROPERTY_ENTRY_U16? The benefit of this would be to allow us to use a proper string identifier in device-tree for the Tegra devices which is more flexible and descriptive. So given that this is for NVIDIA GPUs, we could simply make this ... PROPERTY_ENTRY_STRING("cypress,firmware-build", "nvidia,gpu"), Then in the ucsi_ccg.c driver, when we read the device property "cypress,firmware-build", if it is 'nvidia,gpu' then we set the uc->fw_build variable to CCG_FW_BUILD_NVIDIA. Jon
On 11/1/22 23:07, Jon Hunter wrote: > > On 24/10/2022 08:41, Wayne Chang wrote: >> ccgx is refer to the cypress cypd4226 typec controller. >> Replace ccgx to well-known regex "cypress". >> >> Signed-off-by: Wayne Chang <waynec@nvidia.com> >> --- >> drivers/i2c/busses/i2c-nvidia-gpu.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c >> b/drivers/i2c/busses/i2c-nvidia-gpu.c >> index 12e330cd7635..0934f8ad7f49 100644 >> --- a/drivers/i2c/busses/i2c-nvidia-gpu.c >> +++ b/drivers/i2c/busses/i2c-nvidia-gpu.c >> @@ -260,7 +260,7 @@ 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'), >> + PROPERTY_ENTRY_U16("cypress,firmware-build", ('n' << 8) | 'v'), >> { } >> }; > > > Could we change this to be PROPERTY_ENTRY_STRING instead of > PROPERTY_ENTRY_U16? The benefit of this would be to allow us to use a > proper string identifier in device-tree for the Tegra devices which is > more flexible and descriptive. > > So given that this is for NVIDIA GPUs, we could simply make this ... > > PROPERTY_ENTRY_STRING("cypress,firmware-build", "nvidia,gpu"), > > Then in the ucsi_ccg.c driver, when we read the device property > "cypress,firmware-build", if it is 'nvidia,gpu' then we set the > uc->fw_build variable to CCG_FW_BUILD_NVIDIA. > Yes, it should be nice to have the change. Thanks for the review. I'll make the changes and using string instead of u16 in the next patch series. thanks, Wayne. > Jon >
diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c index 12e330cd7635..0934f8ad7f49 100644 --- a/drivers/i2c/busses/i2c-nvidia-gpu.c +++ b/drivers/i2c/busses/i2c-nvidia-gpu.c @@ -260,7 +260,7 @@ 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'), + PROPERTY_ENTRY_U16("cypress,firmware-build", ('n' << 8) | 'v'), { } };