From patchwork Fri Sep 20 21:52:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 174158 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp3031664ill; Fri, 20 Sep 2019 14:52:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGJX3QbV2FwP3i1ZpkTs28voZjvku1oanyn6dzpjSFtcfmZJadmqcRiCGy8pGC/rTIA64u X-Received: by 2002:a50:f391:: with SMTP id g17mr21819589edm.163.1569016370883; Fri, 20 Sep 2019 14:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569016370; cv=none; d=google.com; s=arc-20160816; b=Nz6IyzqeNSwS4ut/j5faSJhsBrmldtZ3yfyo8cIVbJf6w3TlvQRnhbMiBwPwLKJxOF VwSNGRPdyGvw/BID+3QacSP5t3OLnt2mtQELCnbpclhdjRFYgZgFIgu4TgTnu5S/P28Z etPSwI12oKK0d93up13oRjYINtEskOO98IZT6+78suzNj9CfEX3Z/anZJI2pEkl6z/pE IAaXTYpmYVnK5KV5bq5YxSKOy+tpuIfteBy5Veq8klYYAbgA2NaJ+h90q2dXSRUM5PCJ 5+l0iCsDooV6TavVq2JM9Wl2HyJvQueEmuEsZ+JZdITIfTBm/6dFVkMsqIevwx6ulxu5 zgrw== 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=BcKGfqptsJMIyqg8m+kdv7mwKKvvYfua8/fbCWYYrS8=; b=aghbtv5QW4VwgEMuylnwSBsbpD1kHVIAVqJdyMgYJV5uw0qkIZLd17/vL8Nx1K2MoR YQEcOCjJE5emIHfD+ErKuul4tHxzW1viwU4CaaemYTp4OLUFRWSlpAbc3SXp6Qx7IplE CIT93I297x2ZVw6PxyGg97XhOE4XuGRHacLajve+5w5kqDFCN4i7RXtIBwG+ukEX01Lo m1vD32cmQBTmoIBurGex7iA9fEp1PPHy4dsnO7E2jn5IR18XQxOsBQ5x1VBhukulcEKB ZZMICffQznbYYpsg6I5e0AkwFEkVHZS2zuxroAzrpygwWqxdvoYqmLdQCz5//1zPvGcx jpkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gC01BHP1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 d17si2225527eda.213.2019.09.20.14.52.50; Fri, 20 Sep 2019 14:52:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=gC01BHP1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727600AbfITVwt (ORCPT + 26 others); Fri, 20 Sep 2019 17:52:49 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:36357 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727275AbfITVwq (ORCPT ); Fri, 20 Sep 2019 17:52:46 -0400 Received: by mail-pl1-f195.google.com with SMTP id f19so3805146plr.3 for ; Fri, 20 Sep 2019 14:52:45 -0700 (PDT) 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=BcKGfqptsJMIyqg8m+kdv7mwKKvvYfua8/fbCWYYrS8=; b=gC01BHP1P590aH1DpG92/2a9eu0OC50zfmGm/ISqUL+Edf8eKtzKtYupItgKC3NC4V YnGr79289Q1KN/q09yX1oZGTwgPpeMNTg9Ms/0sHXfbVLv+eRLYFb0iS5h2kMPx2Pt/H nm3cx01VKVxgVY7U6ZdSgX73IFqs2evm5lYv/fFrllMl3gQ4UBsg77QnTCUAkR1sLsfv OHXm5zlBci/Ps2gD1m7LsdNXuUKp9Um7cQeKq6bNJV3q2wNiCpKa2nBUTmnazNXOrJGL 24l+eQUYSg4WyryPMS4GYEZtqovCvhGgbQKyYxqim1UAVkBeE/IRUSQB1o5u83ISfFJj yZyg== 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=BcKGfqptsJMIyqg8m+kdv7mwKKvvYfua8/fbCWYYrS8=; b=bT87W7jvW8pD7wCVr8J/YyDdPLxufY9Fk5gckJgiWBbT5oorv79mdLEAXzh6NrFUU3 rC9leLZniYbW8+iE7ryW9ggPLOv0kvD9V+pB5/owkf+dzbYtSI7hKSzLalS/LpwNUprj OHdkhvW0zIWCmfARbR499nKgLwFo9+Xvc97yvuIgk9BkhnObPNIY9+f1RcLp0lWivDY9 o3VqJoPlSmNZSxcWp+24GsInnhY4yqSbrF0xI/IHm+5+2+qiQccH3DZ/aNWdh/5FNz79 ciNtVTODTS309zOZIZPeazX4JgnWx1CiCWYWCR3YAXUVjAD8jXy0ZkBmTKuFu4paqdxc FWZw== X-Gm-Message-State: APjAAAVRwyQZ8lIVjNKcgLTAsBfOpct4/6YZS/aVt3aqbdJSQqhQYL7L +d4g4lq2k24K6KdvxS3L4VIcrnqPu5zPVg== X-Received: by 2002:a17:902:8bca:: with SMTP id r10mr4121889plo.43.1569016364897; Fri, 20 Sep 2019 14:52:44 -0700 (PDT) Received: from localhost (wsip-98-175-107-49.sd.sd.cox.net. [98.175.107.49]) by smtp.gmail.com with ESMTPSA id 22sm3480863pfo.131.2019.09.20.14.52.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Sep 2019 14:52:44 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, masneyb@onstation.org, swboyd@chromium.org, Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui Cc: linux-pm@vger.kernel.org Subject: [PATCH v4 02/15] drivers: thermal: tsens: Simplify code flow in tsens_probe Date: Fri, 20 Sep 2019 14:52:17 -0700 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move platform_set_drvdata up to avoid an extra 'if (ret)' check after the call to tsens_register. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd Reviewed-by: Daniel Lezcano --- drivers/thermal/qcom/tsens.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index 6ed687a6e53c..542a7f8c3d96 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -149,6 +149,8 @@ static int tsens_probe(struct platform_device *pdev) priv->feat = data->feat; priv->fields = data->fields; + platform_set_drvdata(pdev, priv); + if (!priv->ops || !priv->ops->init || !priv->ops->get_temp) return -EINVAL; @@ -167,11 +169,7 @@ static int tsens_probe(struct platform_device *pdev) } } - ret = tsens_register(priv); - - platform_set_drvdata(pdev, priv); - - return ret; + return tsens_register(priv); } static int tsens_remove(struct platform_device *pdev) From patchwork Fri Sep 20 21:52:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 174170 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp3032646ill; Fri, 20 Sep 2019 14:53:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqztzJk6yc5J/4fJ3zrml9xTus/pPGU9VnI4EVjMEnGYf+JB/4nR7MlR+4mlxudID6zSUZWy X-Received: by 2002:aa7:c6c6:: with SMTP id b6mr16202140eds.19.1569016425994; Fri, 20 Sep 2019 14:53:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569016425; cv=none; d=google.com; s=arc-20160816; b=MnofQ8AKCxdLMGiwua7nx2Fh+N6XV4udfFX8V49YUuZ26EclLuQKN4jWpXabmXMiKI FU104O6yBC3dPZqcOg8nsNpXH0KGzQa0roEPU1Q4sCdI/T9YajGrBuBBM3zQZ0TwUj5U ZBzcyBRq7WHOARX1uP3/KXr6fdrhxVAJoupikapwH3WJARtpaWu2783CL8hZ8XsMoDvy Mk1DamF4KHw1p05j8VN2S/Ogcy8bGy9MzZnL541qmE5nJJBuaA1mxyR9tgBQPvl+6H6h Gykve8vYw0KvRTk3/SZSoPG+HXFtbb8ofltLr76sD/CBGoXvZiOdmrkg2WRhLprkf43y d+6A== 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=GSstL9++8v2jfjaKtHregZZ+QyubdM5bUACzzsQ3BDU=; b=FqmX7o6WXvAE9JQ7QJqRd+9HD5scxiMASCk+j1ncrcOBWk+l5hWk+YNZ8p1pls5TyP 9uJ01bwA6+QijLnMFUmfEoJWNJ+nUCOW7/7VSEipWx5DK9r4ETXYFGibiwMUeiLSjmYB 68HabIB5k6vApqU2dhxSIYb8hbcLWbmNggLOyonmZRN5Jo0h311t9tOqsz5vQWP3Bw58 1GWE0IFm4yoiSKKTrQosXnxD/Hd/QoeNKtPLWywFWNUcCTZEnFZQsvSg2qlVF/rik/ZL nnhyy1RfoNjBwA1ZJ1XCE8J+xlBVa8Ai7L+XY6mTHa1xn7O6wMTe1Jw9/k+GaO82hQOO haUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pn8AuEBs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 2si1860705ejq.243.2019.09.20.14.53.45; Fri, 20 Sep 2019 14:53:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=pn8AuEBs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1728575AbfITVw4 (ORCPT + 26 others); Fri, 20 Sep 2019 17:52:56 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:33150 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727800AbfITVww (ORCPT ); Fri, 20 Sep 2019 17:52:52 -0400 Received: by mail-pg1-f193.google.com with SMTP id n190so4590728pgn.0 for ; Fri, 20 Sep 2019 14:52:51 -0700 (PDT) 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=GSstL9++8v2jfjaKtHregZZ+QyubdM5bUACzzsQ3BDU=; b=pn8AuEBsQg6IVp5o/EFkA1GwSIJe/A+D+mi4hwspnqNA+vURyNrxL0ZDZOp6IJMBI0 3WjApcWmm1XqjkHvqID0v8lCFbd6/vGk0MGonDP/cdNGe9plvSl0C/HBXm7Lcpn03mKq 32rGcamzhzOZsc5GNNhVaVcai2Xv8iwc8lIxkcaZ0PDNHHT+oKXG19ig8NNzO8M3EgEK jK09ufDwR0x+Q3BnzZx6K5p4V537kz5EcQBMK0DOhtYKlurnKjAw3NawF/NnobZzsMkV DmEzFLZ3VO9VvVWh5OZeMvmhD3fDF9laVS5ID1Q90Pdj8a0CyWV9t3n203szNQcfktWY v4ww== 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=GSstL9++8v2jfjaKtHregZZ+QyubdM5bUACzzsQ3BDU=; b=F+fB+DBcvVPH6oZWzQfcvPuBHWcxESP6atff9q+oS7tNYBcXTHSjt5ppmvtOXPpmF9 5wy6QVRQMB+vrNiuTOmiE/0j1w1FawxyRxhC3YeIShNn47BozX8WlW1+JU8j63o72tTG Itif84Atr1IuRyOtLbd2llrT6k6Mn/gPBJVXOut0GxSSs9Bzdfpz42uXfZ60tuIW4dA4 lo9dTdwmZTY3Rqe9S8wEGndFszQduDf2y28ilIxUdp1jDT1twNThMXbxX3sT0NVx7iWw MrIhXD1ExHumL0MgbI7MaX9KOZ4Qr74LnqiBLvgRHkR5PVO8W8J4QQBA/D0Bqm6/0hSd YnOA== X-Gm-Message-State: APjAAAUQTVofADbPLmZBMJinSf9rhe/+vtv+5f0Ok076dHHRXeAaZgA1 C3jdQNicrOB4nMTnCOGkyzstue1aXdtWnw== X-Received: by 2002:a63:f745:: with SMTP id f5mr2785752pgk.175.1569016370970; Fri, 20 Sep 2019 14:52:50 -0700 (PDT) Received: from localhost (wsip-98-175-107-49.sd.sd.cox.net. [98.175.107.49]) by smtp.gmail.com with ESMTPSA id y15sm4049336pfp.111.2019.09.20.14.52.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Sep 2019 14:52:50 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, masneyb@onstation.org, swboyd@chromium.org, Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui Cc: devicetree@vger.kernel.org Subject: [PATCH v4 05/15] arm: dts: msm8974: thermal: Add thermal zones for each sensor Date: Fri, 20 Sep 2019 14:52:20 -0700 Message-Id: <6c3835cd92325b3f4ebc3885d9009b58d0cdf6b0.1569015835.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org msm8974 has 11 sensors connected to a single TSENS IP. Define a thermal zone for each of those sensors to expose the temperature of each zone. Signed-off-by: Amit Kucheria Tested-by: Brian Masney Reviewed-by: Stephen Boyd --- arch/arm/boot/dts/qcom-msm8974.dtsi | 90 +++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) -- 2.17.1 diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi index 369e58f64145..d32f639505f1 100644 --- a/arch/arm/boot/dts/qcom-msm8974.dtsi +++ b/arch/arm/boot/dts/qcom-msm8974.dtsi @@ -217,6 +217,96 @@ }; }; }; + + q6-dsp-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 1>; + + trips { + q6_dsp_alert0: trip-point0 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + modemtx-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 2>; + + trips { + modemtx_alert0: trip-point0 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + video-thermal { + polling-delay-passive = <0>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 3>; + + trips { + video_alert0: trip-point0 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + wlan-thermal { + polling-delay-passive = <0>; + polling-delay = <0>; + + thermal-sensors = <&tsens 4>; + + trips { + wlan_alert0: trip-point0 { + temperature = <105000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + gpu-thermal-top { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 9>; + + trips { + gpu1_alert0: trip-point0 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + gpu-thermal-bottom { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 10>; + + trips { + gpu2_alert0: trip-point0 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; }; cpu-pmu { From patchwork Fri Sep 20 21:52:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 174160 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp3031890ill; Fri, 20 Sep 2019 14:53:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqwDc4v21HhZyfVG4W/LuQMc/wrUoI/qhGB9MV5wVuR/Xx7RwNjUK7cW7UBx1DGAVxvEi7mc X-Received: by 2002:a17:906:7ac6:: with SMTP id k6mr20706962ejo.243.1569016382525; Fri, 20 Sep 2019 14:53:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569016382; cv=none; d=google.com; s=arc-20160816; b=PyCt9vX/Edo2C6180YSh8s6qZQo8HZb7Qx5gq7ldCx1HMF9TpgSBtOA8LLIfLrtB/k qBlrF9qHzy7aOkHJbwiqm4ILHfpHU9RRr48OxV9JDBz2V/iX2TzoUw7pbcZnTCuAhxjj Zzk8MiqFeLbSajsbicXuT3fae16ZjfkDfAvNdnHhHWkzbZcH7c7FQMQoZQQREdznkG7v Uy+qnJ+QHmsocJyM4mw+dnkJLgpgxQknuJmSCshFRkCR0dh6+7LOqTve6fHAf16RMVZo swdvDiZAclgxpWGp8/M53HZp1+MVJ/0CmejNborLFxSj1WM7f7dCZp8bIqAoS/cACF7E c3Ig== 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=3aqllZnhirWen18NJ9rLavBCP+/YOWA9zZa8CCtZyTg=; b=SJysDVeilRi9CtuM7eEzEWsBdOAJZq41SfjwCM9jY3kgk8fDi5Auqygd+I8z6ktd9K SpGHXIbVNuzs6LI0XXFFTBZpZ+zPGn1Ou8CsDZLQ6hQNGaVS2LQjcVBSeM+RDdZYeX7v o1JwtCCcO3/uMoL9PWxOk7DCQ05U6r+yTt4h4veDh9NHik6CDgCezk9cDJveVVEWpAVW P2PWFDUa0rclsfkk3Ud/Vq3hLJrqiy7/gWU0au6ut4PIp3nga0XdHOrKNrhnh8nE0LnU Dh7zv+wIzcSsIGwjHxk6v4+bq3lRZgo7p4sZiycqApQZI6cxvWWemzbXj+HfaAREsedq q4nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wMrJXc68; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 q25si2307963edb.159.2019.09.20.14.53.02; Fri, 20 Sep 2019 14:53:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=wMrJXc68; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1729558AbfITVw7 (ORCPT + 26 others); Fri, 20 Sep 2019 17:52:59 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:43711 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727982AbfITVwy (ORCPT ); Fri, 20 Sep 2019 17:52:54 -0400 Received: by mail-pl1-f195.google.com with SMTP id 4so3788970pld.10 for ; Fri, 20 Sep 2019 14:52:53 -0700 (PDT) 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=3aqllZnhirWen18NJ9rLavBCP+/YOWA9zZa8CCtZyTg=; b=wMrJXc68v9aJdzo+OnA3Mz2GYM11Il0OSp6IHgspaSr06VpOzVb7sLTylltNESBLoC /HNxT10D3zDISc0Si/wgimue3I/rZmmXqn6z0/VNgLPiEIWyMLyoyoXr/JUoTGVcUcXR /3zzsloGsSoGS1QTraOgpflGRpkx0KVor9OK631UYpJMJiifbHkzN/K/WieFPavf+DMj ZaUOxBvV41ataIyI1u3dbW4OoEGNIgVV3/bQLUx5b8Djrc9e9FGbZ6l9isNROYMxZV/T 1AEv1MSaqLKAung4VS4+Tkxzuflh8kG1SdW7a6BMUHuxSzr1w19zlmxy+/b38m2a2tEr 0b6g== 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=3aqllZnhirWen18NJ9rLavBCP+/YOWA9zZa8CCtZyTg=; b=J6FeW+9CfVTQbf3Ut+VeJe5qUAO/p2DLmoCqHjFg6VcB5yuM4SjC/qeDtf4h/Jenzb CeqPEppR1WzxO12ZnFBqyEVrdRbbJjbIH/dV7Huz9OjjmuRQLvREQJ1oObR7H+VrD/Sg hiiHEbQ62PE+/rZZLwPwNP/fWv1kbgRlIDYMRTFRyQkSD1miaWM1RWOh07xawKEdRYS8 WbnFnK7LR4RZ7fcrg0WJbATJDFVtix/bbh45qBH3k661CYrt+rxXwRBjDAgrHroJ1aoz 3wQ8ElUvIbLLDlQYgTU1ymtgm8hQZ4De1jWLMEC8q993idfGmJchEW1RgJQmgGyHGf5T pqHA== X-Gm-Message-State: APjAAAVztXP+3KHVW3qLHPXgfV0W9x9GoH65z1Z7uU2gIvIgKUY1vb3Y W80+I7+uI6a0TqtJGt84fADi0Ieu7Hb+2Q== X-Received: by 2002:a17:902:59db:: with SMTP id d27mr17849375plj.253.1569016372972; Fri, 20 Sep 2019 14:52:52 -0700 (PDT) Received: from localhost (wsip-98-175-107-49.sd.sd.cox.net. [98.175.107.49]) by smtp.gmail.com with ESMTPSA id c8sm2795740pgw.37.2019.09.20.14.52.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Sep 2019 14:52:52 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, masneyb@onstation.org, swboyd@chromium.org, Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui Cc: devicetree@vger.kernel.org Subject: [PATCH v4 06/15] arm64: dts: msm8916: thermal: Fixup HW ids for cpu sensors Date: Fri, 20 Sep 2019 14:52:21 -0700 Message-Id: <47305ec06a4b76a79aa073e4c0202a27a853a700.1569015835.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org msm8916 uses sensors 0, 1, 2, 4 and 5. Sensor 3 is NOT used. Fixup the device tree so that the correct sensor ID is used and as a result we can actually check the temperature for the cpu2_3 sensor. Signed-off-by: Amit Kucheria Reviewed-by: Daniel Lezcano Reviewed-by: Stephen Boyd --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 5ea9fb8f2f87..8686e101905c 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -179,7 +179,7 @@ polling-delay-passive = <250>; polling-delay = <1000>; - thermal-sensors = <&tsens 4>; + thermal-sensors = <&tsens 5>; trips { cpu0_1_alert0: trip-point@0 { @@ -209,7 +209,7 @@ polling-delay-passive = <250>; polling-delay = <1000>; - thermal-sensors = <&tsens 3>; + thermal-sensors = <&tsens 4>; trips { cpu2_3_alert0: trip-point@0 { From patchwork Fri Sep 20 21:52:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 174168 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp3032313ill; Fri, 20 Sep 2019 14:53:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqxZSNqKRoLvhrlWlC4eBHsNszqKBj0D0GM5Yn98n+Og6idYurLUxSR8zosy029ckYsn7pJE X-Received: by 2002:a50:9b0c:: with SMTP id o12mr24379955edi.303.1569016406392; Fri, 20 Sep 2019 14:53:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569016406; cv=none; d=google.com; s=arc-20160816; b=CrVnA4XrXn0nVmQTu3JbPGdh+9JFiBZUIGCUno+aVhhfRPjJzbAcGiB7LgbQwOixY3 7YhbTfK2Gb2UlltejrpPKDNRHROEKl545aFwsIA+K58Jxe1Qo402KtAxinBD/0wlbYpS TdIZYoPhBrtDDmBq6Du5eDy+g4L1SG2LboXCFDgSySXWflgEE6D+SbPS66fixpfTC4Q3 e/9vKKpMXy80h0WLoxM5L9hGmUYXuOjwWiJl/yC+gpA681DzgyIVv6HPiMAurs076Son 1GHO4KBL/4ndfVmkxSbXZSUwd9iHgR9ghtbmUFK74LnnuKifyYnqVJkAnhEm+vhXepQg APTg== 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=IJ4n28SxZJ7IvqWaQtHl+XJExCPSVNY+ailM0rBB2SU=; b=Gfm4K1E+nIM3oSuNFVoHNRV54k1DgjVzB1vjZQfMpNnwjnk4P1hWLkqoEqau+3v1uf +2VRWUsod+hli/Wy1hdwKyYiJhRthKzN4d01dhh9k6LyK0PwGs/oMUol/2w1n0L+/MHU VOAQoaWR/uDOTriGdE/YzU5fdR+ZohpD19H4pbh+7b2TtTfoN/78CyLnMS1+rtqA13yF y9jOH0iz6css3NihSYtCulfgNn7gF6dyLbanGFIostdMY3pdYLPiVTpECZGhXeq4J9qn uWDF4Bpoc0NcBYWCVRsOZcdzowrkWz1KQm4OWTPCArFWktOx/hAfBSwIDIJ+edX5cP0x ReXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UkPMAcEz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 j17si1642667ejd.314.2019.09.20.14.53.26; Fri, 20 Sep 2019 14:53:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=UkPMAcEz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1730363AbfITVxW (ORCPT + 26 others); Fri, 20 Sep 2019 17:53:22 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:41423 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730286AbfITVxJ (ORCPT ); Fri, 20 Sep 2019 17:53:09 -0400 Received: by mail-pl1-f193.google.com with SMTP id t10so3791002plr.8 for ; Fri, 20 Sep 2019 14:53:09 -0700 (PDT) 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=IJ4n28SxZJ7IvqWaQtHl+XJExCPSVNY+ailM0rBB2SU=; b=UkPMAcEzknmPEobUG1m2ht5TVb4w78FLI2j/Af1Wr3vK764lh5geyboC9LAdp5eiRN F5ZGZkGbwuEaDCfSm1eI9Mj57RlLf5x1hMhb9uFWJbIgbDPVWRpKES2f0wik07jyzbTa UJLl5shheFc/rt8fz1CDmLD397PCBXGNFg/UuSE5vKo6bdA0isg3kqA6NI65VSMNNUn6 GtxXbLp3nwCTZYPsKMZjs27//U4GZmoQczgzrtF3ODLiUnmOr6WZAlFNsNuwlKlcFvLo i7VUbfsEBAzi50canqRVxcl5gpYvpP7WrAa2+KPoGhzedD8mbSzYWoWrH8SMtkwzGjmM Fc1w== 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=IJ4n28SxZJ7IvqWaQtHl+XJExCPSVNY+ailM0rBB2SU=; b=pOzBCN8Pco870PsSch1f9dMogwElp4RlPQ6elHvrpgGok5TUKTH48tKo8MQE6ISl2Z ue79rjWuq0ILUuzbCZzj5Q8jAMxfkfZimpWJ2Eq3ECvTgFDa3WyWALuMkzGT3HySzeFN VbmGP78LVawZyc0tDrVAfYl/7Ij6RTVVK2tf5X1jYADhefbXodhYKnzruJjBCjqojAln Kj0L8ptJOlbX9UkCLqBvlObd8fIU2alja+BGQcujNrkOX2Kd01lt/zqZariBu4pHHPUR UI6aaCrHvdSEurJ5k4pJtsYieZ5j7LbK0Sj3SE9Ge9CGE/XVsCO/QBRzEERiwjhkltkV hm8w== X-Gm-Message-State: APjAAAWJPggNlom9YlNoMq7pJ44YghUjLLsVtlawdwlZ6aM241wmPAwG h7eF6+sJcWE0He9c2erE59a80+FGuJEfmQ== X-Received: by 2002:a17:902:7886:: with SMTP id q6mr19843551pll.323.1569016388887; Fri, 20 Sep 2019 14:53:08 -0700 (PDT) Received: from localhost (wsip-98-175-107-49.sd.sd.cox.net. [98.175.107.49]) by smtp.gmail.com with ESMTPSA id f6sm2910546pga.50.2019.09.20.14.53.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Sep 2019 14:53:08 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, masneyb@onstation.org, swboyd@chromium.org, Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui Cc: devicetree@vger.kernel.org Subject: [PATCH v4 13/15] arm64: dts: msm8916: thermal: Add interrupt support Date: Fri, 20 Sep 2019 14:52:28 -0700 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Register upper-lower interrupt for the tsens controller. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) -- 2.17.1 diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 8686e101905c..c0d0492d90ec 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -176,8 +176,8 @@ thermal-zones { cpu0_1-thermal { - polling-delay-passive = <250>; - polling-delay = <1000>; + polling-delay-passive = <0>; + polling-delay = <0>; thermal-sensors = <&tsens 5>; @@ -206,8 +206,8 @@ }; cpu2_3-thermal { - polling-delay-passive = <250>; - polling-delay = <1000>; + polling-delay-passive = <0>; + polling-delay = <0>; thermal-sensors = <&tsens 4>; @@ -236,8 +236,8 @@ }; gpu-thermal { - polling-delay-passive = <250>; - polling-delay = <1000>; + polling-delay-passive = <0>; + polling-delay = <0>; thermal-sensors = <&tsens 2>; @@ -256,8 +256,8 @@ }; camera-thermal { - polling-delay-passive = <250>; - polling-delay = <1000>; + polling-delay-passive = <0>; + polling-delay = <0>; thermal-sensors = <&tsens 1>; @@ -271,8 +271,8 @@ }; modem-thermal { - polling-delay-passive = <250>; - polling-delay = <1000>; + polling-delay-passive = <0>; + polling-delay = <0>; thermal-sensors = <&tsens 0>; @@ -816,6 +816,8 @@ nvmem-cells = <&tsens_caldata>, <&tsens_calsel>; nvmem-cell-names = "calib", "calib_sel"; #qcom,sensors = <5>; + interrupts = ; + interrupt-names = "uplow"; #thermal-sensor-cells = <1>; };