Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8654503rwb; Thu, 24 Nov 2022 02:30:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf4u44HC3HfnbjCH7o9ySpFnREvl7Vz43CUpTCDUzTdsde51NfnHcfzGHjYlzoC2W3VzVb2Z X-Received: by 2002:a17:906:16d4:b0:7b9:f0fd:47b1 with SMTP id t20-20020a17090616d400b007b9f0fd47b1mr5747088ejd.462.1669285811392; Thu, 24 Nov 2022 02:30:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669285811; cv=none; d=google.com; s=arc-20160816; b=NdwZBdQdhUkbN3+Vn7m6Khr9qUaUPDS0j8LfQI2vWzBC90XByJ2KFQxgC2PC/vs+Cu DO7FBXeokLGXn1l05qbjFdDj3HbhYJbWkk6sLKvxtHb34X7uxbFaVJjjw4CRXi12zk5o xeHPqpol57etrhNO5fOPKQ+C/EWQaZ26ar1+fmHgP7rKsnl1zyBCHUuy3h4XqiPivz1C BvXPl4WjGc6LRKFWptNutFl+ZUKYvcz26hky5MbtOWo1QsMak72dCFYo50/pVnqJC+wo KkXXb3TnY6HOXfUEwR9ZkYTitA2ESsGK3P5r1GbBd2ZbS9YB5iPOQaukOLS0SZ9mg2Lv WKKw== 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:dkim-signature; bh=hJLhzMDsGWh14Xw+8CMBj2+wwXICBX2Bp09Aunc0HCo=; b=KNXIqfgUCyHCEGrU3yJ4WFd44gBcpU/7k+OmhsthjZXGhNq7sRRM8U52F2w5Ol/v/1 hEiurkYGljlRQ0fdSyCw1rZAIHywGEfIMlqPgR9doJ5tSAAhjRK/JlNoQEH3hOBd6jB/ BZQYhhDB3j24ngFyr9SScllxaWEqFDu5/LCfmshzIzhQFV/TpRlzhuc5WalBpGbeYi/G ciEBScQXr52yXDXE9ka2sCc7zMPv0AAmJhspoFcB1hv0LpwfVTnoijpe7BQOuR/hayx4 odircBcUh12jYrvjh3S46TT9tFtRHO62lxSBElMrPKWLQSbugGwpZsjd/X/2VgNhcgem EOxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=2E+qU7gb; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hq28-20020a1709073f1c00b0077156c9124esi624352ejc.1001.2022.11.24.02.29.48; Thu, 24 Nov 2022 02:30:11 -0800 (PST) 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=@microchip.com header.s=mchp header.b=2E+qU7gb; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229641AbiKXJ2c (ORCPT + 87 others); Thu, 24 Nov 2022 04:28:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229499AbiKXJ2a (ORCPT ); Thu, 24 Nov 2022 04:28:30 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A224113FD5; Thu, 24 Nov 2022 01:28:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1669282109; x=1700818109; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=LUokDyXQ5ExiyeCZJMF66xAlop2/Sr5qt8SvDLkcOLk=; b=2E+qU7gbfypE92ibb4KvDO5BIKrZZlkpVs9Ko0j1snPTOhRaViw5nQM9 11KSICkY3Qi+Gu9JjXI70UWTLBdKhrDEuZ7ADhy6DI5qxhoC3msV5bnMn 713SzMJoatAI1sph/nHMbf0DO4d5kbwAqa8l1g56SKp3u8z6Vy61mMVyw fXNyE4RXfXPVj525oD7Tob5Z4F3GPLzAfgSj5xXvDaLqis1wijyasbVc+ 2GjVoB8+NQGvSGF8s4Tb/abJBgv+V+WmObbnKNbbc2BrFtUZa7ZLlNzlX 4lJZcSSaTaTI2TC1ZNMA0o6UzrbJAW0fPIX3i6rcwf4fi6jmxSMd/x8n0 g==; X-IronPort-AV: E=Sophos;i="5.96,190,1665471600"; d="scan'208";a="124924007" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 24 Nov 2022 02:28:28 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 24 Nov 2022 02:28:26 -0700 Received: from wendy (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12 via Frontend Transport; Thu, 24 Nov 2022 02:28:25 -0700 Date: Thu, 24 Nov 2022 09:28:07 +0000 From: Conor Dooley To: Walker Chen CC: Emil Renner Berthing , , , , Rob Herring , Krzysztof Kozlowski , "Rafael J . Wysocki" , Subject: Re: [PATCH v1 3/4] soc: starfive: Add StarFive JH71XX pmu driver Message-ID: References: <20221118133216.17037-1-walker.chen@starfivetech.com> <20221118133216.17037-4-walker.chen@starfivetech.com> <6303c341-a691-fd52-2861-74e9d3ea09c9@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <6303c341-a691-fd52-2861-74e9d3ea09c9@starfivetech.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS 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 Hey Walker, Just jumping in here... On Thu, Nov 24, 2022 at 05:08:57PM +0800, Walker Chen wrote: > On 2022/11/19 2:31, Emil Renner Berthing wrote: > > On Fri, 18 Nov 2022 at 14:35, Walker Chen wrote: > >> diff --git a/include/soc/starfive/pm_domains.h b/include/soc/starfive/pm_domains.h > >> new file mode 100644 > >> index 000000000000..a20e28e9baf3 > >> --- /dev/null > >> +++ b/include/soc/starfive/pm_domains.h > >> @@ -0,0 +1,15 @@ > >> +/* SPDX-License-Identifier: GPL-2.0 */ > >> +/* > >> + * Copyright (C) 2022 StarFive Technology Co., Ltd. > >> + * Author: Walker Chen > >> + */ > >> + > >> +#ifndef __SOC_STARFIVE_PMDOMAINS_H__ > >> +#define __SOC_STARFIVE_PMDOMAINS_H__ > >> + > >> +#include > >> + > >> +void starfive_pmu_hw_event_turn_on(u32 mask); > >> +void starfive_pmu_hw_event_turn_off(u32 mask); > >> + > >> +#endif /* __SOC_STARFIVE_PMDOMAINS_H__ */ > > > > The header and functions within are named very generic, but > > implemented by the jh71xx-specific driver. > > > > Also who should use this header? These functions are never called by > > anything in this series. > > These two functions will be used by the GPU module. Only the power-off > of the GPU is not controlled by the software through PMU module. So > here the functions are needed to export. ...the general policy is to avoid adding things without users. I think they should be kept as static functions for now & when your GPU driver is being upstreamed you can expose these functions. That way your usage of them can be reviewed with the appropriate context. Thanks, Conor.