From patchwork Thu Dec 28 10:39:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Di Shen X-Patchwork-Id: 183676 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp1913436dyb; Thu, 28 Dec 2023 02:40:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFNFeZMQFitAlitRHQSYz5rzrwvQ77EQw1YNgvI8MYiOYSke4osvAEImirp5e0Vn24iSBSu X-Received: by 2002:a17:903:25cb:b0:1d3:c730:f0a2 with SMTP id jc11-20020a17090325cb00b001d3c730f0a2mr10289545plb.118.1703760027940; Thu, 28 Dec 2023 02:40:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703760027; cv=none; d=google.com; s=arc-20160816; b=puH5KO7bEo3+E/zi3R7HgAzuj2aoRB+9vUlcWtdPqe8ZnmWMFA+QYwI3yuVNHXc3xd Ak0d92EXQWSmFI/4pG6qXLKcDkW026FVFS9onj5lv5IKXOcfQ2ewk8dKdGuDfZA/NHKq IKZhd8ZyRERIpisMFohUQBkie/wG1k9L4OUfreIr962uXf5lndCmeIzXAyZB6401nRqf wa4cZuPCZPN8z6izsuQE7hAFt2/szaN8H73Ma9jJtTCobCxtXtJP5mNu2Mmqbf+RDtYh 6t+zuQSB8iUJRAVTeBmarJIErsz32tvZczA7P4kkyBJ4kvanom9DKf6C9K+BGtmX/3cI K0xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from; bh=bktDUG/D07vuuL173ONeqQ1B/PpklyLbzY/K1skPWcE=; fh=aLPzjPdwYyWFtLpSmpveeA1GBNZusoJdpdlWIU9M4kY=; b=y6bsbujB++ovgllPitRf2ufo1WZysNRpBDpcyDXxgIwgTTFBdykcfAdppIWrAOYKRC G5XwXIsg89FxEil+xOKAJ5qFs7RvfINDcrA7zJ+SICsRKWiZHX1GjdgBchGIXMImK5hU wKFfRBrIeKkpewarahvKHyaDq/sJxw0eZY/x4xsOnmVzIm51eRCjwNAqrrNw+UKkjvK4 aBQYPtAdPbNqRq8K3yUaU+Qm7W1pXQ44uv+lZc6uF6kBqmDlDgGMLQzOh6gl9trWhh/P D64sAytTIso7jMkNaxaQ/0y8PX+sATuDYfEu+33tGLuKOftldUzLDp2ROAqGYWReBptX Xf5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-12570-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12570-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id az1-20020a170902a58100b001d46b53d0b8si4820373plb.585.2023.12.28.02.40.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 02:40:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12570-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-12570-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12570-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1A52028200C for ; Thu, 28 Dec 2023 10:40:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E189A6FB4; Thu, 28 Dec 2023 10:39:55 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from SHSQR01.spreadtrum.com (mx1.unisoc.com [222.66.158.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7F3D6AA2; Thu, 28 Dec 2023 10:39:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=unisoc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=unisoc.com Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 3BSAdRon039450; Thu, 28 Dec 2023 18:39:27 +0800 (+08) (envelope-from Di.Shen@unisoc.com) Received: from SHDLP.spreadtrum.com (bjmbx01.spreadtrum.com [10.0.64.7]) by dlp.unisoc.com (SkyGuard) with ESMTPS id 4T14bD0bQHz2QnGWT; Thu, 28 Dec 2023 18:32:56 +0800 (CST) Received: from bj10906pcu1.spreadtrum.com (10.0.73.72) by BJMBX01.spreadtrum.com (10.0.64.7) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Thu, 28 Dec 2023 18:39:25 +0800 From: Di Shen To: , , , CC: , , , , Subject: [PATCH] thermal: core: export the governor register related API Date: Thu, 28 Dec 2023 18:39:21 +0800 Message-ID: <20231228103921.23839-1-di.shen@unisoc.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To BJMBX01.spreadtrum.com (10.0.64.7) X-MAIL: SHSQR01.spreadtrum.com 3BSAdRon039450 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786521874834916512 X-GMAIL-MSGID: 1786521874834916512 To enable users to register their own thermal governor, this patch exports thermal_register_governor() and thermal_unregister_governor(). This change would not affect the registration of the default governor. Signed-off-by: Di Shen --- drivers/thermal/thermal_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 9c17d35ccbbd..56695988e20f 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -167,6 +167,7 @@ int thermal_register_governor(struct thermal_governor *governor) return err; } +EXPORT_SYMBOL_GPL(thermal_register_governor); void thermal_unregister_governor(struct thermal_governor *governor) { @@ -193,6 +194,7 @@ void thermal_unregister_governor(struct thermal_governor *governor) exit: mutex_unlock(&thermal_governor_lock); } +EXPORT_SYMBOL_GPL(thermal_unregister_governor); int thermal_zone_device_set_policy(struct thermal_zone_device *tz, char *policy)