Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2492292rwd; Wed, 17 May 2023 10:24:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7m+LwdUWhWoGT+VXuY+wPp/f3w9sCOU4Y0SYQTu6JER2PL0P2qcWsI3HgOdfXtTgPTGH2w X-Received: by 2002:a17:90a:348b:b0:253:4460:e110 with SMTP id p11-20020a17090a348b00b002534460e110mr391374pjb.34.1684344281951; Wed, 17 May 2023 10:24:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684344281; cv=none; d=google.com; s=arc-20160816; b=bnWoUxzN3g658WZZMQkDIuVGRVVfx9QFw29VVtNPCW6w/5HK9fAu8KCW4giEopbBDa m5xlnYmcGaOWzk1uci2efltTXsy9MTPWNl1KftC1O8o/IsWh7fimjy9tA/lk4TlCotfP nT5+jEXdCqRXOepv0q5dQHlBhm2Ew3Vk+S+K/IBCjbW3Sw8u0qiy67EfM6DhuZQdCSY2 c4YY/ElqAQuH5as/zIQleqvXiWeZilJ9YKB0iC2aPAUQH57tR0htdmhS3u8UCxDiiBNf zZczBP9MaGh/7aQN9gGAXmKQAbVm526mfMGPQpspG1bWE/QlWEIJUXaLoFp3xkNMOTs4 rjKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=URmBFZubnM6ZBGn85kRqmkCFA7TjOf6HQnaEc8RWewo=; b=oYCRf7/o5A7Jr71M5eosd/F7/e9cLLNyRDwb2+/aPbvEF/X0+lZU7bN76R9nTspJpx tovfQ4WtyNgi32hiiEKShmJSb/O6ea7gz/Bm3hKj2GpaozD+mzty4TX4V5dDJ2VVLKEo JMBzHmUvkVGHahZE71938g+DTvY8/UVSV0iv0ifyXoXwdimo9VMw/oo2F45juOZLEHgA eYJoLFs4N43Xv1RLnIpr03iWOXDeTmRvFRfHxSdfZAFHYr3iAlEbOXbEsRCr3VXdVfBh p57i+K58JFQ7lGqz8NQl/HiKefmi6sJRNR0ZA/kkQHLWfPcjBMcf5Zwm2RF0IJBURnqp wXvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="UAUhM/Z6"; 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=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w20-20020a63af14000000b00513973cb8b8si21878872pge.202.2023.05.17.10.24.29; Wed, 17 May 2023 10:24:41 -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=@intel.com header.s=Intel header.b="UAUhM/Z6"; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229775AbjEQROW (ORCPT + 99 others); Wed, 17 May 2023 13:14:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229558AbjEQROT (ORCPT ); Wed, 17 May 2023 13:14:19 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 421AA40EF; Wed, 17 May 2023 10:14:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684343658; x=1715879658; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=PIb1m6rDVELZHR03g5Ezh8+AcEOOlpLN1h3VlAWWeEY=; b=UAUhM/Z6kQpsTyCUlPX9ghQeVTQXuq2Qavwgn2+YEze/hKn6BbYpK96M 7P8DlXGnFYmxItN/tMsHY60t505d1XT4HR573MElGK8PuRz+daE1q0cJg 70z06KQDlhQqMEjp9H/E+4KAP3JupMeo1YDr9PYiKLgkIaHw/YogvT3uD tbuWW/pM+m/Od8fvPB+/IG0vdUtf8Ta2d6qMZ1nP77lEPXieQRwvVxHP/ TsKhwbcqAsvisgysyZ2fxcSOhlB9pgKxPebxe6H6tZFTe5D26pAVj+9hy P6FXNQutatKmlwI47oRFtht4qcmNv+IOBK6bv9YUAIc1kBKDt5jqLIEXz A==; X-IronPort-AV: E=McAfee;i="6600,9927,10713"; a="332188768" X-IronPort-AV: E=Sophos;i="5.99,282,1677571200"; d="scan'208";a="332188768" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2023 10:14:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10713"; a="766849105" X-IronPort-AV: E=Sophos;i="5.99,282,1677571200"; d="scan'208";a="766849105" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga008.fm.intel.com with ESMTP; 17 May 2023 10:14:15 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pzKj7-0008Vq-1i; Wed, 17 May 2023 20:14:13 +0300 Date: Wed, 17 May 2023 20:14:13 +0300 From: Andy Shevchenko To: Mario Limonciello Cc: 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: 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: <20230516182541.5836-3-mario.limonciello@amd.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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 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. > +}; -- With Best Regards, Andy Shevchenko