From patchwork Mon Jan 14 16:34:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 155550 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3856687jaa; Mon, 14 Jan 2019 08:35:24 -0800 (PST) X-Google-Smtp-Source: ALg8bN4FdSgdEUIsZPWMB56YWftQbupxOklc9QN35sgSpD6iAGrRK/SUP26kZf6SYIsFgRmpVXGY X-Received: by 2002:a62:1a44:: with SMTP id a65mr26647907pfa.30.1547483724928; Mon, 14 Jan 2019 08:35:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547483724; cv=none; d=google.com; s=arc-20160816; b=hCVMsQc7Bxu32vDe8bpv4gvKfgWQrQlQiNRtTFEljfyNG4i8eShpbvf3j+SGYP/1/m qQPnP2zUxqUmto+BcwuYn9sVx0KLjFsuYciik2kB7wXG0Vteym+q6ZX0FZz+G3Ge1H7I poihZz76XgD/ufeR2crhJVlg4WuL6qou5RdpY+KGIGs6BmNv6j/dSwbLLsRaAyma769H alfSZ9Pf8xhCT83G+gt1qSHeIi7d9OV9QIWuBrTiKfNlF2596twefYqhBAvOeYQa9EGO v0u+CbKLwkpu720gS1wHi95UySDk44csebyMYGeIuqJ9y3v84i/dqFshWzxE8csDEfyT i9PA== 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=fpr0EFghkVyQH0EiyG1VDE5LspytkbV2ayoT+IrLjlk=; b=Kspj19LGtVWREiBNhC+Mfr3mmxZfFPUJKATABMPri7U8qqH16BIVZddcIoiII1b9ex eh2ttZWUPR1zmTRVuRS1twleT7avCmQ7KQ7GCb6ejBZwLK1tp0VSNiyQF65bAupotjiM 9A2VgTEdmVKd4JenyCRY/6Fw522Z7tOzPDT0LZYnUOkbnB21NNeosNiwdKoyybzwAZNj MZjZ1kzLcj8My2Mv0q4Wbq2K0BIe6WA2S2AHM1L4hGEcZMVsm0MzO1qA8id/aE4bVgd0 OjAgzGimQMZnIxu2ELY1RM6D9JlyZNuEQQFhYjN82yWjUzGl7HQyFHqGJRYpZ1jSFz8W wiUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Xt/1jw4w"; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 73si834922pfm.50.2019.01.14.08.35.24; Mon, 14 Jan 2019 08:35:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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="Xt/1jw4w"; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1726724AbfANQfY (ORCPT + 15 others); Mon, 14 Jan 2019 11:35:24 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:46175 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbfANQfX (ORCPT ); Mon, 14 Jan 2019 11:35:23 -0500 Received: by mail-wr1-f65.google.com with SMTP id l9so23584389wrt.13 for ; Mon, 14 Jan 2019 08:35:22 -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=fpr0EFghkVyQH0EiyG1VDE5LspytkbV2ayoT+IrLjlk=; b=Xt/1jw4waa3lxjlieWv0tTk3gDceBhD3HUc7luQtVdqZVtK0ir4846YNAijauV6u+F wH3v0lRb/1OC+duPFMPoVhmthEhaqmlHb6Tm57SIAEX0kyeb4SDmrGHFQe5BGeyxZ+1J s8yn8lxne1kmnT2AUdV+GDk0CxDaUKMnuyYCE= 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=fpr0EFghkVyQH0EiyG1VDE5LspytkbV2ayoT+IrLjlk=; b=gnqqI3zt3kXq3+W1lldfRlE6Qj7ine+XeH9v5LeRICem72+WvGkYqn99woqxa/vrEz g+I54EgZm2Sj60vYojnWTT8xyWNwlGoHpFuMl/bWg3Rma23e3QxrJR40KnICvR15YTxS Lfw/KLqgOdstFZBOo0PAhU/Y63TlD2FiwZ5GaVo3F/FYq37cfdrFzgnXhBVC2xJ0KEkX IS3Z3TbVZJItjNkqMGrH/h+jDAnPozHykaIH8Qj2aqqiENg7pf/as5+nYqFBK0QigoM+ 4Bq9eup2PPIB2+VbRGcz0mOGlAzVeoVQa+08W8lOcjl9ojIXuMqQrKVQaAQSsF7hTy/r l9aw== X-Gm-Message-State: AJcUukdGVYOklruAQuchcjVTodUav8ZypRM+LMi4vqHX1MUnTAVvxEo3 FtKUkU296ojs8BGT+/W6be1QAQ== X-Received: by 2002:adf:e54a:: with SMTP id z10mr24266430wrm.238.1547483721699; Mon, 14 Jan 2019 08:35:21 -0800 (PST) Received: from localhost ([49.248.190.171]) by smtp.gmail.com with ESMTPSA id h17sm70337170wrt.59.2019.01.14.08.35.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 08:35:20 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, viresh.kumar@linaro.org, edubezval@gmail.com, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, "Rafael J. Wysocki" , Matthias Brugger , Sudeep Holla , 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 DRIVERS) Subject: [PATCH v1 00/10] cpufreq: Add flag to auto-register as cooling device Date: Mon, 14 Jan 2019 22:04:52 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add a flag to be used by 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: - Look at how to detect that we're not in IKS mode in arm_big_little's .ready callback. - The other pending issue is to fix allmodconfig that leaves us with CPU_FREQ=y and THERMAL=m (CPU_THERMAL=y). That leads to undefined references for functions defined in cpu_cooling.c Amit Kucheria (10): cpufreq: Add thermal_cooling_device pointer to struct cpufreq_policy cpufreq: Add a flag to auto-register a cooling device cpufreq: Replace open-coded << with BIT() 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/cpufreq-dt.c | 14 ++---------- drivers/cpufreq/cpufreq.c | 17 ++++++++++++++ drivers/cpufreq/imx6q-cpufreq.c | 18 ++------------- 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 ++---------- include/linux/cpufreq.h | 36 ++++++++++++++++++++---------- 9 files changed, 55 insertions(+), 90 deletions(-) -- 2.17.1 Reviewed-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke Acked-by: Sudeep Holla