Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4661141pxv; Tue, 6 Jul 2021 06:23:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeoh82Z8ZLSx7ydGV2UdVxU89u4T1MHaJlTBQ4gOKU22TzDISKhfU5b+OW5zwt/FMabK4X X-Received: by 2002:a17:906:b10e:: with SMTP id u14mr9043321ejy.522.1625577823213; Tue, 06 Jul 2021 06:23:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625577823; cv=none; d=google.com; s=arc-20160816; b=M5ARMQ3psTMd0wzbqRoV0+RVkOR3Nd7q7HftZ8qO+JiTvb+dIiEncjZTxIWs+Lq/Kl 4TRGicJtWQbpJirnbj5UwRYP3Qm5f6NM0EYHih2qy9azDTVzmG/+PkSeUPSv/s6w4aqj j+Hmlef/EBv0hAxss0dzqwyQI0136uXRcpDwsT2qQy7sRgwsuKs8D/TsOIW00oVhYpCS Uv9hflJH5DBdIyqDbavsncucNpTmJqVbc78iSnofTbG3mpjUB1uW5MsgO6jG15rJvrfc A2PcvgNmkzD5sFwCpcpFAYOR7iWMEqU/lx7YUV4ZOCCpctaI2zTBv0f7RXA3EaoGc7Z2 CAaQ== 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=T8uKYAzTSj7VN2e5kRUegPJW3oLJ2UV/d+8Xg4tUbyg=; b=DIbEKTA03V72ksBuhkpUOYt1Aj38HkLJ/4gOAAvCp9zfZYhJQvQj7fDw06qTiszrcD Ms+oB+Fv/GvJ23+3/cvzZk9Bu9fFHx8VZ8MXCjdnAjYp25OLvGQER+E6+nrIvmm6aneX YqlfdjAvcQAbV8wDH8pfYAZ7B921fMqzRPQsCs1yZfSJPISEVdNEOkmPEzoD6QAW/bDK af2lsKMol3TjKlWIJtxoox+cSeiKsPDun+Tm+AKSLC1Q9dofxfr6Jv3gDDbTVY382pA3 dmH0583OHIAI4e1qJTWNMhxVtEq/y7PrMX2rfkgMeX7qM45k/QCpUOwqDKohq88NUcYF gXMg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j22si15428962eds.190.2021.07.06.06.23.18; Tue, 06 Jul 2021 06:23:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231942AbhGFNVd (ORCPT + 99 others); Tue, 6 Jul 2021 09:21:33 -0400 Received: from foss.arm.com ([217.140.110.172]:42164 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231880AbhGFNV2 (ORCPT ); Tue, 6 Jul 2021 09:21:28 -0400 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 918AC1042; Tue, 6 Jul 2021 06:18:49 -0700 (PDT) Received: from e123648.arm.com (unknown [10.57.7.228]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 5F5413F73B; Tue, 6 Jul 2021 06:18:47 -0700 (PDT) From: Lukasz Luba To: linux-kernel@vger.kernel.org, daniel.lezcano@linaro.org Cc: linux-pm@vger.kernel.org, amitk@kernel.org, rui.zhang@intel.com, lukasz.luba@arm.com, dietmar.eggemann@arm.com, Chris.Redpath@arm.com, Beata.Michalska@arm.com, viresh.kumar@linaro.org, rjw@rjwysocki.net, amit.kachhap@gmail.com Subject: [RFC PATCH v2 4/6] thermal: Add interface to cooling devices to handle governor change Date: Tue, 6 Jul 2021 14:18:26 +0100 Message-Id: <20210706131828.22309-5-lukasz.luba@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210706131828.22309-1-lukasz.luba@arm.com> References: <20210706131828.22309-1-lukasz.luba@arm.com> 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 d296f3b88fb9..79c20daaf287 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