From patchwork Tue Jan 29 04:55:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 156912 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp4224370jaa; Mon, 28 Jan 2019 20:55:36 -0800 (PST) X-Google-Smtp-Source: ALg8bN7db+ewJUn+LGwyWHJUZPpN84Wjc/D5R0iAROG3hfL9IstZLPLyr5BHpbjGknkuiLpWYPyI X-Received: by 2002:a63:d450:: with SMTP id i16mr22033627pgj.246.1548737736036; Mon, 28 Jan 2019 20:55:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548737736; cv=none; d=google.com; s=arc-20160816; b=iI/tBh/mf2DO0QshfZEW+yuWP9xb1vKnDy2aJc6Dtnij8CtHgUxGVa9tJtBADOhaZQ jkjUXGA7N6SkkN1PhNUAbOGuj9rJG7Xy9+w7C1wJp8tY7QhF5N1FlnwNfVyYZKnmltEQ D2vn5YW54EKu1F8I4Qb25d+3S9+m8HdD4iZM5XIpHrzFYhV7ikDUBxpfq2XgP6jtnYMY fnBWcAjSqlXKRgyY2/hYsZOvfRwd7P9XuH8bIZM+V6IERT33Fuq3TVvHONq0bOOt6o38 s9j28MM6I4cgZV8BbiaoId+l4BLl5Ajfu71FdVJcAMGBWF3IeR+oiGhlPwWOFLDcWTFp ZpnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=M2SV/8aQjo2L+qxKWqLLEIli4Sge3OFMh4QMcOPhDng=; b=TjlPmp+DirfLymGYpUuKqW0D5I8tTmu6fh2Ko3vDl/wHYmvhEx2tHhuEKTxVxZrkO/ B8mw9W47rUG11Rb7j2EZt5DfDGz2HxB8Qjp8LqrnuIN/ZWD6nwt9jzrKxGHRdJvAHAm7 UgnQtkpMcXXmzLhUJVHufcfXzZL82R8Kis2ItH00sN60X2URBDhhmIw1oZXvr6nQ11qj 9VFAtyfpU4OFpSCJ17sPHY4MHccU3DAZ4NYEJFI2mcBNlH3Zwadj5ywB1CKQzgwXeCpM LWVgt1uTd20t5jKWqjjF3ACRhjKLM4vfFbH8RijE8dNpWlk4G+9GY1j0eu6Yn0f/Zqwo iGMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xi871oKh; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 27si33889948pgu.421.2019.01.28.20.55.35; Mon, 28 Jan 2019 20:55:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xi871oKh; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727032AbfA2Eze (ORCPT + 11 others); Mon, 28 Jan 2019 23:55:34 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:37804 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726832AbfA2Eze (ORCPT ); Mon, 28 Jan 2019 23:55:34 -0500 Received: by mail-wm1-f66.google.com with SMTP id g67so16217642wmd.2 for ; Mon, 28 Jan 2019 20:55:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=M2SV/8aQjo2L+qxKWqLLEIli4Sge3OFMh4QMcOPhDng=; b=Xi871oKhsdq0rrYMC0qEbeeYcMpKRS6M9HYgxIe6nn1J1CuL+vOmEccltrF6leCElw 2CkifFK0rpJimAfXhLmEplx+ceVwPPsbX4rs20txQflEGcetrfZvS19+5IqEtHumjFte oV2WgOGHDnhEftO9wCUO0bo2d0IfhlFfuEUwk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=M2SV/8aQjo2L+qxKWqLLEIli4Sge3OFMh4QMcOPhDng=; b=JrRDY2SoeQ0JFSpCdoYNWAZAxbKa702jru5hN7Z8WedeBHrkTb6s+Ud8yJGnAOUlto E+/9bIHEDBld/ivOFds7+vFsqQ6F+KgROaxtBVCGZCrka9f/oYCoxVtH6Rxs+983UFk1 zA/Q619h2bwwgMpS61VeK7Y5llxnqVzd02P887TEHO4jz7YsLYZLq7EPo9dNOpOWKx+c mFkQvX4Ci/zQrGeFwhj5jbwaU7LHOmWSl+f02/221AQBvPzZLY81x8t7HgxmjMm70o0d bda4Iemua85NyT71zetssMLaigKkWHyIg70racP9SSJmE7bm8UpevlmmklGdPt0P0KQu mLZw== X-Gm-Message-State: AJcUuke6okIdi9Fg+Gt9wyP/ZEqg2T+F9H7kItKbiquyrLhrPd6BSS6h cS6Tw4iGEq8aoiwwxj2xHiScWw== X-Received: by 2002:a1c:e345:: with SMTP id a66mr19092861wmh.12.1548737732549; Mon, 28 Jan 2019 20:55:32 -0800 (PST) Received: from localhost ([49.248.171.30]) by smtp.gmail.com with ESMTPSA id f3sm2032270wmd.22.2019.01.28.20.55.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 20:55:31 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: "Rafael J. Wysocki" , Daniel Lezcano , Eduardo Valentin , Matthias Brugger , Sudeep Holla , Viresh Kumar , Zhang Rui , linux-arm-kernel@lists.infradead.org (moderated list:ARM/Mediatek SoC support), linux-mediatek@lists.infradead.org (moderated list:ARM/Mediatek SoC support), linux-pm@vger.kernel.org (open list:CPU FREQUENCY SCALING FRAMEWORK) Subject: [PATCH v5 0/9] cpufreq: Add flag to auto-register as cooling device Date: Tue, 29 Jan 2019 10:25:06 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add a flag for cpufreq drivers to tell cpufreq core to auto-register themselves as a thermal cooling device. There series converts over all the drivers except arm_big_little.c. Tested on SDM845 with the qcom-cpufreq-hw driver. Only compile-tested the others. Things needing fixing (but not a blocker for the series): - Look at how to detect that we're not in IKS mode in arm_big_little's .ready callback. Changes since v4: - Added IS_ENABLED guards in cpufreq.c - Changed flag name to CPUFREQ_IS_COOLING_DEV - Collected various review tags Changes since v3: - Got rid of wrapper function to register/unregister cooling devices. Directly call the function in cpufreq.c Changes since v2: - Get rid of #ifdef'ery and let the pointer exist in all cases - Get rid of (!CPU_THERMAL || THERMAL) dependency in all cpufreq drivers' Kconfig Changes since v1: - Fix compilation failures with allmodconfig - Get rid of #ifdef in cpufreq.c - Removed miscellaneous patches and sent them separately - Merged patches 1 and 2 from v1 Amit Kucheria (9): thermal: cpu_cooling: Require thermal core to be compiled in cpufreq: Auto-register the driver as a thermal cooling device if asked cpufreq: qcom-hw: Register as a cpufreq cooling device cpufreq: imx6q: Use auto-registration of thermal cooling device cpufreq: cpufreq-dt: Use auto-registration of thermal cooling device cpufreq: mediatek: Use auto-registration of thermal cooling device cpufreq: qoriq: Use auto-registration of thermal cooling device cpufreq: scmi: Use auto-registration of thermal cooling device cpufreq: scpi: Use auto-registration of thermal cooling device drivers/cpufreq/Kconfig | 3 --- drivers/cpufreq/Kconfig.arm | 5 ----- drivers/cpufreq/cpufreq-dt.c | 14 ++------------ drivers/cpufreq/cpufreq.c | 13 +++++++++++++ drivers/cpufreq/imx6q-cpufreq.c | 24 ++---------------------- drivers/cpufreq/mediatek-cpufreq.c | 14 ++------------ drivers/cpufreq/qcom-cpufreq-hw.c | 3 ++- drivers/cpufreq/qoriq-cpufreq.c | 15 ++------------- drivers/cpufreq/scmi-cpufreq.c | 14 ++------------ drivers/cpufreq/scpi-cpufreq.c | 14 ++------------ drivers/thermal/Kconfig | 1 + include/linux/cpufreq.h | 9 +++++++++ 12 files changed, 37 insertions(+), 92 deletions(-) -- 2.17.1 Reviewed-by: Matthias Brugger