From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C26DAC77B7D for ; Wed, 17 May 2023 18:59:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229862AbjEQS67 (ORCPT ); Wed, 17 May 2023 14:58:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229492AbjEQS67 (ORCPT ); Wed, 17 May 2023 14:58:59 -0400 Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 530D1210C; Wed, 17 May 2023 11:58:58 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id A780A320098B; Wed, 17 May 2023 14:58:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 17 May 2023 14:58:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1684349933; x=1684436333; bh=z3 Gk38lPhj5TpICvgGyoH4f3MvgXnScoogZHTKqe8Lc=; b=mlPB5pq+EpAI5ap//G ukxSZPI/MD0kttTqH0Si5mk1LZjWPciePW2idBgAbxkHjaTgIdZjqCQb3KiqCh4w Jk3f2dBK0JenGZ+PiT8KI6F3Cthqew+pLxHejG/qAVCO6syDrUayt9JzYuN59RZz 6MVGJLhnmRVuuoy3m7QuqAKU6iNmLMdtqBtb1P2j6PDzrpKSNIhs3mKMU/aLT7k+ HlAr9/qMAaRb4XkfdFR/EgSxYlT3ArWqaF+RwFp4QltOb3vhu9sTxix6w9R5BhbH f2MGypm2o76VepnWF95LK5CFOjXbooF+oXi8JkMqRbqFwNVsD7q12OQh02pmCk0s hZ5g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1684349933; x=1684436333; bh=z3Gk38lPhj5Tp ICvgGyoH4f3MvgXnScoogZHTKqe8Lc=; b=PSvk1tUWCOc8qMEfusrcVLd5FORgy Oz9VUGVlA5Up27Cb0dpKMjcN0to+GSQlF4uuVvgtUlTGAiOrlAu7+wZ4BeBdWrjS JOP55vmbUvpngvNS2hOeV3kLiiUqvXq8P+vj8NrVMzKSL4QDk5Pl705+PGMgyYoI T8DaGJIi9kRBzjwAFHEo9eJQ4SBB7U6J9UV2oNXyH/vXYogjGe+zHwLqpWOO7NuW Ih9OOVQp/IDeEIP8ExjtJX+ndu3jDk+IMtcEJRaFWtARZH0IMXLsb/gtcPu1k+kC IPJ1wxHaSO00lEi5rn2QHHJGX2yqWQHe9iWk6NpUolEi59MW0d7NDloEA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeeiuddgudefudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefirhgv ghcumffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeehge dvvedvleejuefgtdduudfhkeeltdeihfevjeekjeeuhfdtueefhffgheekteenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhroh grhhdrtghomh X-ME-Proxy: Feedback-ID: i787e41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 17 May 2023 14:58:52 -0400 (EDT) Date: Wed, 17 May 2023 20:58:49 +0200 From: Greg KH To: Andy Shevchenko Cc: Mario Limonciello , heikki.krogerus@linux.intel.com, rafael@kernel.org, ajayg@nvidia.com, linux-i2c@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Evan.Quan@amd.com, Lijo.Lazar@amd.com, Sanket.Goswami@amd.com Subject: Re: [PATCH 2/2] usb: typec: ucsi: Don't create power supplies for dGPUs Message-ID: <2023051742-guiding-footing-3527@gregkh> References: <20230516182541.5836-1-mario.limonciello@amd.com> <20230516182541.5836-3-mario.limonciello@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org On Wed, May 17, 2023 at 08:14:13PM +0300, Andy Shevchenko wrote: > On Tue, May 16, 2023 at 01:25:41PM -0500, Mario Limonciello wrote: > > power_supply_is_system_supplied() checks whether any power > > supplies are present that aren't batteries to decide whether > > the system is running on DC or AC. Downstream drivers use > > this to make performance decisions. > > > > Navi dGPUs include an UCSI function that has been exported > > since commit 17631e8ca2d3 ("i2c: designware: Add driver > > support for AMD NAVI GPU"). > > > > This UCSI function registers a power supply since commit > > 992a60ed0d5e ("usb: typec: ucsi: register with power_supply class") > > but this is not a system power supply. > > > > As the power supply for a dGPU is only for powering devices connected > > to dGPU, create a device property to indicate that the UCSI endpoint > > is only for the scope of `POWER_SUPPLY_SCOPE_DEVICE`. > > ... > > > +static const struct property_entry dgpu_properties[] = { > > + /* USB-C doesn't power the system */ > > + PROPERTY_ENTRY_U8("scope", POWER_SUPPLY_SCOPE_DEVICE), > > + {}, > > Comma is not needed in terminator entry. But it's encouraged!