From patchwork Thu Jan 10 00:00:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 155104 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1281106jaa; Wed, 9 Jan 2019 16:01:13 -0800 (PST) X-Google-Smtp-Source: ALg8bN7BRta3QaKTHmPUNT0h4Dtl96n6CCyhKfmP0mMdPxbZ/+C+8Dt+ZaSXc40a3np+FIpDz89w X-Received: by 2002:a63:e516:: with SMTP id r22mr5170486pgh.256.1547078473340; Wed, 09 Jan 2019 16:01:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547078473; cv=none; d=google.com; s=arc-20160816; b=03AYDzSf3MYfX1MpGXYyDIG5APoAxMXna00xpp75tuhGDCfaUV7Z2gJ3mxDqbelHwC rxugNOEdTTLjCE/EiIl2fJHkCnrd7gS5HAUz/fVIq/bpeMz2I79GZwiUTei0n08eiLGk lnrPooPGW3OY2OMBuVKLlqJxKwviyXRhmHIxR65AOe6UN489yx7zxvLhaSOagAncoSLc UTnHGwQdDMXIh0FB/9cMzLq5a/e77ATK0UUAGtR9I6vbxAYVFmVhICY+9vQI2E4+mLyy rBG1iGl4EmdbdKkES2p3hcITib3s77tuxaqNtwfZaa0kL43goJ7hZZlFxyjmXy9GitPw lYCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=4x5l+fpo+33i9L7joXlzfDhb4Fal6Vwhvi1SJC2mPM0=; b=U+59YKAvIjboFJqRw1NmXOj0qjxVkhjbHVUDwEBcxWOFOQ3DaxcR2+wgSRGEw54uYk bOej9K3d6XXK2Tf1umdsjncNUUPohio5nqvE2PX4DusHPdw2+AvkBQQWgIYpoyqUM7dz /RqIsGdZvfH3kTIufb/F3Ip8mLWsbFxB4MOUtvkqPOru1St+toeTDqqAlJ9rNthNL0R6 OT3aj6AOUnPFKbW1tK0y1rPJHZ4dHSNxdLOkA3YgI2CPgJuib+bj3z1MoslqGkHghBMY I5KttIqE27qjYUwdp0SzTUjlmHmzZJatAB2ITVSPhx5ef34BYDNMhnw28A69ur5x8ZNF nXEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q0hHgTI9; 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 e7si8944496pgi.263.2019.01.09.16.01.13; Wed, 09 Jan 2019 16:01:13 -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=Q0hHgTI9; 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 S1726653AbfAJABM (ORCPT + 15 others); Wed, 9 Jan 2019 19:01:12 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:42937 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726470AbfAJABM (ORCPT ); Wed, 9 Jan 2019 19:01:12 -0500 Received: by mail-wr1-f66.google.com with SMTP id q18so9428538wrx.9 for ; Wed, 09 Jan 2019 16:01:11 -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:in-reply-to:references :in-reply-to:references; bh=4x5l+fpo+33i9L7joXlzfDhb4Fal6Vwhvi1SJC2mPM0=; b=Q0hHgTI9oRbwCDbgueOgWqaXLR/07CIuKCCK9dEoeb7PVbtO3WnGbrmUiwyn5Gsyl7 u1WR60YCUbxqDfBfVMwEsEmYG2nxUbHRFwRKKSFwDtLkcZyL0pndeHlrQpu5czuaSJAP fCV1H6W/n/S+KFsI2mzYytLquIghvr/T/PiCw= 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:in-reply-to :references:in-reply-to:references; bh=4x5l+fpo+33i9L7joXlzfDhb4Fal6Vwhvi1SJC2mPM0=; b=QDtoXNzty7dw7VX4jpUQn3xBA3Rz9t31U0HnzucjSG1kwcik3k4+/k9+RxCeMUiX6c PRPmua8dAzhoEWb/E+QS62WPvSIoWw9hFCALDwPjypV0i5f44YDAR1oTW1BQogjWRSBn B/0U9qHvfn514/3KHujEogjCgk+ujUb1vjy8RwHMyZnc4/26udOiHe7WUZ7FwZtK+KSr A0HFxHFeRDNBzmanuO0NvkkpMs7U/+qu5JNVKImlI9tiMtbpRuhqGggcnPbs8b6T1MLc Cgdckj1Q11BejjTQJT1QM6rknKZVorpA2mcHOO0bxyb/pLcMNAJrHQV9p/HCeEbFDnbO 0BJw== X-Gm-Message-State: AJcUukflNHfGIaQyJDH39ObLX6rWHaCuXnY2OhUHo+Gnc2pm8QI7/WsW rXM6M024lV2Ze2k6sNu8KloINA== X-Received: by 2002:adf:ea11:: with SMTP id q17mr6590534wrm.328.1547078470466; Wed, 09 Jan 2019 16:01:10 -0800 (PST) Received: from localhost ([49.248.171.190]) by smtp.gmail.com with ESMTPSA id l20sm123597548wrb.93.2019.01.09.16.01.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Jan 2019 16:01:09 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, viresh.kumar@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, tdas@codeaurora.org, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, Zhang Rui , Daniel Lezcano , linux-pm@vger.kernel.org (open list:THERMAL) Subject: [PATCH v1 1/7] drivers: thermal: of-thermal: Print name of device node with error Date: Thu, 10 Jan 2019 05:30:50 +0530 Message-Id: <52c46a3a4fd1674295d9c2577be87d73ce545044.1547078153.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Signed-off-by: Amit Kucheria --- drivers/thermal/of-thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c index 4bfdb4a1e47d..5ca2a6b370ea 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c @@ -867,14 +867,14 @@ __init *thermal_of_build_thermal_zone(struct device_node *np) ret = of_property_read_u32(np, "polling-delay-passive", &prop); if (ret < 0) { - pr_err("missing polling-delay-passive property\n"); + pr_err("%s: missing polling-delay-passive property\n", np->name); goto free_tz; } tz->passive_delay = prop; ret = of_property_read_u32(np, "polling-delay", &prop); if (ret < 0) { - pr_err("missing polling-delay property\n"); + pr_err("%s: missing polling-delay property\n", np->name); goto free_tz; } tz->polling_delay = prop; From patchwork Thu Jan 10 00:00:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 155105 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1281205jaa; Wed, 9 Jan 2019 16:01:19 -0800 (PST) X-Google-Smtp-Source: ALg8bN6B0sopziOZXarK8Jpg19eA/GXUGl64X9wDGrjP3cVIepXYxzskM0Np78lO2rfbbSblN5sM X-Received: by 2002:a63:554b:: with SMTP id f11mr5225569pgm.37.1547078479211; Wed, 09 Jan 2019 16:01:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547078479; cv=none; d=google.com; s=arc-20160816; b=g/B7Y+OobqNrkZvdw73cKcckugnX121pMleqmdsExmZsZ9JfauJv6RDxhiLONplkbk wtQ67GtNdeE53xIRhUWk4of1eSuubwXowi7BOmiba+GkADdlmdKh/qTEAJJT4KCA92x/ /bh2+O3/TmKxUPQQy649QDlO541ij14KQivwPkB9IIA48gPjwSxiZ6bGKZ9mDRSjvpUY QKi7CYUoToqcTLtNps+JvzzEMpJQ8e74NPpt5+nG3PU4e7MGVdKqsiKICBkEndNAMB+f /23tjn649TKbv/7pvqUMIY6tMgXvVdkpW/ZEAFSwaqSNq7dcIQncXprqygiSCOnDpDIX sFeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=TWqA5aCCzVWoclWoRERTw4sDZ/VsY8UwV8+oCN/rO9o=; b=pFPFqphWxH1MSIdUpTdV2ZHRXlvbCKCTQtENi8VD1GbKR69LERXhIUy0Kqu5BVE0kz CEqZU2hKNTmrt4yKfeb7cey8xrhLSOGPLY2dVcjk733dZlaDHlSOnbS1x4oxdn+i54Ge OYPrr4/tZW7jEQPPtLthS3NM6sBfoyfzQnGZ15kwvhGv3YWq+9kNrf4XEjoWbeijAX+y M3qv+JK2Q5kCxWSC+uWnJQwnnG4vXMcqFFwnmYjSH7wF/gn0Lo1AWnFcsNb4hTi+HC0S IjtYfuhC9exoI8PF2rplaXsF4FKDwlWPQicXby3gCgPdGXXITR/GEkXiPAgJmVTOqr5D yNTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T+d45++X; 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 m15si15318329pfd.3.2019.01.09.16.01.18; Wed, 09 Jan 2019 16:01:19 -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=T+d45++X; 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 S1726286AbfAJABS (ORCPT + 15 others); Wed, 9 Jan 2019 19:01:18 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:38287 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726624AbfAJABS (ORCPT ); Wed, 9 Jan 2019 19:01:18 -0500 Received: by mail-wr1-f68.google.com with SMTP id v13so9448302wrw.5 for ; Wed, 09 Jan 2019 16:01:17 -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:in-reply-to:references :in-reply-to:references; bh=TWqA5aCCzVWoclWoRERTw4sDZ/VsY8UwV8+oCN/rO9o=; b=T+d45++XscdlCHWCAsA9SD95Y4D/qk4Cu1eJmM50dW38fYpqhoIf9X3ShJ+GkenZV0 Qbev/fc4EiHLNYKs9WgVT/++JitLGeooodqcyzIcZrOC/12SFxVWMxpMhnUc+VGHV70e o1OWQUlBd5NGbQlwqS2lxTOlL3Ds9vkUv2AZo= 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:in-reply-to :references:in-reply-to:references; bh=TWqA5aCCzVWoclWoRERTw4sDZ/VsY8UwV8+oCN/rO9o=; b=fsdU/avH7BXphCWNcBdQdUWobBWoxqTh9iz9pknlPe3Wy45+X1YleZxBz0rGN5yxx2 EiUHaykI1yvJigvWRsZY6S3IJFR9zveET8o1cYj31L04Ty7ysjXzi8PTQcsj6MRKcTJS ymR4fvYRXaBDCrhYyhPjUqvCSDGJ7/1ZryXYHJvBuxisG9y4kkc2dXLdo/5SXNX4WwE/ D/KdtpsSEvnlo7NqDSf8IeobHAVgqRraDdrL4oiWjP4RRz3Z5DWiyem49Nyppg0Z4utk gUXXbEOc5WH8XUvyBWY69zFqiAQeFw0xkRSIlEb4RE5gz9SUR8R9YZRMAoJNd+CPh+X7 HP9Q== X-Gm-Message-State: AJcUuke+hPKgCGa/b+zqUXu9QlnEcWQk1hb9F/+zm9FqabIzqOURIht2 LGG5TgW/jGVvbCr21NEy3XoZpw== X-Received: by 2002:a05:6000:12c4:: with SMTP id l4mr6662240wrx.134.1547078476478; Wed, 09 Jan 2019 16:01:16 -0800 (PST) Received: from localhost ([49.248.171.190]) by smtp.gmail.com with ESMTPSA id a12sm63151563wro.18.2019.01.09.16.01.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Jan 2019 16:01:15 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, viresh.kumar@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, tdas@codeaurora.org, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, "Rafael J. Wysocki" , linux-pm@vger.kernel.org (open list:CPU FREQUENCY DRIVERS) Subject: [PATCH v1 2/7] drivers: cpufreq: Add thermal_cooling_device pointer to struct cpufreq_policy Date: Thu, 10 Jan 2019 05:30:51 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Several cpufreq drivers register themselves as thermal cooling devices. Adding a pointer to struct cpufreq_policy removes the need for them to store this pointer in a private data structure. Signed-off-by: Amit Kucheria --- include/linux/cpufreq.h | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index c86d6d8bdfed..2496549d7573 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -95,6 +95,8 @@ struct cpufreq_policy { struct cpufreq_frequency_table *freq_table; enum cpufreq_table_sorting freq_table_sorted; + struct thermal_cooling_device *cooldev; /* Pointer to the cooling + * device if used for thermal mitigation */ struct list_head policy_list; struct kobject kobj; struct completion kobj_unregister; From patchwork Thu Jan 10 00:00: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: 155106 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1281311jaa; Wed, 9 Jan 2019 16:01:25 -0800 (PST) X-Google-Smtp-Source: ALg8bN71R6ln5E3M+T3pcKcYvxmqpgYKbeOLgCS6LKBbDikXPg8oPJBubx7iM7ZVSbQ/K6oK4fiR X-Received: by 2002:a17:902:bd92:: with SMTP id q18mr8106264pls.167.1547078485206; Wed, 09 Jan 2019 16:01:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547078485; cv=none; d=google.com; s=arc-20160816; b=kD5xbXDoJEdwjX7RXxmh1oIRIR6haLCuqIorkyzNnlVmXae5x4f2ZA/KzP/3SpZEkd p6dE1HCym1d8TCU82tQmm5hvLvKIPmQ6BhJwxq90Q5WJ7zYiAGg3FiP9sM04irdlkgSP v47qqPKh/3lC9ioKuOZzXs1va9es7JJ5z8ZRwoQif1sEoWJOHNC7mOtc2Y9tU0Q6mrCY ErQxbEQIh0bJukcBo7Mz+DdmAbTwT+g+EH9Vb1Jvjb+++KgMNB3n9wzqZf3/8Yzpf1iA vzeHZ5OhKM3AlzwtfOmUs6bsld6lXUrFLO/zmPzU+GvjRPEJIBUPvDLX3/CWBuuPMX1+ tSRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=PI9R955mUdxl9wa+5VxK6ncJI/NHFyvZwL7fY0NRhzM=; b=R+2fIfZV9+VepnsOFSOVlfHY2uVeuMeSf6BtQ3cq7O+iacUNPEU+cPcOIqJeMPiHg2 Wf+To43YeN1R2P8GVWj/4fGJG789hqVInCH7yZHUKTKB9iDn4j/Yw5iWCGLj1KqUBMnQ 94PZFia8jJuk3RoPmq4epSS0mlv6eePRvrIT+z4cILyLy0vcytLVQjQOdzxjlXR6sudW lQwN/pBEc65QOk2mQ+6Ti17MjEzLw9BsDwHwmLA3cPoBL9w+bZiuMuY7eVkQMaEyPpV5 4obRKTOK9A5DU21fHD/B5g1jXJlQJAuxwVHONUtOJb5zyr9jepgdU2dr9i0qUF3pO3CZ JR9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=esoDudYY; 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 c22si8778795pgb.254.2019.01.09.16.01.24; Wed, 09 Jan 2019 16:01:25 -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=esoDudYY; 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 S1726869AbfAJABY (ORCPT + 15 others); Wed, 9 Jan 2019 19:01:24 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:43254 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726767AbfAJABY (ORCPT ); Wed, 9 Jan 2019 19:01:24 -0500 Received: by mail-wr1-f65.google.com with SMTP id r10so9433370wrs.10 for ; Wed, 09 Jan 2019 16:01:23 -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:in-reply-to:references :in-reply-to:references; bh=PI9R955mUdxl9wa+5VxK6ncJI/NHFyvZwL7fY0NRhzM=; b=esoDudYYCO44v0DxqBUshEhDqpTRIzcw4JL/wu5ynj7Qfp3tSrwtEcdG6JBmCvY3JH K0oyxh/OO7NysHSsQhKVRI46Tz3XtGLc5ojoTiGRZSv4E1Yhxh6S0icVMw2I1QnoVIam T59rYFPVhXYqko3aJvEQpGKjmsWehCpuN1cm0= 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:in-reply-to :references:in-reply-to:references; bh=PI9R955mUdxl9wa+5VxK6ncJI/NHFyvZwL7fY0NRhzM=; b=lAj1CBlm9DqxJ4dB5K6Tv/6yoE8SCJwisOmQTm1Gyupyi/Sw+BJyV0r0+bDSonooWf QikPFnvhzO4IirxDHlIIY2mPxVqdCEruaLNhn/pOoA7dArDlhW1uedt+yFa/v0y5vHPg 2rxK7pYqbvANPJInJNAprTvo9dWs2bHQ8PcumbH0Zsq6pr20Iyq0icVLnvGydmTfEabv V3ghDZ5PySXJYoZvHAd8OkeM6VWkXY4ZLOY10TkwDD4/9HVpEAyZbEnsfycm/blM56q/ zldPB4vUhrR4iR9Y7jKXxgWWkQBseTi+1Boc1aEi6EQqkNqlPhlwozhxBPXgGbQ+4AAP iEXg== X-Gm-Message-State: AJcUukcgWf/3yYhoYSq/JH1NQV7+arsOETdM45adj/xHDZ5gfDGrVwIH IjFVjp2kBsnSq1UxxcIs4Q78pQ== X-Received: by 2002:adf:d1d2:: with SMTP id m18mr7129620wri.138.1547078482542; Wed, 09 Jan 2019 16:01:22 -0800 (PST) Received: from localhost ([49.248.171.190]) by smtp.gmail.com with ESMTPSA id o64sm12316497wmo.47.2019.01.09.16.01.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Jan 2019 16:01:21 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, viresh.kumar@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, tdas@codeaurora.org, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, Amit Daniel Kachhap , Javi Merino , Zhang Rui , Daniel Lezcano , linux-pm@vger.kernel.org (open list:THERMAL/CPU_COOLING) Subject: [PATCH v1 3/7] cpu_cooling: Add generic driver ready callback Date: Thu, 10 Jan 2019 05:30:52 +0530 Message-Id: <9cccfabf22ccae92dfd31175b57baab3206eac0d.1547078153.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org All cpufreq drivers do similar things to register as a cooling device. Provide a generic call back so we can get rid of duplicated code in the drivers. Signed-off-by: Amit Kucheria Suggested-by: Stephen Boyd --- drivers/thermal/cpu_cooling.c | 18 ++++++++++++++++++ include/linux/cpu_cooling.h | 9 +++++++++ 2 files changed, 27 insertions(+) -- 2.17.1 diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index dfd23245f778..5154ffc12332 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -694,6 +694,7 @@ __cpufreq_cooling_register(struct device_node *np, cpufreq_cdev->clipped_freq = cpufreq_cdev->freq_table[0].frequency; cpufreq_cdev->cdev = cdev; + policy->cooldev = cdev; mutex_lock(&cooling_list_lock); /* Register the notifier for first cpufreq cooling device */ @@ -785,6 +786,23 @@ of_cpufreq_cooling_register(struct cpufreq_policy *policy) } EXPORT_SYMBOL_GPL(of_cpufreq_cooling_register); +/** + * generic_cpufreq_ready - generic driver callback to register a thermal_cooling_device + * @policy: cpufreq policy + */ +void generic_cpufreq_ready(struct cpufreq_policy *policy) +{ + struct thermal_cooling_device **cdev = &policy->cooldev; + + *cdev = of_cpufreq_cooling_register(policy); + if (IS_ERR(*cdev)) { + pr_err("Failed to register cpufreq cooling device for CPU%d: %ld\n", + policy->cpu, PTR_ERR(cdev)); + cdev = NULL; + } +} +EXPORT_SYMBOL_GPL(generic_cpufreq_ready); + /** * cpufreq_cooling_unregister - function to remove cpufreq cooling device. * @cdev: thermal cooling device pointer. diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h index de0dafb9399d..d7815bb2967a 100644 --- a/include/linux/cpu_cooling.h +++ b/include/linux/cpu_cooling.h @@ -65,12 +65,21 @@ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) */ struct thermal_cooling_device * of_cpufreq_cooling_register(struct cpufreq_policy *policy); + +/** + * generic_cpufreq_ready - generic driver callback to register a thermal_cooling_device + * @policy: cpufreq policy + */ +void generic_cpufreq_ready(struct cpufreq_policy *policy); #else static inline struct thermal_cooling_device * of_cpufreq_cooling_register(struct cpufreq_policy *policy) { return NULL; } + +void generic_cpufreq_ready(struct cpufreq_policy *policy) {} + #endif /* defined(CONFIG_THERMAL_OF) && defined(CONFIG_CPU_THERMAL) */ #endif /* __CPU_COOLING_H__ */ From patchwork Thu Jan 10 00:00:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 155107 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1281416jaa; Wed, 9 Jan 2019 16:01:31 -0800 (PST) X-Google-Smtp-Source: ALg8bN6CGxqb6MjLTa4tAg9QDq8jPh4056aMoMvtVONi3uREGhI0f3l6K4q20n0nFo4bcF+cG3Ci X-Received: by 2002:a17:902:1127:: with SMTP id d36mr7797153pla.299.1547078491397; Wed, 09 Jan 2019 16:01:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547078491; cv=none; d=google.com; s=arc-20160816; b=pdJk0RkF+iQBwiTdxuEkY9Hd6FCTMES/zh0ICEwvIx1oY4PG5W8qCXMyzqZBCQrD+Z M45hyQSGHq/ytsZXs/9q/qECMYjMUi9GyP7BvO/df/ePiZBoPkf7HGHyFMYmHJPyFBUZ uw9Nbfbis3OBF/G3g/ttY2F06K6GdePbSazzYRt1jB4IQnBKfGeslQPeHCjTURKlAGX3 TbVwqzo/xHDyYMw0RSJGalv9k1IAiH/n5/JEXy7C5JjCFFYV9Q0AX3ZP3jQcCq06s3cq Q+IBM4tmqqda+OLO2auwd9BHDILxx/vch0MgdzKhH3po5m9pXS8eGHCTXRATX6iqQ1fQ TCcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=P7E60/i5ULtskb0FXpBa3pMJQ03Hyuz/IlsstPzfUWk=; b=br4mpJ5qCDeMFUMCpWo1NbsAItuT6fybh6s8cCbCuaZo9nfGGXecmTg4nISkAoXWbs 6QrkemMpvvY5bD7+dP0VFfBeOKMF4CInIjVtRO8dycXCNIqi9uTJjTcHH0aM/fkS+Dws KAqUq0CHb34P6lWaDiC80Pr1rc93cpyYZdXcbQXaNtHKdmuYBbf8N0s83MGugaEPTkjV 8su/7I2h17PdQJ3Y8YyPmm27GTo6vmEn6kCh1EyGDLZQiRJOOusubckzDubAdS0cot1v n/vvdvJTJhHepb0e9VehgZilVhY88w6gflWs7Ypo+eNs5vlJ/Wj6g8mw1rUJX6YiP/2m ulyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ia7IWyfC; 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 c8si8616063pgl.507.2019.01.09.16.01.31; Wed, 09 Jan 2019 16:01:31 -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=ia7IWyfC; 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 S1726948AbfAJABa (ORCPT + 15 others); Wed, 9 Jan 2019 19:01:30 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:41776 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726863AbfAJABa (ORCPT ); Wed, 9 Jan 2019 19:01:30 -0500 Received: by mail-wr1-f68.google.com with SMTP id x10so9421994wrs.8 for ; Wed, 09 Jan 2019 16:01:29 -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:in-reply-to:references :in-reply-to:references; bh=P7E60/i5ULtskb0FXpBa3pMJQ03Hyuz/IlsstPzfUWk=; b=ia7IWyfCDRdmDLeuNpTKKt21edaajbCK3gTFT9kPHWL2oBsKN3rGtPxu5FFRJ5iSOV SostMS/8BVK/Jwec7CKqPMZfwtyhFhlGYJK1/LpV97MK9FqwRTZrm+jH3nJ0s+Y18Tiq xKr6xQ55LWwp/m909YLtwEiQ9CnM1OFiGv1z4= 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:in-reply-to :references:in-reply-to:references; bh=P7E60/i5ULtskb0FXpBa3pMJQ03Hyuz/IlsstPzfUWk=; b=XiqNTFcq/UWr9jK/7eqQ2vIRS2ZfXT7H/qZopgW8zKsOVTRB2eftda4nh+T6khu7ms DhZWOXMBo2NXvGNKLpeaYq0NhuCx7Kqs/d34QhaIksd9+7gZ4790kZVmue/Jw3dnuuUN o5Gr4jEp2XyJIltfJH+9h6hQHvu/8QUXLM3LWaaa1rXBUW+XY06XyP3aLczW7YxlksKd +sywXbdHiqnolYLe4DeDELiIpmI3RYDic7ABF+/h81GU5p2wbyNPp+30osxtH1iFmCEt N656hloTvc2sONR2i7IEeQ/d9NkE2mZPIo7lEx8I1v5et6sLiRk1gUokucHtR1eEsVlv 4HfQ== X-Gm-Message-State: AJcUukczvrvo3kIoTGcl/9UilvUC0iMDhExOTgMx85M2HQymh81vw40D pEwe1NlbGqTzNsSXaH9vBMKKdA== X-Received: by 2002:adf:f211:: with SMTP id p17mr6789810wro.293.1547078488517; Wed, 09 Jan 2019 16:01:28 -0800 (PST) Received: from localhost ([49.248.171.190]) by smtp.gmail.com with ESMTPSA id l20sm123599881wrb.93.2019.01.09.16.01.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Jan 2019 16:01:28 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, viresh.kumar@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, tdas@codeaurora.org, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, "Rafael J. Wysocki" , linux-pm@vger.kernel.org (open list:CPU FREQUENCY DRIVERS) Subject: [PATCH v1 4/7] cpufreq: qcom-hw: Move to device_initcall Date: Thu, 10 Jan 2019 05:30:53 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org subsys_initcall causes problems registering the driver as a thermal cooling device. If "faster boot" is the main reason for doing subsys_initcall, this should be handled in the bootloader or another boot constraint framework. Signed-off-by: Amit Kucheria --- drivers/cpufreq/qcom-cpufreq-hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c index d83939a1b3d4..649dddd72749 100644 --- a/drivers/cpufreq/qcom-cpufreq-hw.c +++ b/drivers/cpufreq/qcom-cpufreq-hw.c @@ -296,7 +296,7 @@ static int __init qcom_cpufreq_hw_init(void) { return platform_driver_register(&qcom_cpufreq_hw_driver); } -subsys_initcall(qcom_cpufreq_hw_init); +device_initcall(qcom_cpufreq_hw_init); static void __exit qcom_cpufreq_hw_exit(void) { From patchwork Thu Jan 10 00:00:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 155108 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1281515jaa; Wed, 9 Jan 2019 16:01:37 -0800 (PST) X-Google-Smtp-Source: ALg8bN7uE8gk2upWeHuTGCfu8/4sswPuPrlq7gjW+G389ncR02XjU2KJTSE7CZvwnYcF/0kDvpii X-Received: by 2002:a17:902:820f:: with SMTP id x15mr7758239pln.224.1547078497355; Wed, 09 Jan 2019 16:01:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547078497; cv=none; d=google.com; s=arc-20160816; b=kVGPia8M8LwR3LdppvRBJMSxrOX62SuIr5D4/iMPahPocl9nK8PoZyOn8fIYaXb1H6 0ZyxxNbJkwkrUjWm981437YjXIjiHS8xFtRIm8bQTn5E0tE+MS0AFtO189ymxtSICR7t sZ9ITVFHiseTpqVaPYuxHqWpAj38eBRmxBwHiB3ULPpcs0DJhZVJxEb7K2chD3vJMtbD 7nB0ZHdugCaUAUC1bsq8N8/UbQK8bszi8/Dy7DIzN/QD1tI9e1WVy8tW+Jpo0acDAymW dL8Jm+HpWtLY9nQxsykkY2zrHlL2M2y9mxtrdsDWmaGfFOwZMOLQnKqPwfxJ2wpwxzFz T13Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=90uAdP76GbEFesAg3EEdgboTHiHbKzIpz1LIUUCK07I=; b=a0/6oCjxvjN+VirPaV/J2KTpHIPQadZaqX/bPqcgtiZG1g2D/RZeySaoTAjkgaNizF DvI5bw2vhsR6O3Sa72lettoeDfFeMIzX8Zb4vLQV6Sxe6vUhhqnYyhX+fx25bhJJB0XF wGJP7e0RZu5Gkm74U2/is16iGdafvQbTOb7jEy/KvnW70br08rOAx6ZZX0b3uO+mIHoC y/MVEkNU8076vBDmIGlbqI6l0Ehkoj71T6f3ufPMk80K9dIkV/lbwIana/bjnxzKfAH6 FbgmX3JVf/DEEZiab50oiOk4KSptZrOlcudbdWR1kgnbUuxy0pAHtKM8aQhiHgsFuIgw SQ0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZkBPYmqj; 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 c8si8616063pgl.507.2019.01.09.16.01.37; Wed, 09 Jan 2019 16:01:37 -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=ZkBPYmqj; 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 S1727015AbfAJABg (ORCPT + 15 others); Wed, 9 Jan 2019 19:01:36 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:40911 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727010AbfAJABg (ORCPT ); Wed, 9 Jan 2019 19:01:36 -0500 Received: by mail-wr1-f67.google.com with SMTP id p4so9452687wrt.7 for ; Wed, 09 Jan 2019 16:01:35 -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:in-reply-to:references :in-reply-to:references; bh=90uAdP76GbEFesAg3EEdgboTHiHbKzIpz1LIUUCK07I=; b=ZkBPYmqjsKFIzsQXjpWY1Wnu7EovFBLBDDfslZ++FU7hV5yg7rmMfLvgqlg1Z+xByy 2txi6kKKAwy59nB7kwgIfqvZpUlWM8+FbQB4QTFb9BuCo04EdmGEJ7qdYlNgzYd+U8Fh oV0xgi6jLnwahRIltAtaAQTCIqzz5toPUgzp0= 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:in-reply-to :references:in-reply-to:references; bh=90uAdP76GbEFesAg3EEdgboTHiHbKzIpz1LIUUCK07I=; b=Y/p7+5/NnwfakPrWoqL+FJimcTUWceMmlEk2XqvMoF99BTrxDa56d7/a/mkAbuMLV8 t2XmLaxbqpgjkQv1ZRNqViaNgLH+NxdatWlL3hJ7t2iJVazqwPhHiKpdHnr1zgFvMv4F kGz4GN8HW5+g3wn92JzAcL4UOqCvly9S+DY064sona/kLnrqyYD4YldPjImz9QJQhOfg aOaESdnGsOnW98bN5tJ9JNmS/PzByNU3L7Fbn1oWI7Lzy7N2g+4rh3C6IWn7qF4nMgO0 /bYmswLUWIBZG/+uhrH5uMGJmDlTWUBkqIVe9paL2rPQ3MB0musmVgpr4FY5zgCc+mXi lGEg== X-Gm-Message-State: AJcUuke/jlPayN0LuAP6g8ZJBin5GAtRB9V7n9iRzq2iaTMYiPKYHb2E opN4CkzL28tRZiI/45Kw9RDlmg== X-Received: by 2002:a5d:454f:: with SMTP id p15mr7289952wrr.39.1547078494622; Wed, 09 Jan 2019 16:01:34 -0800 (PST) Received: from localhost ([49.248.171.190]) by smtp.gmail.com with ESMTPSA id s3sm12839428wmj.23.2019.01.09.16.01.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Jan 2019 16:01:34 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, viresh.kumar@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, tdas@codeaurora.org, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, "Rafael J. Wysocki" , linux-pm@vger.kernel.org (open list:CPU FREQUENCY DRIVERS) Subject: [PATCH v1 5/7] cpufreq: qcom-hw: Register as a cpufreq cooling device Date: Thu, 10 Jan 2019 05:30:54 +0530 Message-Id: <3c7d0e4a8373e89d6922543ccf56749970de5567.1547078153.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Signed-off-by: Amit Kucheria --- drivers/cpufreq/qcom-cpufreq-hw.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.17.1 diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c index 649dddd72749..1c01311e5927 100644 --- a/drivers/cpufreq/qcom-cpufreq-hw.c +++ b/drivers/cpufreq/qcom-cpufreq-hw.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -216,7 +217,10 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy) static int qcom_cpufreq_hw_cpu_exit(struct cpufreq_policy *policy) { void __iomem *base = policy->driver_data - REG_PERF_STATE; + struct thermal_cooling_device *cdev = policy->cooldev; + if (cdev) + cpufreq_cooling_unregister(cdev); kfree(policy->freq_table); devm_iounmap(&global_pdev->dev, base); @@ -238,6 +242,7 @@ static struct cpufreq_driver cpufreq_qcom_hw_driver = { .init = qcom_cpufreq_hw_cpu_init, .exit = qcom_cpufreq_hw_cpu_exit, .fast_switch = qcom_cpufreq_hw_fast_switch, + .ready = generic_cpufreq_ready, .name = "qcom-cpufreq-hw", .attr = qcom_cpufreq_hw_attr, }; From patchwork Thu Jan 10 00:00:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 155110 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1281723jaa; Wed, 9 Jan 2019 16:01:50 -0800 (PST) X-Google-Smtp-Source: ALg8bN5ZXAfxVXZtHWiU9g0wVqD7e/Kh1QQjnV9SjBP/VYTW+r3b3d8o8yKKXMObOxaQPvPNJDkC X-Received: by 2002:a17:902:1d4a:: with SMTP id u10mr7751526plu.122.1547078510197; Wed, 09 Jan 2019 16:01:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547078510; cv=none; d=google.com; s=arc-20160816; b=RxhuzZKxP48Pn7cMb6rB/s/g3kfDWrIIOff/Jmp+u5gYJLSodm/FE7hk67yuD12wWg avxw1McA8jziiPV9ijo8HV8q7tByGGgGU1YN1+lAW6G1IHaqXaPyb/9ShTbpBZhnLSgv bb+YtP0ck08TGTghkg2PtjKpdReYNXYSHC21JfSJNIIf/XcPAphGHF93Ldwju4L3vfGR ybT1w3fsGojz8Ame0X6O/zdTHRdv9HfdDHMtxLtuZ9lqvp6cJoDocOruwxXj4T8zq5ut lBJpgrloTgBghFn+xhA6lpjPyUJ5EQnLRJVEMR4GJN+QcIBlE3TXuJWf/qOcpCXa2tyH 5SZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=/ZE0qkZUqxgI4JnoiR2IYSBVxq7qTxELnI9TqLZdU2Y=; b=AO3RgZKALiqFl713OGVubOSZqzZIaB+NzRdrJeR/i83KgGwRGq2g5+7XVPp3ox3g9V a07KvetFTQGdz5yx1dBB+LXygkRE0jAoTbHDs1aQciVJoj7ffnugcFjwHWqWWiCWhN0f 6anosqIt3ks9DrRD8bZvDBbpjuxXwdP0ahZ3p1czmKhElME0Fd11qhkrCX95G2Wz6WQZ Z8wuCl5j+iczxF6zoJL4tVMU6AR0no/lIhuAzNPc6Gb4Dl/GVpbfdAcrl7DE1m+FbICf WTExNsugHlXN78/Usn4xw6fEZrtEUq787BYJapZtCdi8VoBpDfQ6HNE9vrq6jMmdMktZ gbTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="SEU3cD/l"; 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 r18si37126091pfc.199.2019.01.09.16.01.49; Wed, 09 Jan 2019 16:01:50 -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="SEU3cD/l"; 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 S1726480AbfAJABt (ORCPT + 15 others); Wed, 9 Jan 2019 19:01:49 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:37255 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726680AbfAJABt (ORCPT ); Wed, 9 Jan 2019 19:01:49 -0500 Received: by mail-wr1-f65.google.com with SMTP id s12so9474642wrt.4 for ; Wed, 09 Jan 2019 16:01:47 -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:in-reply-to:references :in-reply-to:references; bh=/ZE0qkZUqxgI4JnoiR2IYSBVxq7qTxELnI9TqLZdU2Y=; b=SEU3cD/l7LwiQdrMqY0xwiVIBYsLKKhJzQ0jQqZ3SYhK6b1+rJih9rAPWLpIWbW9QM s6lfKr/XhCmSBTPElE94yMb24QcBF+HZwm+vCZtFZNs5PVTSEHVxJE4+AUvDeLGYqGhM Pk/6aNxdOjH1IeGyVsbdurFHqPhpVe+40+Xvc= 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:in-reply-to :references:in-reply-to:references; bh=/ZE0qkZUqxgI4JnoiR2IYSBVxq7qTxELnI9TqLZdU2Y=; b=Q8+iqIjTY8V+CRsJ+Db/cFZL7Gv1qkKQOhfixRWblnTB/61jsZjZ62PboCCMx11u11 4STlAmssQsTKYjdvgD0z3qRiKc+aAV6CM00kJgNDZRBuKm2IKyAEuBjv9r14kNkw/s7W /TAbCxFzdjWTRRt79cHl2Xr6JK/5M3XuAIbdYhrhedWh29Kl7ed/7Y3ImClWrucRmsgu jlDJw2hliFJ6EkpFSbh3FZnA0ivqYG/mx3wGdHDy4L9aVeFIdyKSy5sOi19tTTpBschm ZkLoVY9GwedTyb+VnKqseT8iaCvvB1fRBZHlvEYPSrq2HJ9IAl0sq2hbelO9Rpg1Agdq 7Slg== X-Gm-Message-State: AJcUukeeHGUp0Rzchd/44V69rfXdwbBayg5XYzAXLPbXYLdHVQ3Xl2G+ TlLHI+ie9K/tNZHVYcKLJu9gKg== X-Received: by 2002:adf:dfd1:: with SMTP id q17mr7150347wrn.27.1547078506825; Wed, 09 Jan 2019 16:01:46 -0800 (PST) Received: from localhost ([49.248.171.190]) by smtp.gmail.com with ESMTPSA id y13sm5251318wme.2.2019.01.09.16.01.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Jan 2019 16:01:46 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, viresh.kumar@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, tdas@codeaurora.org, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, David Brown , Rob Herring , Mark Rutland , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS) Subject: [PATCH v1 7/7] arm64: dts: sdm845: wireup the thermal trip points to cpufreq Date: Thu, 10 Jan 2019 05:30:56 +0530 Message-Id: <6c5b26e65be18222587724e066fc2e39b9f60397.1547078153.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Since the big and little cpus are in the same frequency domain, use all of them for mitigation in the cooling-map. At the lower trip points we restrict ourselves to throttling only a few OPPs. At higher trip temperatures, allow ourselves to be throttled to any extent. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 145 +++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) -- 2.17.1 diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 29e823b0caf4..cd6402a9aa64 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -13,6 +13,7 @@ #include #include #include +#include / { interrupt-parent = <&intc>; @@ -99,6 +100,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x0>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_0>; L2_0: l2-cache { compatible = "cache"; @@ -114,6 +116,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x100>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_100>; L2_100: l2-cache { compatible = "cache"; @@ -126,6 +129,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x200>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_200>; L2_200: l2-cache { compatible = "cache"; @@ -138,6 +142,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x300>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_300>; L2_300: l2-cache { compatible = "cache"; @@ -150,6 +155,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x400>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_400>; L2_400: l2-cache { compatible = "cache"; @@ -162,6 +168,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x500>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_500>; L2_500: l2-cache { compatible = "cache"; @@ -174,6 +181,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x600>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_600>; L2_600: l2-cache { compatible = "cache"; @@ -186,6 +194,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x700>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_700>; L2_700: l2-cache { compatible = "cache"; @@ -1703,6 +1712,23 @@ type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu_alert0>; + cooling-device = <&CPU0 THERMAL_NO_LIMIT 4>, + <&CPU1 THERMAL_NO_LIMIT 4>, + <&CPU2 THERMAL_NO_LIMIT 4>, + <&CPU3 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu_crit0>; + cooling-device = <&CPU0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; cpu1-thermal { @@ -1724,6 +1750,23 @@ type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu_alert1>; + cooling-device = <&CPU0 THERMAL_NO_LIMIT 4>, + <&CPU1 THERMAL_NO_LIMIT 4>, + <&CPU2 THERMAL_NO_LIMIT 4>, + <&CPU3 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu_crit1>; + cooling-device = <&CPU0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; cpu2-thermal { @@ -1745,6 +1788,23 @@ type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu_alert2>; + cooling-device = <&CPU0 THERMAL_NO_LIMIT 4>, + <&CPU1 THERMAL_NO_LIMIT 4>, + <&CPU2 THERMAL_NO_LIMIT 4>, + <&CPU3 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu_crit2>; + cooling-device = <&CPU0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; cpu3-thermal { @@ -1766,6 +1826,23 @@ type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu_alert3>; + cooling-device = <&CPU0 THERMAL_NO_LIMIT 4>, + <&CPU1 THERMAL_NO_LIMIT 4>, + <&CPU2 THERMAL_NO_LIMIT 4>, + <&CPU3 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu_crit3>; + cooling-device = <&CPU0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; cpu4-thermal { @@ -1787,6 +1864,23 @@ type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu_alert4>; + cooling-device = <&CPU4 THERMAL_NO_LIMIT 4>, + <&CPU5 THERMAL_NO_LIMIT 4>, + <&CPU6 THERMAL_NO_LIMIT 4>, + <&CPU7 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu_crit4>; + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; cpu5-thermal { @@ -1808,6 +1902,23 @@ type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu_alert5>; + cooling-device = <&CPU4 THERMAL_NO_LIMIT 4>, + <&CPU5 THERMAL_NO_LIMIT 4>, + <&CPU6 THERMAL_NO_LIMIT 4>, + <&CPU7 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu_crit5>; + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; cpu6-thermal { @@ -1829,6 +1940,23 @@ type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu_alert6>; + cooling-device = <&CPU4 THERMAL_NO_LIMIT 4>, + <&CPU5 THERMAL_NO_LIMIT 4>, + <&CPU6 THERMAL_NO_LIMIT 4>, + <&CPU7 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu_crit6>; + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; cpu7-thermal { @@ -1850,6 +1978,23 @@ type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu_alert7>; + cooling-device = <&CPU4 THERMAL_NO_LIMIT 4>, + <&CPU5 THERMAL_NO_LIMIT 4>, + <&CPU6 THERMAL_NO_LIMIT 4>, + <&CPU7 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu_crit7>; + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; }; };