From patchwork Thu Sep 27 21:22:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 10618581 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B32C175A for ; Thu, 27 Sep 2018 21:23:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3BC482875F for ; Thu, 27 Sep 2018 21:23:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2F03E2B736; Thu, 27 Sep 2018 21:23:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B15D52875F for ; Thu, 27 Sep 2018 21:23:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727425AbeI1DnY (ORCPT ); Thu, 27 Sep 2018 23:43:24 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:42511 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727401AbeI1DnY (ORCPT ); Thu, 27 Sep 2018 23:43:24 -0400 Received: by mail-pf1-f196.google.com with SMTP id l9-v6so2754667pff.9 for ; Thu, 27 Sep 2018 14:23:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gSiC127F7IOBvrqTT2K6nS5eFQbyh4RproSH88MznjU=; b=cuPwzdqgxy6Khx4WECZh3r6tMAWK0gPstPqUpJWchwfR0gZknQENpaT1AIEHELNOwp xCyXPxicignsr17CH/iIDbDc204vm9nsxTGXlE7DbydLqKWxNjA7G/W73Lx2SWAwkFrM 4xpXI9zdqW0WDkuOuzD2VAbguM9rwoponJyo8= 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=gSiC127F7IOBvrqTT2K6nS5eFQbyh4RproSH88MznjU=; b=mO2KT4ci29ekMs7GjRDINVR23BN6IIfFjre3BFpf+S6fLGMWAm59H/Car9GWrtiyBJ cCQAy9eQ7WKbcjnd3t5CyPR37QXkn1f7IpN3hGN6cLkg8LXTP0/LZYFIH7Fmn+1F7UuB S6mJ+iqHNc8e+/ALuNSTB+J5f6opLDP3udsLvfNcO2aoWL04wK442IZYDZ6C8/DusgrX x/pIcnznW5SNc3QOfbBajOnkLvRKhmVNi9A4DqTuHn7VOIA4F4Lhb3t2kMRoJyi005tN EtAlBWxDeV02U8MgW/sl7I1EBQyXv+qwu8wVGjqRov/3FgtAaLzg27AdBS3/Hv68HdFZ 5XRg== X-Gm-Message-State: ABuFfojQ8nXcGKDyOCWq9HPh5jKmh92o9zdOMFfliw9xqihueV7Q199e +DVJUhG7TZyNtqUpdkLHeF9VDQ== X-Google-Smtp-Source: ACcGV62rbiH+80eYHWmbN02nYq71QvgtWIPheSWKZC/6qVHWvLj3kwdopgYX7OuvpX2Dq/WZH8owEw== X-Received: by 2002:a17:902:8d95:: with SMTP id v21-v6mr10740859plo.21.1538083388411; Thu, 27 Sep 2018 14:23:08 -0700 (PDT) Received: from mka.mtv.corp.google.com ([2620:15c:202:1:b6af:f85:ed6c:ac6a]) by smtp.gmail.com with ESMTPSA id u65-v6sm5818968pfb.144.2018.09.27.14.23.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 14:23:07 -0700 (PDT) From: Matthias Kaehlcke To: Andy Gross , David Brown , Rob Herring , Mark Rutland Cc: linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Douglas Anderson , Matthias Kaehlcke Subject: [PATCH] arm64: dts: qcom: pm8998: Use ADC temperature to temp-alarm node Date: Thu, 27 Sep 2018 14:22:53 -0700 Message-Id: <20180927212253.177200-1-mka@chromium.org> X-Mailer: git-send-email 2.19.0.605.g01d371f741-goog MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The temperature information from the temp-alarm block itself is very coarse ("temperature is above/below trip points"). Provide the driver with the die temperature channel of the ADC on the PMIC for more precise readings. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson --- - based on agross/for-next (7a002fe0179c "Merge branch 'defconfig-for-4.20' into all-for-4.20-redo")) - depends on e13d757279bb ("iio: adc: Add QCOM SPMI PMIC5 ADC driver") from IIO pull request: git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git tags/iio-for-4.20a - to work properly https://patchwork.kernel.org/patch/10594491/ is needed --- arch/arm64/boot/dts/qcom/pm8998.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/pm8998.dtsi b/arch/arm64/boot/dts/qcom/pm8998.dtsi index 048f19fa0150..fab5a826fb01 100644 --- a/arch/arm64/boot/dts/qcom/pm8998.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8998.dtsi @@ -58,6 +58,8 @@ compatible = "qcom,spmi-temp-alarm"; reg = <0x2400>; interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>; + io-channels = <&pm8998_adc ADC5_DIE_TEMP>; + io-channel-names = "thermal"; #thermal-sensor-cells = <0>; };