From patchwork Mon Oct 21 10:35:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 177044 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3223920ill; Mon, 21 Oct 2019 03:35:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJGMgkr70SiRHPkApmCDrAUp1KQ5zy9nC3LBXdm05yi1cORnulnBPFaF9K/f6qESeu5mLa X-Received: by 2002:a17:906:4d16:: with SMTP id r22mr6432741eju.244.1571654158386; Mon, 21 Oct 2019 03:35:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571654158; cv=none; d=google.com; s=arc-20160816; b=H/JNfdG5Q8OgJgelRnwcJcjsq5g6RiFSsLdOJCcoyhInHSL28AMTF40+EqKC3CbDLs ViSI8O4DxOXQmouSBR/ih+tAugsBAWoP03jXxAf6uiu7+4gKzr49SCPPiiw9wF0g5tTb b3RjqNpfvbbdj3eG9hBXY3AaLLo+yV5t/PngRRJed7lpzu9QZPasJi5jynOyAz6tc/WK RX/XCxeS8Xxa6gCVR3yFVpFR1YM+d2bwkyayljCisVncolsMh0+SuvFLVKpRaBdmeXNG wM85hAYCG4H38Q2DEoz9oRM2KJdHH1VfjPR9MngCwADFFj5IIRg/cQjMXwQfeZ7X67Ml QSMg== 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=cALbZwSOU8EvtF0iOAGpF4/JluhlENqnhyD2XhJQYmg=; b=jXm1hzX+VbThJtzVD6aA7ouXkiqJC1Q+QI0gRCN8asX54aB2e2MrvTOaoa+Spm0OQj 5X4l76qfa3gPMNoFvmFEN7KnnXS8kYG98a2/51F5WgluxsTx/PC5rYjoN/Hol6QOV4XT S3XEcThsl9LclrP6bagJrjvQ5i+m+ZzEnTTl2QbJMZz6DHsYFP9MrRdF/x08agGn/nwZ WUzKxFGdp1u4W5FYttDRLYYImwoOVdt+q647NFrYskWSGtjz1BgvYOj8MsQzGnBSm7s9 TB4HXe5PEMowcbSeFL1m3PL7mBrpsqO5nwO7p+jFiuRGJy9pyWQWrl9WOOWeG5xtFIIe dgiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H0BE8wee; 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 d17si8759892edv.76.2019.10.21.03.35.58; Mon, 21 Oct 2019 03:35:58 -0700 (PDT) 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=H0BE8wee; 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 S1728243AbfJUKfz (ORCPT + 15 others); Mon, 21 Oct 2019 06:35:55 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:41305 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728228AbfJUKfz (ORCPT ); Mon, 21 Oct 2019 06:35:55 -0400 Received: by mail-pf1-f196.google.com with SMTP id q7so8164900pfh.8 for ; Mon, 21 Oct 2019 03:35: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=cALbZwSOU8EvtF0iOAGpF4/JluhlENqnhyD2XhJQYmg=; b=H0BE8weeGQn2WySiuRb+gKaFVKFQ7KMLVZ3dRmtUOI8X5pcqHTFM7GXNw27rl2sawo P7jYI09TXntT0JzSLhGxYPIHV5GSPV6U+4apNg7kDFWtz5vu5CCgmtfyD5nbC02pl5Rl 47uIDf+hqdDydBjT1xdlYLy21GCjcBGTFliZYzQylLmwe5Ir/cs6FWAuy5wfGfJEIt9t VoQiw1oiGRpqByof/t7G6Tn1i/MVgJpqkCMzusZPJwmlgptfgbk/YvIX0QIbnyQr2LSC 5nfNsPnqowCRjdXzkCDfhdKpRkc4cjTfno9WAppgdirgW2zMsG6FJN3n+FLzNBlNYmIk 7MOQ== 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=cALbZwSOU8EvtF0iOAGpF4/JluhlENqnhyD2XhJQYmg=; b=JvTsGyEBJtsGXvwH+cl/acdPxk65SAUKGMHsjThf4tLBm+pyMmc/Mp8GZUA82kz/PA S2zAW/qsW4EPAKXErfVuVPt50tzD6R7qY6GFmwI344Gj7bSEkLXJNv5PRvKIbhi6FioH 3bqCWPPjMmTXoTVh33RHKv05+itELpwWJcr4nMPtZ/TrnuGtmdXSOAUxZNhGDlHlOn4b x66HhvO5OxAAHFyARig/YJxQtF6G2OzldT+IlMgoShbiC6gfjbWAJb7a9ZTS9+Xq+8Rg zsBXb9Jkeibb71QehcEJ71QO0yhikSVYcYbNEWZ5GpgAJPUi0dKweyopUJfhjC8li4p2 e14w== X-Gm-Message-State: APjAAAXe7hJ4bCuZwAt9Umxa6IpmgLXX8D9Fs8FQ8qQCjdZ61P2nd2hr FGdrZt+odLqWVsH8EeMRbYLp+g== X-Received: by 2002:a17:90a:aa98:: with SMTP id l24mr27995872pjq.96.1571654152956; Mon, 21 Oct 2019 03:35:52 -0700 (PDT) Received: from localhost ([49.248.62.222]) by smtp.gmail.com with ESMTPSA id r30sm15644244pfl.42.2019.10.21.03.35.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Oct 2019 03:35: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, julia.lawall@lip6.fr, Amit Kucheria , Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui Cc: linux-pm@vger.kernel.org Subject: [PATCH v6 03/15] drivers: thermal: tsens: Add __func__ identifier to debug statements Date: Mon, 21 Oct 2019 16:05:22 +0530 Message-Id: <18717de35f31098d3ebc12564c2767b6d54d37d8.1571652874.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 Printing the function name when enabling debugging makes logs easier to read. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd Reviewed-by: Daniel Lezcano --- drivers/thermal/qcom/tsens-common.c | 8 ++++---- drivers/thermal/qcom/tsens.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c index c037bdf92c663..7437bfe196e50 100644 --- a/drivers/thermal/qcom/tsens-common.c +++ b/drivers/thermal/qcom/tsens-common.c @@ -42,8 +42,8 @@ void compute_intercept_slope(struct tsens_priv *priv, u32 *p1, for (i = 0; i < priv->num_sensors; i++) { dev_dbg(priv->dev, - "sensor%d - data_point1:%#x data_point2:%#x\n", - i, p1[i], p2[i]); + "%s: sensor%d - data_point1:%#x data_point2:%#x\n", + __func__, i, p1[i], p2[i]); priv->sensor[i].slope = SLOPE_DEFAULT; if (mode == TWO_PT_CALIB) { @@ -60,7 +60,7 @@ void compute_intercept_slope(struct tsens_priv *priv, u32 *p1, priv->sensor[i].offset = (p1[i] * SLOPE_FACTOR) - (CAL_DEGC_PT1 * priv->sensor[i].slope); - dev_dbg(priv->dev, "offset:%d\n", priv->sensor[i].offset); + dev_dbg(priv->dev, "%s: offset:%d\n", __func__, priv->sensor[i].offset); } } @@ -209,7 +209,7 @@ int __init init_common(struct tsens_priv *priv) if (ret) goto err_put_device; if (!enabled) { - dev_err(dev, "tsens device is not enabled\n"); + dev_err(dev, "%s: device not enabled\n", __func__); ret = -ENODEV; goto err_put_device; } diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index 542a7f8c3d962..06c6bbd69a1a7 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -127,7 +127,7 @@ static int tsens_probe(struct platform_device *pdev) of_property_read_u32(np, "#qcom,sensors", &num_sensors); if (num_sensors <= 0) { - dev_err(dev, "invalid number of sensors\n"); + dev_err(dev, "%s: invalid number of sensors\n", __func__); return -EINVAL; } @@ -156,7 +156,7 @@ static int tsens_probe(struct platform_device *pdev) ret = priv->ops->init(priv); if (ret < 0) { - dev_err(dev, "tsens init failed\n"); + dev_err(dev, "%s: init failed\n", __func__); return ret; } @@ -164,7 +164,7 @@ static int tsens_probe(struct platform_device *pdev) ret = priv->ops->calibrate(priv); if (ret < 0) { if (ret != -EPROBE_DEFER) - dev_err(dev, "tsens calibration failed\n"); + dev_err(dev, "%s: calibration failed\n", __func__); return ret; } } From patchwork Mon Oct 21 10:35:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 177049 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3224303ill; Mon, 21 Oct 2019 03:36:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxcTOycXqgzykwv7EjfSQ5nJRUUD0ffonTfv8hrHwnyB2AgqNRgUFKJLtVZ3ecU03PkJE7V X-Received: by 2002:a50:97af:: with SMTP id e44mr11224058edb.3.1571654177861; Mon, 21 Oct 2019 03:36:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571654177; cv=none; d=google.com; s=arc-20160816; b=YBRaLa/XT+ssGLfEOoEM53ee+Ho3ttx+ZsQ+P+luZbVbDq3VzvoCJNDbO1jzT3vmrz xU6oA6Fe25zNncJYRGiOVuYgH+yPudjdgrWZKiKUO9Q6AEFnZKaPIdcyPZaJHlhs8bzL he7PWjl/Vg3pKG70I83Gtok07yloF7CzWw0GtiemZpqMiJGAjSzwhS/qvFNIDwD4zON8 gOfVyjXXyBAx/8VXXv1mR2qhgltGrVXLAxxz8XjYFxMp1oqPMCvOHAiGd9apKtvycxTe fe2QRgElb9jWtAXmsViipwbt8LzcFuf4PPkg9+lP2oIaRVKEBJayvxNz70q6xYwuDQ88 XD3g== 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=OduEoDNss3AClsOVOILgd3QefK3f48yVM80qRgfoc6I=; b=tTaqeW+exc1sUs/SyTBUhVjja+89zmr9H6saM3y672PSBT/CDPcW1/bIkMha81klkX iX/4Y7aqbqwMDGgDbi2LQ5AyKC4Ua6Cmdwy5Q9U4YhgtfrITuo/0BX+kU/5IucXEYSSj N3zJipzc840u6P1Yt3UNrsZ614d4Lz6R1yNLtnlTH7HA5IY2rCNHgBj9tlVi12d+rfw3 gIuVRH/ISg9qsBVJDhPi62ThtdJPqwVy5HIOztfxkSztCBmj41g4BTm9cvs99AxVo9rN cZX96afPwYvbllKl9pVTUjYJmOhynt3JlXLCaS09SHHs7b0Pdqj+RY99PrBvM77huI7j UxUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LCE4IgXY; 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 hh20si2079339ejb.95.2019.10.21.03.36.17; Mon, 21 Oct 2019 03:36:17 -0700 (PDT) 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=LCE4IgXY; 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 S1728320AbfJUKgO (ORCPT + 15 others); Mon, 21 Oct 2019 06:36:14 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:42060 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728298AbfJUKgL (ORCPT ); Mon, 21 Oct 2019 06:36:11 -0400 Received: by mail-pg1-f195.google.com with SMTP id f14so7538809pgi.9 for ; Mon, 21 Oct 2019 03:36:11 -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=OduEoDNss3AClsOVOILgd3QefK3f48yVM80qRgfoc6I=; b=LCE4IgXYNcL1m1VOeylfBui8KVijCrII8487VyiwvEfW40NyjW8qu2EgExyW4J/7mz vPgsQtbeUXljiHns5B6jnN3PheCdbJ3Nmt6M9Em72WHKtTnTVrbgAo4+2hVYuUsDG7nG NoAoiInr1+s5gZ5EF3xS26bBKYf5GipeO/AuZh9AR5inz6s2ALimAZBY50qJOQ0Owo3V QxKDAWmGpQ5/IHyJ+y5RubsOPzU1y2nU4FxXyE1wr1lwVCv1ClhtZML7bP/Cqmop8y0+ 1BwejyOfLrmCgGzaAxuu1G/VdI4Vmrv5NJ+8wOzZ4zWRunIXpnLnouvpDMsF/mYExgXX H1Ag== 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=OduEoDNss3AClsOVOILgd3QefK3f48yVM80qRgfoc6I=; b=ht9BIO2M7zJ6K1myrm0tjAsS+k5hO/GPFeKIOtqWVHFSd+6S+gs9bdiolkT4LemUWg bFwurBajd9h7xI/GBmdJjkEK3H12VhYbyv764ItVlxdlOmtPj+V7/pkQYF6ZHZfyi3lE dBesU+xGtpKHuWyvrVCKYeTXbp0rfF64ZYV/qJosSfJpwNR3KoCQR2cJGYtIRomdAwNl /pvGi4SucDVoeotrM6IkC5mp4eUtT3mFKbYjvgZ0IaIuvnxrSSp3C+cHX89GZFBlOy3y ATTfbZNnJUE/LUp7NpuwhT5ICrl7+Q7PQl2CeAEn8zlGSnw8XAYCIbc9HKysBfgb9Q8t MHfw== X-Gm-Message-State: APjAAAWzG7N3c8tgwmLEpTI3MDjVmYOcQWLVBAKt0a7dZ8t6j4z1XJKL 3sltHoFVBzG/aJV9wfq8ujP9Rw== X-Received: by 2002:a17:90a:eace:: with SMTP id ev14mr28630132pjb.57.1571654170884; Mon, 21 Oct 2019 03:36:10 -0700 (PDT) Received: from localhost ([49.248.62.222]) by smtp.gmail.com with ESMTPSA id x10sm13478847pgl.53.2019.10.21.03.36.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Oct 2019 03:36:10 -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, julia.lawall@lip6.fr, Amit Kucheria , Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui Cc: devicetree@vger.kernel.org Subject: [PATCH v6 08/15] arm64: dts: sdm845: thermal: Add interrupt support Date: Mon, 21 Oct 2019 16:05:27 +0530 Message-Id: <5a96df48e546576f90081bbde218e7cff88ae8ce.1571652874.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 Register upper-lower interrupts for each of the two tsens controllers. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 ++++ 1 file changed, 4 insertions(+) -- 2.17.1 diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index f406a4340b05e..0990d5761860a 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -2950,6 +2950,8 @@ reg = <0 0x0c263000 0 0x1ff>, /* TM */ <0 0x0c222000 0 0x1ff>; /* SROT */ #qcom,sensors = <13>; + interrupts = ; + interrupt-names = "uplow"; #thermal-sensor-cells = <1>; }; @@ -2958,6 +2960,8 @@ reg = <0 0x0c265000 0 0x1ff>, /* TM */ <0 0x0c223000 0 0x1ff>; /* SROT */ #qcom,sensors = <8>; + interrupts = ; + interrupt-names = "uplow"; #thermal-sensor-cells = <1>; }; From patchwork Mon Oct 21 10:35: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: 177050 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3224323ill; Mon, 21 Oct 2019 03:36:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqymmQYFEFBQzQwk1znPFvo7Sv9ev4XmRifhGoiHDMdV7QOVNguDFrFpZUglPe330Js+fNXV X-Received: by 2002:a50:a781:: with SMTP id i1mr24051109edc.17.1571654179188; Mon, 21 Oct 2019 03:36:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571654179; cv=none; d=google.com; s=arc-20160816; b=Ug4reyWRZarnKC4Mvr3zqzC9/T6VLj+YgiqyyTNO23dNpDAQvybOerpiT9zQQGCMNS pvC0u35VNfDcuig5eMn29X349cN1p8Ra8fkhg/lmO9sj4UgXjEdGnTKQuRlJ6b2zmyxL Ksi9H7/v0Zml4M2yIMBzlhVASX+khlj6YJMGlRs/GdG1gbu6ErPV/9MRcqFT9mb5Q0su 4v2bbqe4+TDpCbnwcgjus7raD+ko4IDWZcEAS2jSsy6u4/0EzDP9es5xvPXsMeQxdK2e ex+QxkLG/cpfN9UokVcZ37uqvqaTqtZvKY2Xj+y50tU+La8y2ghKwOFTpyrpGqB9Mrrr aDyQ== 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=2IiRgiTM6F9vxDGGzT2NtAOpx6JcpVZXk6Y75BALIx4=; b=0ser7xqx+SKp1/5aDW9Hz42ebdSCLmXJ8kJc/W30YEu4fdFDsnxnOVZq/MvkcOsW22 cgNOhdm+t2h7+1e/4j4kqi4g2GxRPti3Uu1G9Hnb36jtnTGlfFFiIKZkfmPI/udsyU/m f5LdJozFWgq9xpnRieZWlVNGIu4/jdCtZ/FKGh3LoEn5tjqchFrvcXGLzcL3udgQg7gB AuBFw8EM+CAf9Oag3DubQwQrWd+LRhKaWwEE/m6U2M0cy9C7G6f68Vig+KrhAJPhkkwv UDN+OpGEbSaCCEhfgOUtPYgGr+bDVidhUPjjw1oeEw5x0Y4QqJrfz7TUMoY5ijdt2iIE YrTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BjSuOJtK; 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 hh20si2079339ejb.95.2019.10.21.03.36.19; Mon, 21 Oct 2019 03:36:19 -0700 (PDT) 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=BjSuOJtK; 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 S1728327AbfJUKgQ (ORCPT + 15 others); Mon, 21 Oct 2019 06:36:16 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:44429 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728323AbfJUKgP (ORCPT ); Mon, 21 Oct 2019 06:36:15 -0400 Received: by mail-pg1-f196.google.com with SMTP id e10so7540838pgd.11 for ; Mon, 21 Oct 2019 03:36:15 -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=2IiRgiTM6F9vxDGGzT2NtAOpx6JcpVZXk6Y75BALIx4=; b=BjSuOJtK3drQAP8E7EwmzkokCuHGKPJ357gj1CcflWKavwzbuGvGoPsEavjboOpPSn t79OVYbPbAK2TUQ/bbC3InUym6paGm7OZbppRpSb0VzwnLrRkmeoHlX9IN8DtUlpYWU9 Gm3NOAYISoPAFq1TSYaZXr3bjGcnKEgn3UR11mlwYpB9ptJ0QTh2D7iQFOgu5A0IVwp2 vx6q4T/uhXGj9YOwwe5fj3GhV/pt8gViBuzzG0rNT/fJIWhdLBu7251pq0X8/Bor1nG3 RexJMFNN6rxZOoQGNr9x5uc2BXJ3Hv9Ezt68ET2UqG9gXXHd0ChHK2+QPf4rv+cEYAWv 6Eyw== 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=2IiRgiTM6F9vxDGGzT2NtAOpx6JcpVZXk6Y75BALIx4=; b=pGr4kQaDrckkFUNLAm6iiSUNsa457ZmoEdFv5jpu+M1aQ8Wdc+iotmHgu/3C5oys/k YjTO5QAghwGFBhZFy+v+Tzgn5mtR9alCSyKySh76BDrAVb0la2MDk161Lf25s6IaqfL3 vQ7BNoC6vIL2K1JgmFesH6xactlEieQw/Q2eCAoggUkFIuiBNrH0p8qDJAY6LosW0xBQ Lvtnq216eGi1tqfMGuPxURah/dQ56rstyoTPmffKvUno27gKDsyhEWoRGV0MSVt1rQg3 nLgJEoqsGzAtYn+ywj+Cg4U08MtKJdYtkFWlK28MF0KM2YLGX64bMym2ldlvI326ZzrM c90w== X-Gm-Message-State: APjAAAXiIzcG2XCro3VT8E2siOfgQRSgL4eqHQMx6mSq6+1kBczQuHbj VAbQYjNrZc5Oz3LS6Y8WbpM/Jg== X-Received: by 2002:a63:f743:: with SMTP id f3mr25362784pgk.410.1571654174769; Mon, 21 Oct 2019 03:36:14 -0700 (PDT) Received: from localhost ([49.248.62.222]) by smtp.gmail.com with ESMTPSA id v9sm14754293pfe.109.2019.10.21.03.36.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Oct 2019 03:36:14 -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, julia.lawall@lip6.fr, Amit Kucheria , Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui Cc: devicetree@vger.kernel.org Subject: [PATCH v6 09/15] arm64: dts: msm8996: thermal: Add interrupt support Date: Mon, 21 Oct 2019 16:05:28 +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 Register upper-lower interrupts for each of the two tsens controllers. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 4 ++++ 1 file changed, 4 insertions(+) -- 2.17.1 diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 87f4d9c1b0d4c..4ca2e7b44559c 100644 --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi @@ -591,6 +591,8 @@ reg = <0x4a9000 0x1000>, /* TM */ <0x4a8000 0x1000>; /* SROT */ #qcom,sensors = <13>; + interrupts = ; + interrupt-names = "uplow"; #thermal-sensor-cells = <1>; }; @@ -599,6 +601,8 @@ reg = <0x4ad000 0x1000>, /* TM */ <0x4ac000 0x1000>; /* SROT */ #qcom,sensors = <8>; + interrupts = ; + interrupt-names = "uplow"; #thermal-sensor-cells = <1>; }; From patchwork Mon Oct 21 10:35:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 177053 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3224486ill; Mon, 21 Oct 2019 03:36:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyvzsSbtDpPvtwktZqAPG4xtDgvhaukQJaorTNbJvPSeBUZdblw20EXwHocdtO8A+fr+on7 X-Received: by 2002:a50:8969:: with SMTP id f38mr967567edf.211.1571654190160; Mon, 21 Oct 2019 03:36:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571654190; cv=none; d=google.com; s=arc-20160816; b=syXZpRfs1lBvYIThtML9z9j0soeNebO38gQA9zx7D4Wb1GsoWU+8y5dq+gv8QNAJSy RkYk59HG3A+RWsn17rO6PBfpRXakz8jTIs8z56zIyAHeAC2Zy+g7aAhxRC8OA3EUEz51 uPTC+HfTlyZopDCHWh8BlA9SOp7SXCvtZ5GPaOO6q8XUSGT5aUI/uFKCJnGCBK+WeSnY k1zOHLKCuKMbSp1H+WAh7R11cJH4mphKDxwnQ3TyCR09qDAQwrNnKRVjkJ3k/1HJsU7n uapE8z4/cJRbvQ1+nNWae8vEzPyrzVGQ3oHs4U4x5ZNRkxQum1U2kvEOF0CX6rrYSwPt 3olg== 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=iVqqU2LAVSCsGxONMpzjN5OaSzKTS+PP+RlrbsDHeMo=; b=FdS1U2/qz1sgyTSzbWvY88VyuVX60hGa8nXYYOgSiiEnWRoaPdVf4iJzZ1EDTDE0Uv cGJq2JVoluKSgXPfyIl+7JgWkBiakeahj5u47zMzh614J0I1LoAq6aYxe8FLSVb3sHpe Mr3kud1dBBPuptsfSp7c12dWBghU0gs4gCCz9jbYH95YSiaC63QOAeSGf5jyo9GI+J/D ocBPkVgd3VdlSnYA4v42gO9sdgOiEzRhOuIT3srmtv5MxQ29HaBEyDp4IUcJwXsjmGO6 ni0K609TyCC8xTUXjHVS0dVVgGO3QMVCECAZ51JrRUCNjpL5WzUWZo/SsOcrfyRUpQ83 T24A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="S9EG7QY/"; 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 i4si3743917ejj.21.2019.10.21.03.36.29; Mon, 21 Oct 2019 03:36:30 -0700 (PDT) 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="S9EG7QY/"; 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 S1728374AbfJUKg1 (ORCPT + 15 others); Mon, 21 Oct 2019 06:36:27 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:40295 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728361AbfJUKg1 (ORCPT ); Mon, 21 Oct 2019 06:36:27 -0400 Received: by mail-pf1-f194.google.com with SMTP id x127so8170613pfb.7 for ; Mon, 21 Oct 2019 03:36:26 -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=iVqqU2LAVSCsGxONMpzjN5OaSzKTS+PP+RlrbsDHeMo=; b=S9EG7QY/ZgkmqHhRziKbvL3c/VYqOHXyxeTbUYe3phmidMNW6VBcGWA5qYT94oVvwV FcDAXIrZHnwKaZPodf4BPLNtpvyHt05p/WPYzzGomf3ic9a1bgRqcT47c3YQX1kTBzTP TPm2ahWz0pTsWGK1/SUEJ7Eq8+CeuaX+8RSWgQaP+HdnHfbZfdDo2skD2ZdD0OnEMidt mKa3+5D7lLpBUC5WYONM+bjVgGtcN/CH+LHb3+baXgPFR+unyWMICbOgLOWfzCi/Od3z +zswnyNg6Q+4KhQqLJbYtWR5WeASo8JWdwRweB759Abf+83GPYHQHcfBc+UQYlQBDpIa FLoA== 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=iVqqU2LAVSCsGxONMpzjN5OaSzKTS+PP+RlrbsDHeMo=; b=UA3CWetVhsV88mufBItN7o77Ua4sTEUBqY7jGm2yIarUOFl53oBoX5uU3HJQGbPCgI HzYl5cY1BLJIpYveADzTsROY2CfUMRV/PWbySNt/ydPjd5mC/RcI2uzJcr7NVGRA3P0y f1FPIzgHuTNnJd8J/Z3D6nvEVMCAFgK4HXZHZNcLvQeP9mLCwFgBNL1d8ayJuqbhqze2 TQlDosxJok3taihSP2fO3+47qYE+MEy3XQOxHD7yhfLv+xVCwhUHdiwkFLGJ73VzdbDR Unvzoe34d1vBy3Q08c7K2rHKlqVOMfkv3LuU9Iqj5PcDr1AT6gEglMB9iTaPvCzQUoH5 14Iw== X-Gm-Message-State: APjAAAUHdsq5juaskrQzNlc2rvN7jCOduOGAWLW920/ZnNffl1Op3l+V H9V59ejleXDY2YDYccR0WJc/BA== X-Received: by 2002:a63:cc4a:: with SMTP id q10mr11017952pgi.221.1571654185644; Mon, 21 Oct 2019 03:36:25 -0700 (PDT) Received: from localhost ([49.248.62.222]) by smtp.gmail.com with ESMTPSA id e192sm15379176pfh.83.2019.10.21.03.36.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Oct 2019 03:36:25 -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, julia.lawall@lip6.fr, Amit Kucheria , Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui Cc: devicetree@vger.kernel.org Subject: [PATCH v6 12/15] arm: dts: msm8974: thermal: Add interrupt support Date: Mon, 21 Oct 2019 16:05:31 +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 Register upper-lower interrupt for the tsens controller. Signed-off-by: Amit Kucheria Tested-by: Brian Masney --- arch/arm/boot/dts/qcom-msm8974.dtsi | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi index 33c534370fd5c..c1a3a7d7161cd 100644 --- a/arch/arm/boot/dts/qcom-msm8974.dtsi +++ b/arch/arm/boot/dts/qcom-msm8974.dtsi @@ -531,6 +531,8 @@ nvmem-cells = <&tsens_calib>, <&tsens_backup>; nvmem-cell-names = "calib", "calib_backup"; #qcom,sensors = <11>; + interrupts = ; + interrupt-names = "uplow"; #thermal-sensor-cells = <1>; }; From patchwork Mon Oct 21 10:35:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 177054 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3224519ill; Mon, 21 Oct 2019 03:36:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqyt3iEB6fN9Bx34JpCjuFz58UgjjrGAMmovLenYOrHc/74nz7rnweiX1bwUuOxlM+5tzYOF X-Received: by 2002:a17:906:e2c4:: with SMTP id gr4mr6210737ejb.260.1571654192784; Mon, 21 Oct 2019 03:36:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571654192; cv=none; d=google.com; s=arc-20160816; b=pOAZAk8p4zA8DgLDtnJR+il32jZqWdxDwODh+0SHmfhdldSm2jqRA1fukr3rQE2uhs ZuWcv1XqIhVUrMJbzhMOzin0XXFWhF+q25yP73jWt/Pb6ojUvPGBLz6e0bFSRFl/Yr2E eOP5M8hgN87UuYkLxiimmlH13DZw1J+Aqw4qQePlOsWMaLcxmAWfxZpGxrgD3z0pPbj4 O82CKQQmum1rcC8DLw0wFrRVc5BAd4Kw/wlT2pijxjI1hfR/giQdePJX45azRBbT6Puq jJgRo5YXwnwBwN6MZdpPGq4JHjVQgSoHJ55mgsTWgmDAuq8SgLv8gAxtyO2dmwjCQw2g D36g== 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=raRv91SuwpaXlGeT2wU6HLI9/SHJRwKCyqG5FDUj7WM=; b=RnHyKaDTIIy+Sl7oaDtMIXT/kZCrqpC8pDKoBZsLV7n//BmuaGXhz+14rLyxsR8rB7 UTqv86Mr08+2nNldhOZfZcXTLU6N3i9r09xFfvKxPQpRjfCjMGcZLjVRtRPE45XhxsIz LTWCLgGVb7XA44QyGvJO28AcYjBGtEaYim60Al/Pc2FYjvbZLhNk7LprWMxWssalNg/K UV0Lj/rUq0c2pNmoiVnZV6+C6lY6puugd3EogNuQUZ/AggJqckNj+DzVTzRX3puWgFaF WrWykEvd4AUKaK0qtnn1LeiFYLcpBQDMr+Da5D4F0CZqyBMX4imDhSVuJNIJjXIYvIxO A9lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dfN7WGSg; 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 z7si8434016ejr.99.2019.10.21.03.36.32; Mon, 21 Oct 2019 03:36:32 -0700 (PDT) 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=dfN7WGSg; 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 S1728384AbfJUKga (ORCPT + 15 others); Mon, 21 Oct 2019 06:36:30 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:34732 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728385AbfJUKga (ORCPT ); Mon, 21 Oct 2019 06:36:30 -0400 Received: by mail-pf1-f195.google.com with SMTP id b128so8190063pfa.1 for ; Mon, 21 Oct 2019 03:36:29 -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=raRv91SuwpaXlGeT2wU6HLI9/SHJRwKCyqG5FDUj7WM=; b=dfN7WGSgkXXOa/URlH/ad/gRg6gnfjIsMBdB5HASF7KGk6e3vgPOKuBUdrQonzvxbl ZabWSM5RBGxt9NZhV2CYQS7Re/oJH5LHCS76bWGl3dYzeWFKFBemK6203svGG9zzeErK R7SubW3IktLLP9997uvwDu5MDI/8VHhY0dVMH+OBFiRIeKkawfreLDLFufFg++ep0JJu 8aTHfZcuchruuOfibLzKpvpmuCJQOD9bfiZHBFbS7MXOhnnwVBPG41CS9RisyJfs2Dui lLPGF0KkbdVE34XIzLU+DIbaUYZBrC2+83vdWkUscpdsWoFc7H15PLXEPR/klZ1ea5qr NC9A== 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=raRv91SuwpaXlGeT2wU6HLI9/SHJRwKCyqG5FDUj7WM=; b=Sxc8IstMcHS91nBDq194AxROsoST/mmkWocdN/5LAfBU5XAkZF3XP0aIqUE27pwhMd w+fRzKGkL2WYLIV3fOSEcuaMtmIeMItcyVDGa21lnuy+2UdFcpJkVCmWyZhrvUnNPdej b7bsxd+iZHZI+xAJyr0OVeRwBp5VG+r0T5WLrgVSxX/FzuJ4RdzAI7VipdU5JgJuFJKV mSdpG7SMhEqQyTyxb62mp4Avf9k3uG3mPMhqfZa5ZTksQjNzOhiCnfKApXfdFwhGRbES YddLV7merWxD+v/19cgePfpB/Aw78LmdV52u7hnqNj3co/kcp8eGQAgLCKSbE9A4xagN k+DA== X-Gm-Message-State: APjAAAUqcnwN2s6jhRz2dqUenHiDn3KTEN35kyC4akdWrGiKuqQAPT3M CpImn0FxN9889xC/rh7SURntnuzqcJBG1w== X-Received: by 2002:a17:90a:86c7:: with SMTP id y7mr26839634pjv.82.1571654189240; Mon, 21 Oct 2019 03:36:29 -0700 (PDT) Received: from localhost ([49.248.62.222]) by smtp.gmail.com with ESMTPSA id y22sm13192289pjn.12.2019.10.21.03.36.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Oct 2019 03:36:28 -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, julia.lawall@lip6.fr, Amit Kucheria , Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui Cc: devicetree@vger.kernel.org Subject: [PATCH v6 13/15] arm64: dts: msm8916: thermal: Add interrupt support Date: Mon, 21 Oct 2019 16:05:32 +0530 Message-Id: <88eff964b708c8aff57b24370d2e14389ace09e9.1571652874.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 Register upper-lower interrupt for the tsens controller. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 8686e101905cc..807f86a4535e0 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -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>; }; From patchwork Mon Oct 21 10:35:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 177055 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3224615ill; Mon, 21 Oct 2019 03:36:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJY6gXRwM57SwdoezkSZoEMh/L7I9oykz1euXec/z+LhK0T5cEEhNXNjaS6cnprNTlc4GR X-Received: by 2002:a17:906:c49:: with SMTP id t9mr21347620ejf.267.1571654196839; Mon, 21 Oct 2019 03:36:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571654196; cv=none; d=google.com; s=arc-20160816; b=DtPoCQ2OOdKeCkVJmnvD0qRjObgujE9vmCH3hfTlIrfF54+aBJRoBYb/YEHToG3Axo HRCgjm1Z630qcBN9OGrjl4Crukdy05HQYDz4viYzbdlVnppI3eVB6b+5aXSP0bkueS2T bdtXHkmy5pXUMhVmtVnd9xYSNHyMjhEDmONxW83dmejeTa9VKBK7StNIHaoIYZwLFly9 ADHG49+zhqftxZ9clW5rrT65iS60LcxzQUEaW3ud4I/U/wAsascT+8I8ukKJxFz8wZpL Pdn3LQGxY7BMOmTbT5C11+ekdhxo/62Txfzy/WhUWsnBcmk9ZuCdi5sHiRa4MFzOrtmJ Txsg== 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=0WsTUto1EYkvMJZ+e6vQdDqYayMlmhgUas0MuLlp+q8=; b=U3t1FWvEvI0NeveAOGzp3g9fLjWrn02+ISELS3nUvu42+W77WRZFOpSmraYmps4I0I iONMWgD3rkc8GsZPKqBSvY0rmez03Siu8trmOdYMGJC6geAI2leH8sS2kUL0qXYNBcqP eWlJNoe3CSqUntUkQxdaOpyaqfZ1yc6mXGMz8JfVn+UrLnezowshNX7ZX71dlfu4+24u Ly7N9JkgHLKdgdqpgBeSnMgJMBaJMsjOILGQc1ZedjXPL/l/3tDUEyRN4MduvEVFyRbK M3y6qud1glXHM6UpAkp5m+ODVUrpDYiz9JRNfYK2M0zHzeRq2juwVuzkAFZ426wu39uv M5rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BuiQwH1N; 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 jx7si8421643ejb.84.2019.10.21.03.36.36; Mon, 21 Oct 2019 03:36:36 -0700 (PDT) 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=BuiQwH1N; 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 S1728400AbfJUKge (ORCPT + 15 others); Mon, 21 Oct 2019 06:36:34 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:45549 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728396AbfJUKgd (ORCPT ); Mon, 21 Oct 2019 06:36:33 -0400 Received: by mail-pl1-f195.google.com with SMTP id y24so2471820plr.12 for ; Mon, 21 Oct 2019 03:36:33 -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=0WsTUto1EYkvMJZ+e6vQdDqYayMlmhgUas0MuLlp+q8=; b=BuiQwH1NuI9rAQ1fNEk95k5s7p7HCgQHuiuf4lSnqToB9zfnVQdTxIWcYh+AzYJSgi 6DZcFpM5mQXM44D1usVII25lesoY3vJwT6lG85Waj5JbOt1YjwX76iaevWi1k0gnAatK CemNiPO51im7lMFWfCPsXl00qbm4xeNUKbEFuCnTlIQuLYTLTvQBMxhIZl9dteKECikG Zd5tv/df2quGJ+fm4aHBG99HtO8UwW4+HWLe8zO3gHPDaRTEYCsX1+LimJXozZcZ8aiz AOttS8XF14h9IVT+9Rwpb5GOtd62RRHXezu86KXVDqW/xqhsej+GFW/fzWyuCgy9HhB7 2OZg== 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=0WsTUto1EYkvMJZ+e6vQdDqYayMlmhgUas0MuLlp+q8=; b=NuVXa8nN7khxk7yqfqoyVvkmKCwc1wyl5fyoMqa2ESNCmEoP8aMEJ8aVvxqKu49+pJ +M3wXFaohLL/Gl5LPxCia/5h/tllp/1oGnvxymd6paEJ+P/2H701K2vcAMTI3jzywagn l3icEgTv0C/hzrstRVXWCSUBDTF6ZIeF1Syij2m5wVJXBcmS+CmgG+TjkJIAVPqySh4M 1DwHbFs1+zEHBqhEoQ0NG0am4R2RF0QkMf3Hds94PDEJZXd0rWA5UUr9u6vnqadjV9BM rZBmAeKDHjS/8JQCtpvsOnfLCI4YphW6E5yelGgBhpMNgkC3lU8GhSTmXgI4JzJNmW6m pJoA== X-Gm-Message-State: APjAAAWzULt/82TSoC7RozPU7nziZ07PfKtaXFm3tLkLsiBKV+3VBHP8 /UPzUXkp2j5b/LnXabGfQPKOpw== X-Received: by 2002:a17:902:a618:: with SMTP id u24mr23620577plq.112.1571654192631; Mon, 21 Oct 2019 03:36:32 -0700 (PDT) Received: from localhost ([49.248.62.222]) by smtp.gmail.com with ESMTPSA id p36sm6572055pgm.55.2019.10.21.03.36.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Oct 2019 03:36:32 -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, julia.lawall@lip6.fr, Amit Kucheria , Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui Cc: linux-pm@vger.kernel.org Subject: [PATCH v6 14/15] drivers: thermal: tsens: Create function to return sign-extended temperature Date: Mon, 21 Oct 2019 16:05:33 +0530 Message-Id: <0689917475cf83b7e01f6978504fd37352a5e3ca.1571652874.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 Hide the details of how to convert values read from TSENS HW to mCelsius behind a function. All versions of the IP can be supported as a result. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd --- drivers/thermal/qcom/tsens-common.c | 49 ++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 14 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c index ea2c46cc6a66a..c34a1a26ce298 100644 --- a/drivers/thermal/qcom/tsens-common.c +++ b/drivers/thermal/qcom/tsens-common.c @@ -84,13 +84,46 @@ static inline int code_to_degc(u32 adc_code, const struct tsens_sensor *s) return degc; } +/** + * tsens_hw_to_mC - Return sign-extended temperature in mCelsius. + * @s: Pointer to sensor struct + * @field: Index into regmap_field array pointing to temperature data + * + * This function handles temperature returned in ADC code or deciCelsius + * depending on IP version. + * + * Return: Temperature in milliCelsius on success, a negative errno will + * be returned in error cases + */ +static int tsens_hw_to_mC(struct tsens_sensor *s, int field) +{ + struct tsens_priv *priv = s->priv; + u32 resolution; + u32 temp = 0; + int ret; + + resolution = priv->fields[LAST_TEMP_0].msb - + priv->fields[LAST_TEMP_0].lsb; + + ret = regmap_field_read(priv->rf[field], &temp); + if (ret) + return ret; + + /* Convert temperature from ADC code to milliCelsius */ + if (priv->feat->adc) + return code_to_degc(temp, s) * 1000; + + /* deciCelsius -> milliCelsius along with sign extension */ + return sign_extend32(temp, resolution) * 100; +} + int get_temp_tsens_valid(struct tsens_sensor *s, int *temp) { struct tsens_priv *priv = s->priv; int hw_id = s->hw_id; u32 temp_idx = LAST_TEMP_0 + hw_id; u32 valid_idx = VALID_0 + hw_id; - u32 last_temp = 0, valid, mask; + u32 valid; int ret; ret = regmap_field_read(priv->rf[valid_idx], &valid); @@ -108,19 +141,7 @@ int get_temp_tsens_valid(struct tsens_sensor *s, int *temp) } /* Valid bit is set, OK to read the temperature */ - ret = regmap_field_read(priv->rf[temp_idx], &last_temp); - if (ret) - return ret; - - if (priv->feat->adc) { - /* Convert temperature from ADC code to milliCelsius */ - *temp = code_to_degc(last_temp, s) * 1000; - } else { - mask = GENMASK(priv->fields[LAST_TEMP_0].msb, - priv->fields[LAST_TEMP_0].lsb); - /* Convert temperature from deciCelsius to milliCelsius */ - *temp = sign_extend32(last_temp, fls(mask) - 1) * 100; - } + *temp = tsens_hw_to_mC(s, temp_idx); return 0; }