Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp477346ybh; Thu, 12 Mar 2020 05:37:56 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuriclAk1xRI9oPO2TVapaVdkH7gJ9nfRHlGc534agGfB+dHqmlaIwGBEIfQh68VPoD/9VB X-Received: by 2002:aca:db56:: with SMTP id s83mr2449826oig.171.1584016676547; Thu, 12 Mar 2020 05:37:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584016676; cv=none; d=google.com; s=arc-20160816; b=hrCPM5IvLwWFLCeTywUYoMpmRqzfmi8bOP1pbdusI4aPZGf0RMmTqpErUjr875OGrJ AA03eCElgufLulPb18MMtnCrVjl+Tl8H5+PxgYXVfEfLC/LrCqYUmjNCGHGn/3J8OF4Q 74osoRFADp22+k8ehGQ8+Xix191FgQaoqwiZjrZ3ji2E4GVmjua377VzxXT1NgUWIhAZ XgCN8ddmjoEN/Xm/+ZtUSM8M0neu5sPerABX3qZLa3kyeeP5bqZeoClS6eI1kCDHtNum K9yx27fo9xablXFN2I/bMPwNpn9KvNdhYIfik8fdDp0yPpTwbIHqHzLGe3TU2hSD3YZ4 G/kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=uZ0iOz8ncqvFjrnK1A4ouijdtb45+U/Wi2K2oQYzs7I=; b=hinQmYg3sq6DJs43stV5X86zFRXulZYo66DYL7ZhIDkOXL4bWACfkoLJVR8yz9xWGv U/8Jgn4gZe2cQe4bhPHA1S9f8abIGnkjTtwYe29yYNY0M3xN4b5KMEcibUxy8ClaxbFe bcOQuqVjgyWydDlq6I+6fJaVyBcsk98FmT8sbEG1hjO+ygg2lsIVAiKCcRulQoZcySGT vopL7bh7ugeHJG7lVZbaqApHTzxw3OG9hKFUb/lXYAtOIHg2S7pPwswI8QbuTxcN/8Lu 4ngipfyQmK/erVZjlUvQ2OK+xBGpoRqjS3fnTKqbcTRoiGMo+moC5rtZO2i71h+a5tks SSRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="q/77FA6R"; 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 a19si143108oic.227.2020.03.12.05.37.43; Thu, 12 Mar 2020 05:37:56 -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="q/77FA6R"; 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 S1726677AbgCLMhN (ORCPT + 99 others); Thu, 12 Mar 2020 08:37:13 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:46088 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726310AbgCLMhN (ORCPT ); Thu, 12 Mar 2020 08:37:13 -0400 Received: by mail-pf1-f196.google.com with SMTP id c19so3201720pfo.13 for ; Thu, 12 Mar 2020 05:37:13 -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:mime-version :content-transfer-encoding; bh=uZ0iOz8ncqvFjrnK1A4ouijdtb45+U/Wi2K2oQYzs7I=; b=q/77FA6Rns8gSsVDrJvnl8koR+lFLGllUQ+FWcEQxyVYjNQKrxI/H6Zi3JxwuWtQWg GTP1/3p8VO3/tJlsZr9dF5erZxP8CI07wRGWFQnuliwMY1wHuK0S6dvF8/6Uzy+wq1CI 4rfwKB43cRoXb+/ItmVqr4OnDIpySUdL8tHm+2ADZYGCHP/CWV71F1x+WY8ccecchsqb G4cXO36UxcsNxa618pkf6spHe8uatumWPml7lvCMTxRRpEDY18PNK0YKe6poPB5Vcqcc elhxOMZAKIJH9YtvnnWndZ8QY3siuMUntwFTJr79gUbEU3SUcOJf5jbnyaqi6IOesv+5 kD8w== 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:mime-version :content-transfer-encoding; bh=uZ0iOz8ncqvFjrnK1A4ouijdtb45+U/Wi2K2oQYzs7I=; b=tCucI0tgtsl9+WHs1l4EclAPfpwi87jFMGON1xHaJ+3BSu7vHkiCMi4nwHiaaMdcgz 7ZtteVA4ttmxySXAn0zcG0Y909xyjOi4/4yHzpBnr8kkGoDqan+qW/bxorzncfB+pDgr Gbgt/BfLyIrNo6fOezufxUhoD+4p1ba8i3kR3LksTcA2o+mXpKiXKJPA/kw9/Dr7yM+u QptMCp3bm8ouRYIFE3+BXoqf6ImRhfOXFDKyLpJpZwbYlDPbHUosKvA8wOMcAZqKljBb obeoux3U6PMZuqohqHds91vEUwtyMFPYZ7zmIXZm82FdsrzbRhr0yYo7BdSR41qW7ENY FymA== X-Gm-Message-State: ANhLgQ3gWI2sETqlyhkfFOlO4KgA/D5MNPwIyEFTXAhe1FntonSO1m9u FjUllJlp7m93Fs2Rj+bAcqwWZxcMf40= X-Received: by 2002:a62:a116:: with SMTP id b22mr8164871pff.122.1584016632026; Thu, 12 Mar 2020 05:37:12 -0700 (PDT) Received: from localhost ([45.127.45.7]) by smtp.gmail.com with ESMTPSA id n5sm2677802pfq.35.2020.03.12.05.37.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Mar 2020 05:37:10 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, daniel.lezcano@linaro.org, bjorn.andersson@linaro.org, swboyd@chromium.org, sivaa@codeaurora.org, Andy Gross Cc: Amit Kucheria , linux-pm@vger.kernel.org Subject: [PATCH v7 0/8] thermal: tsens: Handle critical interrupts Date: Thu, 12 Mar 2020 18:06:57 +0530 Message-Id: X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 v5.6-rc2. Changes since v6: - Fix up some lines over 80 characters - Remove Link tags Changes since v5:¬ - Introduce a function tsens_register_irq to handle uplow and critical interrupt registration and reduce code duplication - Clarify reason for patch 04 Changes from v4: - Add back patch 1 from v3[*], I mistakenly didn't post it for v4. - Remove spinlock from critical interrupt handling - Change critical interrupt handler to fall thru watchdog bark handling to handle critical interrupts too [*] https://lore.kernel.org/linux-arm-msm/77dd80eb58f0db29a03097cb442d606f810a849a.1577976221.git.amit.kucheria@linaro.org/ Changes from v3: - Remove the DTS changes that are already queued - Fix review comments by Bjorn - Fixup patch description to clarify that we don't use TSENS critical interrupts in Linux, but need it for the watchdog support that uses the same HW irq line. - Separate kernel-doc fixes into a separate patch. Changes from v2: - Handle old DTBs w/o critical irq in the same way as fix sent for 5.5 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 (8): 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 drivers: thermal: tsens: kernel-doc fixup drivers: thermal: tsens: Remove unnecessary irq flag drivers/thermal/qcom/tsens-8960.c | 4 +- drivers/thermal/qcom/tsens-common.c | 194 ++++++++++++++++++++++++---- 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 | 65 ++++++---- drivers/thermal/qcom/tsens.h | 103 +++++++++++++-- 7 files changed, 331 insertions(+), 71 deletions(-) -- 2.20.1