From patchwork Wed Sep 11 07:16: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: 173588 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp374008ilq; Wed, 11 Sep 2019 00:16:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3H7fYE4pTEr6ImN2giqaLb7rTXItJWefMMUrlGGor8kux+c70V8zYQ6UbbgD5PL+d97MV X-Received: by 2002:a17:906:fc0f:: with SMTP id ov15mr28645716ejb.234.1568186202488; Wed, 11 Sep 2019 00:16:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568186202; cv=none; d=google.com; s=arc-20160816; b=hcUjqsVjcuArBsS7WbXjbmu/768DKQivUPN6O6TMQct8EiqPFqBfip1CmVj+dL68gY vjv4SADcuwEnamwLVNYrRiwX35xTFljMY5p6crlqWrkbH4mC+8cZy/GNqMaYJuDG7PWn +lWWpcU23KUfXmJPIKGxfJLxHEu71mwccTHeviXxGU01mFwaESmkso43orp9xn44/jeq +tuMBQtL5UgrSAo0GFV0xlNijdO6CG7DOYxKU+auNcHKd2GXhIjfbzULpW/cgqNdlel3 GZVRfL15RjwcxXw3Rhkw15zcL99/hGWc4jh8t1tcENUysDi4Te91pm4VoYJxkVOAPjgy 9Rjg== 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=qUxVco5+9ktkoNCi0Mi64R9yup9qLyKawGp7kQ7ed2w=; b=JORgW+0478hc+c6vGOQv4Ye7u91tAdlF7ogfDjvMKcrjsxhS1552J/AqrWi8OiO4ON B6o6D6uZQA3a6ccgor83V2SHYQpJp1RQ0AxQ8pMUxnkpq5NERKgEgM2WTVGJlp49DGzb fT3IIaHdptBJ7VsfGlqbSssHBNyJbiiND02HGJWwOutKBOuKtPLg6uykAmUeaAnVvvhc qRZ12JFV6ddX56hEodJ/En9XqRfm4+SWHr8V6XXXRuRLYAX+sWySh60SzXBDoKnMGKkT kuTHMXTr1NCRBnbGqLC6uoArRTX3MW1jF8rAigctQXG6gq1Yj+0WBThM9DrkTg+nS0Ex hlbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HFGSzct6; 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 l7si341199ejg.377.2019.09.11.00.16.42; Wed, 11 Sep 2019 00:16:42 -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=HFGSzct6; 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 S1726018AbfIKHQl (ORCPT + 15 others); Wed, 11 Sep 2019 03:16:41 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:45933 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725379AbfIKHQl (ORCPT ); Wed, 11 Sep 2019 03:16:41 -0400 Received: by mail-pg1-f194.google.com with SMTP id 4so11037455pgm.12 for ; Wed, 11 Sep 2019 00:16:41 -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; bh=qUxVco5+9ktkoNCi0Mi64R9yup9qLyKawGp7kQ7ed2w=; b=HFGSzct6wcdfRhoSXr4x1ifFQAt+kMTqekWwXS6k2NfgZj9w5KBMQZYa/T2W7mmK28 yLrVs/h+VFNkNcx6TtF4LZmHNRuniUy4MX6M0sSCq13mL8WWNlbuBDv3kvKJTm97XvV0 zCbE9oQDQfUoC7ezO3TgjdW+MOcv4QsdbIbEjb2ziUMCJDgg9zQmZJ5ImnisNzk9sSVY WiLZAwnvmjbeXimxHb6q7s+bKsDO+MhGyR/TW7A61HtD2qTGgNdQCtndZXgk1MxfZGbJ UFNxJfeRZdgmvBZ00BnmAVgYpKjjHa2rNtCMYmeEWSv1KWKpm59y8cCRwFyoJY0FtnKi Vx7Q== 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=qUxVco5+9ktkoNCi0Mi64R9yup9qLyKawGp7kQ7ed2w=; b=AnYbew7Uo/ZvO/BFMmDoIgy5RrkgLziHKApm9hKIiiEaL2d6eN8qP9LfgHj9VbTY7p WqFb6/srkkevwCpLK6T40nIwMaXC97vi5yaVULj6Ch98uiGeMZ4i/tXrn3cwtZCUYRtf QaBPNNbxH3KYUmvLMtjemiutp8v/W3es8I6xizz5byuTC1xe7i7YVLuC9adSUwqAZDak CNbbk9cMSwQ1v66C13gyeSOdcRSnJyswyyfVRckLwJsRv+AH7jpzDNJ0fv4RQKARx2Yh tuT0qWamKydgKLE9duR/5nLi3Vf/0Ti55BEYXN550NMK5f3g04l+m8QSyJ+71x6XHLBk I5fQ== X-Gm-Message-State: APjAAAWZOV3IwXMPYTy/yI0nOowptVbtPXZ4qrX9X1RGvAZd97fCcHES /HULLccZ6sdWwSZwUSKqU5qvwQ== X-Received: by 2002:a17:90a:8509:: with SMTP id l9mr3834867pjn.10.1568186200477; Wed, 11 Sep 2019 00:16:40 -0700 (PDT) Received: from localhost ([49.248.201.118]) by smtp.gmail.com with ESMTPSA id c2sm21933784pfd.66.2019.09.11.00.16.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Sep 2019 00:16:39 -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, linux-pm@vger.kernel.org Subject: [PATCH v3 00/15] thermal: qcom: tsens: Add interrupt support Date: Wed, 11 Sep 2019 12:46:17 +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 Changes since v2: - Addressed Stephen's review comment - Moved the dt-bindings to yaml (This throws up some new warnings in various QCOM devicetrees. I'll send out a separate series to fix them up) - Collected reviews and acks - Added the dt-bindings to MAINTAINERS Changes since v1: - Collected reviews and acks - Addressed Stephen's review comments (hopefully I got them all). - Completely removed critical interrupt infrastructure from this series. Will post that separately. - Fixed a bug in sign-extension of temperature. - Fixed DT bindings to use the name of the interrupt e.g. "uplow" and use platform_get_irq_byname(). Add interrupt support to TSENS. The first 6 patches are general fixes and cleanups to the driver before interrupt support is introduced. This series has been developed against qcs404 and sdm845 and then tested on msm8916 and msm8974 (Thanks Brian). Testing on msm8998 would be appreciated since I don't have hardware handy. Amit Kucheria (15): drivers: thermal: tsens: Get rid of id field in tsens_sensor drivers: thermal: tsens: Simplify code flow in tsens_probe drivers: thermal: tsens: Add __func__ identifier to debug statements drivers: thermal: tsens: Add debugfs support arm: dts: msm8974: thermal: Add thermal zones for each sensor arm64: dts: msm8916: thermal: Fixup HW ids for cpu sensors dt-bindings: thermal: tsens: Convert over to a yaml schema arm64: dts: sdm845: thermal: Add interrupt support arm64: dts: msm8996: thermal: Add interrupt support arm64: dts: msm8998: thermal: Add interrupt support arm64: dts: qcs404: thermal: Add interrupt support arm: dts: msm8974: thermal: Add interrupt support arm64: dts: msm8916: thermal: Add interrupt support drivers: thermal: tsens: Create function to return sign-extended temperature drivers: thermal: tsens: Add interrupt support .../bindings/thermal/qcom-tsens.txt | 55 -- .../bindings/thermal/qcom-tsens.yaml | 174 ++++++ MAINTAINERS | 1 + arch/arm/boot/dts/qcom-msm8974.dtsi | 108 +++- arch/arm64/boot/dts/qcom/msm8916.dtsi | 26 +- arch/arm64/boot/dts/qcom/msm8996.dtsi | 60 +- arch/arm64/boot/dts/qcom/msm8998.dtsi | 82 +-- arch/arm64/boot/dts/qcom/qcs404.dtsi | 42 +- arch/arm64/boot/dts/qcom/sdm845.dtsi | 88 +-- drivers/thermal/qcom/tsens-8960.c | 4 +- drivers/thermal/qcom/tsens-common.c | 529 ++++++++++++++++-- drivers/thermal/qcom/tsens-v0_1.c | 11 + drivers/thermal/qcom/tsens-v1.c | 29 + drivers/thermal/qcom/tsens-v2.c | 13 + drivers/thermal/qcom/tsens.c | 58 +- drivers/thermal/qcom/tsens.h | 286 ++++++++-- 16 files changed, 1254 insertions(+), 312 deletions(-) delete mode 100644 Documentation/devicetree/bindings/thermal/qcom-tsens.txt create mode 100644 Documentation/devicetree/bindings/thermal/qcom-tsens.yaml -- 2.17.1