Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2649087rwd; Wed, 17 May 2023 12:25:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4puArnESWjBU/TW37XzrC480/akdbqOSmkg4rpHYwlZ4spJcgS9vbfXveda6J5ZTf6T3m2 X-Received: by 2002:a05:6a20:4293:b0:104:b7b4:e044 with SMTP id o19-20020a056a20429300b00104b7b4e044mr12876801pzj.48.1684351548711; Wed, 17 May 2023 12:25:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684351548; cv=none; d=google.com; s=arc-20160816; b=SHMuA7FTQJqMN+DvcDiFv6Hb779e5DaMVEXnhY3hUTGQDn83mOYi1UZMGp8XzHhDuN JRCBYo89NdY7fhI7KC5JZEY0AiZtA5Dlh2hBfhtsn3mjmFtw/pcGBElQ+lNN3nNkp3G4 cEJeOgSy6+dvYObxvHX64d9g2zENCkeqGc8MNjjBBeRXNRLZAdZAS9fM7zetxvJzNUxD tfe8FpKbRq0tugjeGE+yDssM85KuWWnjIfK2B9dv0P5zEYr5QhVtTIoxPdGswXleMINz fHuyGdp62gXy/24jCTsez5QCPFXeIG3p3IiOpHecctdv8DSzexZUxW2OoWj8me+ugko7 pjeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature:dkim-signature; bh=z3Gk38lPhj5TpICvgGyoH4f3MvgXnScoogZHTKqe8Lc=; b=khmoiwUmcg3sIGCh/3CJWnlufoLg0cUqAmho3o6KcRFmVp/y0HJgXF2yjhluU21dmG eMx7XgVkwzFZ0DpxYGEOANK8WgwYzDHhvwTJBcVooIPfN7hgIII3JsZByonqD+3Q4MY+ G7rxuDBCWWNkHm5gQTmaNl9Q2/HJqlBOW9frmk+R23hrNVUaX0W343EgoBePJj/A89Wx TjdAKv3NBtl9FZk6qRwsW+I4qsYRJfm7tTx1UOZqiiziE/Wcp3BeoeDNITvz3gTH36JX tcQ2IiCXFZyZsx0F1tYrUINnEUysUmZ3eNYTGLpxBrGaN6AZ92tIHvTpk3xbOrU2lrEV iK+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kroah.com header.s=fm1 header.b=mlPB5pq+; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=PSvk1tUW; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x15-20020aa78f0f000000b0063b88f52220si22916514pfr.144.2023.05.17.12.25.35; Wed, 17 May 2023 12:25:48 -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=@kroah.com header.s=fm1 header.b=mlPB5pq+; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=PSvk1tUW; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229877AbjEQS7A (ORCPT + 99 others); Wed, 17 May 2023 14:59:00 -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: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham 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: X-Mailing-List: linux-kernel@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!