Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1413488pxb; Wed, 6 Apr 2022 18:11:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxJNIwCqmxnFTv1CDbuKg9HMvC6mj2oqoY8R6lBA6ksM33TspThl1TmbKYm/50kBF7r4kM X-Received: by 2002:a05:6402:354b:b0:419:4af8:c5c9 with SMTP id f11-20020a056402354b00b004194af8c5c9mr11774086edd.91.1649293919621; Wed, 06 Apr 2022 18:11:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649293919; cv=none; d=google.com; s=arc-20160816; b=tDTpAYjm3Og/dfXyhvfnZxxUHH6PRECylRQgEZIG5PVGjP8CbRXXR9RAeA3s9ftmWp baDWbObjkXAxsGnyUfS6kDo1u3M4iLWfCty/ZCXlBJUiCcu/UKpa7HRlN07rGGrwg2DQ xJ/7OjUHswNF8UhDkbrpkz/YbInWYvQrlyU8M9jdnmtXG0bN0zNFiWuSsXGOgPJOwXrZ VBcBaFG99xeBBUaW+uJ/j2WTdNCo4ro1Y68lV3Y5PoA7taPHOmnNQHwHksG7+uVR2xh5 +3iHMxb7JEGM9kfMVu3xKoCxnOkPDWn5fkUAHFcbSTjvpJVzNiw2eRb4FUtDOyk+7pNc XD9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=24Hc5po1I+oTFy71ZrC6iePaJ8Y76v/H4S/kcfU7sns=; b=pZaGt/+p0yLMc6tZ080O0Ki/Ge4XTnf39eF5thH0lENEfBTqm54FxfEg0SkiFh/PsB uncNOjfhQizbBIbMF3GKfldK46Swl4nRHdi9nuDr97dmmn/AtAMKn5MMQNfPYrHZLGNG P6d3NZAWsuWfGqBSOimNICy+qS//6P4KaRLxUdGTu8WMF9XFxH7BYRT7kmNsjViJ4Kvu J5P2++IP/WJs6PC4yifYXE57ZLI28eccW5q7VL6hRUYcZk1gNAAqLbKGw5bIuSY6FGet 7oSqQJiJkqcpuMZCQQqc2RjgYk0wbKhkhFeP/jTqv7uMLBY2MFrIA1r68BIj8C2c3kRH so0g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c1-20020a50cf01000000b00419b22eddb3si13117930edk.65.2022.04.06.18.11.35; Wed, 06 Apr 2022 18:11:59 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237113AbiDFWKk (ORCPT + 99 others); Wed, 6 Apr 2022 18:10:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236988AbiDFWK3 (ORCPT ); Wed, 6 Apr 2022 18:10:29 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5C9131D12DE; Wed, 6 Apr 2022 15:08:32 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2C1FF12FC; Wed, 6 Apr 2022 15:08:32 -0700 (PDT) Received: from e123648.arm.com (unknown [10.57.9.217]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 38BB83F5A1; Wed, 6 Apr 2022 15:08:30 -0700 (PDT) From: Lukasz Luba To: linux-kernel@vger.kernel.org Cc: lukasz.luba@arm.com, dietmar.eggemann@arm.com, viresh.kumar@linaro.org, rafael@kernel.org, daniel.lezcano@linaro.org, amitk@kernel.org, rui.zhang@intel.com, amit.kachhap@gmail.com, linux-pm@vger.kernel.org Subject: [RFC PATCH v3 3/5] thermal: Add interface to cooling devices to handle governor change Date: Wed, 6 Apr 2022 23:08:07 +0100 Message-Id: <20220406220809.22555-4-lukasz.luba@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220406220809.22555-1-lukasz.luba@arm.com> References: <20220406220809.22555-1-lukasz.luba@arm.com> X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Add interface to cooling devices to handle governor change, to better setup internal needed structures or to cleanup them. This interface is going to be used by thermal governor Intelligent Power Allocation (IPA). which requires to setup monitoring mechanism in the cpufreq cooling devices. Signed-off-by: Lukasz Luba --- include/linux/thermal.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/thermal.h b/include/linux/thermal.h index c314893970b3..baaa84d989bd 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -87,6 +87,7 @@ struct thermal_cooling_device_ops { int (*get_requested_power)(struct thermal_cooling_device *, u32 *); int (*state2power)(struct thermal_cooling_device *, unsigned long, u32 *); int (*power2state)(struct thermal_cooling_device *, u32, unsigned long *); + int (*change_governor)(struct thermal_cooling_device *cdev, bool set); }; struct thermal_cooling_device { -- 2.17.1