From patchwork Fri Sep 20 21:52:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11154895 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 82C471747 for ; Fri, 20 Sep 2019 21:52:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5DFB12196E for ; Fri, 20 Sep 2019 21:52:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ReRPawgW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726725AbfITVwk (ORCPT ); Fri, 20 Sep 2019 17:52:40 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:36461 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726681AbfITVwk (ORCPT ); Fri, 20 Sep 2019 17:52:40 -0400 Received: by mail-pf1-f193.google.com with SMTP id y22so5408739pfr.3 for ; Fri, 20 Sep 2019 14:52:39 -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=3IBI4VzQC8G6/WZtP5+yBukBePHmrxVtew1M4S8Z7rI=; b=ReRPawgWWpuLjKAAHsg+Pn3Nod9EEuaMXpsr4pvKofTa5KvWkvaUPYim3j6ZxGNSVL 352bzZpZBYZJFhR6jL01AbubcUbSfVD4FC+j1zlpqnU4CoZhaGbdB4u1/bxeCWnS/zcn 91aJlxTEDQAJY9R2xQpffXUKZ9gjsO0BzitTOU6iDyj0Gq4Gq4CocZZ9Y8xXlqcfVoLK ewJwd6XM/2dSBK/tvuF6N4A5vlU5O1beXJRpCr+4enOwGPFmV8DL7aSL/01ZToIdruji g1ocC/u5BSaMdIMlPw9kNhmVZOVYTwV2Y05p1azrrB6hcCu/5GGtdkTkh7faAVDyDkB5 K/4Q== 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=3IBI4VzQC8G6/WZtP5+yBukBePHmrxVtew1M4S8Z7rI=; b=SE8+W8vPBZh2DUDUDsApIxWwfYiVf8QTWFBV0d2qDL8tSSvErYbksGwfBwzamBE0Is xKN5oclYmDNrVO51mKQS2YgtkqxQK8OdFTYX70UWhGuLj7Cz0Stx4L+dAHLaLIWGD1bs iDq2nMyX8IjyhGg0uQyaoSKq0KmWLSmy8Zne7xR1n89oJclr1yzcbwHQoo6XTiJSlucj UYO5rDDzxgmQ4c1H7GF2dJBlzAgrHgIP9M7JWEkNgBYxbrmoEk/sYIiY1wTEjJiPRs4E yYeFZuttkh89HPapxIdWMUyqioB4Cyka9lnzdLlxPRCpf0Ylz8UnHQJOZBceILhydwTQ kU8A== X-Gm-Message-State: APjAAAVaEKrsOSEn8L22zzwdk3GPMz1MA/3TMtOSUEABmWUaTWcgiyKN oEsjKmj9TodOCzAxcbow7OzRkA== X-Google-Smtp-Source: APXvYqw/UvbpyEv99dkTW9ixHJR67Bs54ygcEkIYExmpvZdDHnXMZ+tQt5pIDrd7S0E1skX+XzyPPw== X-Received: by 2002:aa7:9285:: with SMTP id j5mr3174329pfa.67.1569016359330; Fri, 20 Sep 2019 14:52:39 -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 ce16sm2001577pjb.29.2019.09.20.14.52.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Sep 2019 14:52:38 -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 v4 00/15] thermal: qcom: tsens: Add interrupt support Date: Fri, 20 Sep 2019 14:52:15 -0700 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 v3: - Fix up the YAML definitions based on Rob's review 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 | 168 ++++++ 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, 1248 insertions(+), 312 deletions(-) delete mode 100644 Documentation/devicetree/bindings/thermal/qcom-tsens.txt create mode 100644 Documentation/devicetree/bindings/thermal/qcom-tsens.yaml