From patchwork Tue Dec 3 05:23: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: 180698 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp1067808ile; Mon, 2 Dec 2019 21:23:38 -0800 (PST) X-Google-Smtp-Source: APXvYqy71dMQWSQX7/4/Bs5O2Xzu7q48a0esSs7M59flBETpOdW+z/MeNyNaMVmfPNeqFp5AD7zR X-Received: by 2002:a54:4e86:: with SMTP id c6mr2171069oiy.140.1575350618365; Mon, 02 Dec 2019 21:23:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575350618; cv=none; d=google.com; s=arc-20160816; b=s1thO8svogl8yW+DF7ykwdfbIEo0dy6umxaTQPqAUGh0UW8Lzh7MRKuck6TLIS8nh7 RmogpPL6D8G4lsvEnXCVk9sCPxpAY35irOsqQL1/FwwK05RRORWP683KawXqQ40baht+ mRCpiMcQShYOcg4yOFmhadBLf/DpHS6clB7IQ1rLUPfWzZBPubKwEYmjAtsMySC5qL5E Kmi7ZaYB5x2CAC1S0wvkp9hC7z9bhsRSYoxBqdv9viTluG19I+QeFmZdlH/SKTQc0Ftg T5/sgMbO0YA5pMasO2HbCZ60M8YbccJIG0/GA0kOu7YgD5u6Ai0jJ7kouiwKbXhz9h8V Bg2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=N6/Vfj+VnloKWDrO0keM08fpBsJsdBma6GiUwIrec4g=; b=Hzxrd2YeSXJNaan1HrZgCPUH/jqO0UI7Do8laxFL97vGd2MrBKPpsO30SxsxHvllCN /sNcKyuawMAxXbm+21Yb3Aju5wuZ5rHQZlyTlHU4YYOyV9xQ/oWpuqZhdb+3gGWYZbND XXIfXyfPik1OM4KDe2CYf52+vtyGpAbFSwGzq4gWrT4T+qHRnkwFUPZwLfNU0Jtj6LDo LQcrTl6FoZKX5RJICZJwyULz3I1EWAkGexJI3dYLPJdRqzTmG6+LHvJwxhFpKjC+3it9 2AJL0CXPRXCxJdUMSandV9989nqoyEBPeqEYm8VOGj500BMlwamLBLX9zbhuZntPOEDY cDRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IaOrcClV; 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 p5si740292oto.116.2019.12.02.21.23.38; Mon, 02 Dec 2019 21:23:38 -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=IaOrcClV; 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 S1726480AbfLCFXh (ORCPT + 15 others); Tue, 3 Dec 2019 00:23:37 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:41637 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725907AbfLCFXh (ORCPT ); Tue, 3 Dec 2019 00:23:37 -0500 Received: by mail-pf1-f193.google.com with SMTP id s18so1238692pfd.8 for ; Mon, 02 Dec 2019 21:23:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=N6/Vfj+VnloKWDrO0keM08fpBsJsdBma6GiUwIrec4g=; b=IaOrcClVOiytYPvZ/GyCl7kuuxS2MieZf3/zjMPjFrj1hz4nMh0GOUF3ReKo5ZnWXf sPqyz5YDiyjHrw3XjxPMjk/o/XFjBsvHNSB/+lzcKq3tm8wl6TA/lG0zXQkUgQ0xYrla ZdBYtFqJNDJYrLis5h4xdxE1egpYECrCh139U07hObomwBHkq0DSETdfgomv90oUAE5A mSXh7q0x568TE1zri8FftVKmhxCnyoHwGFI+K6+WR0fmhxvjEOSdUiPm3U4KGcNPuk4J /M+2yK+X1ATkKfbLKQsnmnWS5zuAmak7jSoX/81fPeooerKiexIomdAsxJG3OSY4J3tR t+AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=N6/Vfj+VnloKWDrO0keM08fpBsJsdBma6GiUwIrec4g=; b=O4g5DwZgKFV1sETJomqNfJ8aPhQihZ/JdOSPCBWSwW/ytUPbG+fh4CtSY0K3vcsiaV ID22KZgYuXgmj0m3oQ2t1i7X4flRfuXpvxyLGi1eX6aQujl1el4Ua+kRn8LqJmczUP6q +ecrD1Q6kpp9T2R3aAJK/EAYHVw0g37G0CjmxHKgWxItB7Ppwu4wNKkMMGtj2XD2b8d2 9l4WF3hjjrYSD1fzLGUVSd9RYlycIVZQYfZagNR4/vz5dGsgkfoJY7bLBGtYaAzkj/jD 4Y8qTgiO4gRGS8lGNdGa2bqvHLqwRm0wPT7MMvLA3fuC2wqnwG9Zfa42OY3bKd42u7Hw G1zQ== X-Gm-Message-State: APjAAAVxNaWpx0XoNE7DQPKuKU3nsH9LtM59kySwn5xjR9H2LBPh7EGX a534uk/pAEpMJbqk3AMwVX5GQQ== X-Received: by 2002:a63:1a22:: with SMTP id a34mr3250138pga.403.1575350616626; Mon, 02 Dec 2019 21:23:36 -0800 (PST) Received: from localhost ([14.96.109.134]) by smtp.gmail.com with ESMTPSA id d23sm1379850pfo.176.2019.12.02.21.23.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Dec 2019 21:23:35 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, swboyd@chromium.org, sivaa@codeaurora.org, Andy Gross Cc: Amit Kucheria , Daniel Lezcano , devicetree@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH v2 0/9] thermal: tsens: Handle critical interrupts Date: Tue, 3 Dec 2019 10:53:21 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org TSENS IP v2.x supports critical interrupts and v2.3+ adds watchdog support in case the FSM is stuck. Enable support in the driver. This series was generated on top of linux-next from 20191202 to capture const changes for msm8976 that is queued currently. Changes from v1: - Make tsens_features non-const to allow run time detection of features - Pass tsens_sensor around as a const - Fix a bug to release dev pointer in success path - Address review comments from Bjorn and Stephen (thanks for the review) - Add msm8998 and msm8996 DTSI changes for critical interrupts Amit Kucheria (9): drivers: thermal: tsens: De-constify struct tsens_features drivers: thermal: tsens: Pass around struct tsens_sensor as a constant drivers: thermal: tsens: use simpler variables drivers: thermal: tsens: Release device in success path drivers: thermal: tsens: Add critical interrupt support drivers: thermal: tsens: Add watchdog support arm64: dts: sdm845: thermal: Add critical interrupt support arm64: dts: msm8996: thermal: Add critical interrupt support arm64: dts: msm8998: thermal: Add critical interrupt support arch/arm64/boot/dts/qcom/msm8996.dtsi | 10 +- arch/arm64/boot/dts/qcom/msm8998.dtsi | 10 +- arch/arm64/boot/dts/qcom/sdm845.dtsi | 10 +- drivers/thermal/qcom/tsens-8960.c | 4 +- drivers/thermal/qcom/tsens-common.c | 188 +++++++++++++++++++++++--- drivers/thermal/qcom/tsens-v0_1.c | 6 +- drivers/thermal/qcom/tsens-v1.c | 6 +- drivers/thermal/qcom/tsens-v2.c | 24 +++- drivers/thermal/qcom/tsens.c | 26 +++- drivers/thermal/qcom/tsens.h | 104 ++++++++++++-- 10 files changed, 332 insertions(+), 56 deletions(-) -- 2.17.1