From patchwork Tue Apr 5 23:59:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 558481 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E5C9C43219 for ; Wed, 6 Apr 2022 05:41:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235579AbiDFFi2 (ORCPT ); Wed, 6 Apr 2022 01:38:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1851316AbiDFDDD (ORCPT ); Tue, 5 Apr 2022 23:03:03 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 787FADEE8 for ; Tue, 5 Apr 2022 16:59:14 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id y32so1221966lfa.6 for ; Tue, 05 Apr 2022 16:59:14 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=vhtdAyfV1krIwAG7X02HHXOhQylPf2Ui3KgfDhnX9YE=; b=AdfKLHZmoPdZNSJVkKgzqHaBcewohzGlnexe7aUiZnUeb96K3nSEMuABGpn0o9TEa2 jWfEdpTp6+A8t5xMdmjYFpt4Yfx8js+FmgJvO9b2imXbFg+/EibkxQqeC+TNa9IhBaiK dS2BD0NS1yhnyDZvy5DfjIoSW5fObsX0g9hoCi8L6x+zsbiQsA6/HNcTQjLY7Qt8dEQJ czalAv8ypf8nB18VulsbioUUImKDISAT9gFjYYxEtFafZ3RrAhtIxPKkfjIsAXyUXDch zYcYM8SzxTgwHVUdUiEssklx3MPosadvIOsv4zosGjthe77t9QkLlGuKuPDM0/DoBGga pmtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vhtdAyfV1krIwAG7X02HHXOhQylPf2Ui3KgfDhnX9YE=; b=cqNME858RjNm8dSsGXBrs2zIDTllmIEHyMs8Gx5qnM25VxFQg5N8AbzVPFVOS73X9X Xjc3N7cn+QKsgfMiOt/CCgcj8E7S0cLfMJ968CK98SIzSj0I4E7GShxXK4sv7/Qsy61T MG4CsmckDmva8pJngjLW+52RhhEejyUqhGytSon18fqcuqn2lbTUpbbH9Q/WYXj7DsF6 537srxg1wBTMr4AkJOVbyVhSpv9arjHrpKPwiXlRvyV1qt4dUbju6k1rG+WaRTBJcVtK iXyDtJaYTparZkjPmdLMs2KyhQfL90pExPMZod7r4DgVVNre5XWLJLoV5b+MMWSC3JF3 RErQ== X-Gm-Message-State: AOAM530PEJDMhF+Lq5wMUFjR1V17/5T9R7XJYmeIDPUOZ/WPkkl45Ax6 I7mr5ZC1EN0tTn+tcSFhN0L0bg== X-Google-Smtp-Source: ABdhPJyneH2lzB2yrK/wBsY3Lw+u6V/ruICOrErnb9XYe3gesY/IKS6KltXpzrGMx1WhSTRCwdk9yQ== X-Received: by 2002:a05:6512:1281:b0:44a:b492:5e7 with SMTP id u1-20020a056512128100b0044ab49205e7mr4015837lfs.265.1649203152796; Tue, 05 Apr 2022 16:59:12 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id w14-20020a0565120b0e00b0044a9b61d2b3sm1646471lfu.221.2022.04.05.16.59.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 16:59:12 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Amit Kucheria , Thara Gopinath , Rob Herring , Krzysztof Kozlowski , Michael Turquette , Stephen Boyd Cc: linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH 1/4] dt-bindings: thermal: qcom-tsens.yaml: add msm8960 compat string Date: Wed, 6 Apr 2022 02:59:07 +0300 Message-Id: <20220405235910.373107-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405235910.373107-1-dmitry.baryshkov@linaro.org> References: <20220405235910.373107-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add compatibility string for the thermal sensors on MSM8960/APQ8064 platforms. Signed-off-by: Dmitry Baryshkov --- Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml index b6406bcc683f..43510b8399ff 100644 --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml @@ -19,10 +19,11 @@ description: | properties: compatible: oneOf: - - description: msm9860 TSENS based + - description: msm8960 TSENS based items: - enum: - qcom,ipq8064-tsens + - qcom,msm8960-tsens - description: v0.1 of TSENS items: @@ -116,6 +117,7 @@ allOf: - qcom,ipq8064-tsens - qcom,mdm9607-tsens - qcom,msm8916-tsens + - qcom,msm8960-tsens - qcom,msm8974-tsens - qcom,msm8976-tsens - qcom,qcs404-tsens From patchwork Tue Apr 5 23:59:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 558686 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58C56C4321E for ; Wed, 6 Apr 2022 05:41:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234006AbiDFFiR (ORCPT ); Wed, 6 Apr 2022 01:38:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1851328AbiDFDDO (ORCPT ); Tue, 5 Apr 2022 23:03:14 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 711DA167F2 for ; Tue, 5 Apr 2022 16:59:15 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id q68so1104696ljb.3 for ; Tue, 05 Apr 2022 16:59:15 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=c/JxrbhWAHjw8ckYVJv9DMMKqM3jkzyjVUcpKG0Ot64=; b=gaza2oJTKLFw55AclhDk0/Ajbh8SVxqqcz7RXA5284kNNaZd+zz78VoQQLeNAXTfzf apiYrA1In7nO1jdEHkJhlN4hkDydpgPsUtBvi+e1KiV9X7XMmJHJRo71Ym10pEw+jY/2 WUYWLbbSwKje9rLp4XLw1fzGGgMrJlIDgLFVHTqpXgGR5bIYoZNTR0zU0Xth5GNl55Lt qUuCbZemsdwDq5KzgcWoE9IaXJHu1gJCZgusgZrgjT06xpW247WgVMF6GkyoaGim1+Er cKe22mNTd7vON6v802JQanFyJ5++0kcOqFo3v3hkexjoU1xFlgQOIh1bxptGhmYjMFpc 2k3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=c/JxrbhWAHjw8ckYVJv9DMMKqM3jkzyjVUcpKG0Ot64=; b=7+1SM8ge47qLFKtvI/d7t6S5fn840l/V0w3t2+749wzcc2o8NTlWUw1f+eCmT3ynJE EMcY81JOAn4NeFMSPzFD9SXhLYX1gVFotgKReA5GI/veNxN+D+EWubWkc3WqZy8LRt3y aLg81KGo2H6BuQ8JYGZ1T08wwouS7LdQ1lFCBUh+aTYXSD9ivPWKS8NNLovSIBW2LIQv pPyMvdrVhSF06+YxNyh1VTkZN51TgEKfoA8ofTCzmrdQcN7YQvrL6HZsMw6Q4pZs8mcC CEQG9cl28A6WTD88UtWhMO9OazMt2tsTBtD2Pok8+G+Ohd+tx8zeNJsphIR8n2qciNot iHpg== X-Gm-Message-State: AOAM530BEqo1wm9ON8A7qn45tAZn+HyhC6W3O2pajr7wC2SpSp5JyZAq moIPHt7CgQOeeuMhRAq10i6PeQ== X-Google-Smtp-Source: ABdhPJwWdHLZp9cwRO5mb+bG5RQ8DC3/RcS13t+LRAGrf5jqQ2VvX4VTZcc5deIUZjy5rCpcfCv6QQ== X-Received: by 2002:a2e:9ec4:0:b0:24b:115c:aedb with SMTP id h4-20020a2e9ec4000000b0024b115caedbmr3561269ljk.235.1649203153677; Tue, 05 Apr 2022 16:59:13 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id w14-20020a0565120b0e00b0044a9b61d2b3sm1646471lfu.221.2022.04.05.16.59.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 16:59:13 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Amit Kucheria , Thara Gopinath , Rob Herring , Krzysztof Kozlowski , Michael Turquette , Stephen Boyd Cc: linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH 2/4] thermal/drivers/tsens: add compat string for the qcom,msm8960 Date: Wed, 6 Apr 2022 02:59:08 +0300 Message-Id: <20220405235910.373107-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405235910.373107-1-dmitry.baryshkov@linaro.org> References: <20220405235910.373107-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On apq8064 (msm8960) platforms the tsens device is created manually by the gcc driver. Prepare the tsens driver for the qcom,msm8960-tsens device instantiated from the device tree. Signed-off-by: Dmitry Baryshkov --- drivers/thermal/qcom/tsens.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index 154d3cb19c88..7963ee33bf75 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -979,6 +979,9 @@ static const struct of_device_id tsens_table[] = { }, { .compatible = "qcom,msm8939-tsens", .data = &data_8939, + }, { + .compatible = "qcom,msm8960-tsens", + .data = &data_8960, }, { .compatible = "qcom,msm8974-tsens", .data = &data_8974, From patchwork Tue Apr 5 23:59:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 558684 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5088C43217 for ; Wed, 6 Apr 2022 05:41:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231124AbiDFFht (ORCPT ); Wed, 6 Apr 2022 01:37:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1851336AbiDFDDU (ORCPT ); Tue, 5 Apr 2022 23:03:20 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68F8625EAC for ; Tue, 5 Apr 2022 16:59:16 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id z12so1189895lfu.10 for ; Tue, 05 Apr 2022 16:59:16 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=mCdnNmVygED4uaOfb8SOUK1cT/+oSB5JmQc20+uJ1II=; b=pJI6u/buQZy8snAz4tQC7vRPgL+G+EOaeiqYoD8DnobLWGUhrEKB4VkkkqqJFpfYfl VURFeceRN2RvFW3QDrJf/gJuybOG72ott4HQRF6OPzJUay4ofQkU0thgWbSpnbMHkJ3L c6x5IV1iWVWg/7zSOyp76GwsFwY0ZnEHXI1RLSjwRHo+l8WOBmbjF5DJrNkT2gIW59tj zWMeN7YeJpyaEpBsfW+S/q87I6MbvQS2fUvDBzYKqZPEpwZd+t+qK8FRlpYkCvujYcci aGmcmX+wgDWNWRhHK0rq6KE4Vz6zH3dF8wrqdAJvLAsNGQo+5GapuDESy+PD41xPErGM 61Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mCdnNmVygED4uaOfb8SOUK1cT/+oSB5JmQc20+uJ1II=; b=xRBgCmd1OKFUwbOBa0C+oLv+Q+K0KGUcydsdwCWLtoCZ7Ny7ZPsiPXJ/0H+A+VrX2Z D4Sps49+EzaYXG8ntp0Sb7dkyY3pZ0y1NpIwG+QaoEDHoN+Us60aA4P5RdWT9Sh6G/dQ WfP6aXYaS+7nfAwDYSqGv0fVXOFgjfxs7TUt3itd79rQTQTcmLuFkx3V8Q1VHC0uH4Ah b8PRzrzJJcsr1VYS25ivBHFVDJlt6BWX3c4VllCPm5EdTBZa2CS34MJONgHDdo+vP85u oJqlWZKZ0f5K7vo4K0m4VxCn/Lk2AIjtdm+RETARSuys1bgPqMFu0728jqZ3K9S6VYsw va5w== X-Gm-Message-State: AOAM531hcjEZeXA+JPBE+m4PleTJxqu+SzBUcw3dMksIQHIBr8MY4qz7 CO46MtF9gH3rTb2kJVbsMWtL5w== X-Google-Smtp-Source: ABdhPJyXy7UUxdIl/cuvDDnBtF4tCGUStvyyBHag9soJAoWBFTSxiJJZenScrY44qRkHDM67hWT52A== X-Received: by 2002:a05:6512:3403:b0:448:5f92:7b0c with SMTP id i3-20020a056512340300b004485f927b0cmr4077979lfr.237.1649203154619; Tue, 05 Apr 2022 16:59:14 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id w14-20020a0565120b0e00b0044a9b61d2b3sm1646471lfu.221.2022.04.05.16.59.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 16:59:14 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Amit Kucheria , Thara Gopinath , Rob Herring , Krzysztof Kozlowski , Michael Turquette , Stephen Boyd Cc: linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH 3/4] clk: qcom: gcc-msm8960: create tsens device if there are no child nodes Date: Wed, 6 Apr 2022 02:59:09 +0300 Message-Id: <20220405235910.373107-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405235910.373107-1-dmitry.baryshkov@linaro.org> References: <20220405235910.373107-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Currently gcc-msm8960 driver manually creates tsens device. Don't create it in case there are child nodes inside the gcc device (which would include the tsens). Signed-off-by: Dmitry Baryshkov --- drivers/clk/qcom/gcc-msm8960.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/clk/qcom/gcc-msm8960.c b/drivers/clk/qcom/gcc-msm8960.c index 051745ef99c8..0f2d1a69781b 100644 --- a/drivers/clk/qcom/gcc-msm8960.c +++ b/drivers/clk/qcom/gcc-msm8960.c @@ -3617,7 +3617,6 @@ static int gcc_msm8960_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; const struct of_device_id *match; - struct platform_device *tsens; int ret; match = of_match_device(gcc_msm8960_match_table, &pdev->dev); @@ -3641,12 +3640,16 @@ static int gcc_msm8960_probe(struct platform_device *pdev) hfpll_l2.d = &hfpll_l2_8064_data; } - tsens = platform_device_register_data(&pdev->dev, "qcom-tsens", -1, - NULL, 0); - if (IS_ERR(tsens)) - return PTR_ERR(tsens); + if (of_get_available_child_count(pdev->dev.of_node) == 0) { + struct platform_device *tsens; - platform_set_drvdata(pdev, tsens); + tsens = platform_device_register_data(&pdev->dev, "qcom-tsens", -1, + NULL, 0); + if (IS_ERR(tsens)) + return PTR_ERR(tsens); + + platform_set_drvdata(pdev, tsens); + } return 0; } @@ -3655,7 +3658,8 @@ static int gcc_msm8960_remove(struct platform_device *pdev) { struct platform_device *tsens = platform_get_drvdata(pdev); - platform_device_unregister(tsens); + if (tsens) + platform_device_unregister(tsens); return 0; } From patchwork Tue Apr 5 23:59:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 558688 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49920C433FE for ; Wed, 6 Apr 2022 05:35:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234379AbiDFFcG (ORCPT ); Wed, 6 Apr 2022 01:32:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1851351AbiDFDDm (ORCPT ); Tue, 5 Apr 2022 23:03:42 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B5F937037 for ; Tue, 5 Apr 2022 16:59:17 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id y32so1222077lfa.6 for ; Tue, 05 Apr 2022 16:59:17 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=hsebzT0oQrb725QbvmQmdLGCPg2UaxczruLpvf9xIJ8=; b=nEzlP/Y5MWvuFOqwomUMzNMeA/Va+eKKfx9HVFAt1xnJSdqlTiKPo3wKxfrZoFmB5p 179bIHxq3ijqXk+EVO+doWrxFNZZbBO86wpy2xNGVWdqMPlgnzEmRTUJ8ScGiSpoSrWP Anhsn+dHVQSC06lhw5jyljhvBajPfBwaiBzySJ5mo4GUDxWoFVQcapCHVlbHqUzUJJD7 diClpHoqiCwEJfUcDuZiYO87OYFf5IYA1sRmhF8gCAZaS82Khq/yf/GW4fe8pjPe9mi/ w/8zeU+1Jt1L8rAk6OzCDhwzlwRbGj7aqB7VeGhurvqu69bQaHI74xk+KVNTc+T2mYXo mdNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hsebzT0oQrb725QbvmQmdLGCPg2UaxczruLpvf9xIJ8=; b=j1Ftmh+7/62gP3PcwNQ/1QEQiGHuYe1LEXKsl0hTIdx/CAX0G8QUs8qTOxpgjntBGr 0n1xwRSdO24xyTtv4i3DXyQeXuynERC5hQEh9kTjqZpvi5wE7k6H+unvoWjYJHAmj7c7 Hlcphbf5CsgjK4jzqfdXGPDcU4SqyQ6c3PP5sak48JRi4xwoDbU42XU/M6S9jAd8Wzk4 QjGWQjDEa2/6ROpf2vlpiL6+PUM/Tb9lTzmCtFJG+kG+ESU8WQVs0gXR5ZA4wzqO05Gp BdA4SJIWKRB8AB4weVRexBdIcxgbkqi6RQdkC624NMmJPAZJ3dwaHr6QssCkjOUj0j7U D8jQ== X-Gm-Message-State: AOAM533bkzHCXRlxZF0cpKiX6BRo9vsgF5RcvkKE7evfbtBA0MjaIm2t BBs1KdG5AHYH/N8LQVNAViTCf5upEMVpgg== X-Google-Smtp-Source: ABdhPJwi0L/OTO/Vf772gVlUgxAVowWOVkAO8aoGbTsia63tyHDt1Np2ZLlAMxuB24VrWMuzASrNMA== X-Received: by 2002:a05:6512:3ca1:b0:44a:93f1:45cf with SMTP id h33-20020a0565123ca100b0044a93f145cfmr4362023lfv.542.1649203155487; Tue, 05 Apr 2022 16:59:15 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id w14-20020a0565120b0e00b0044a9b61d2b3sm1646471lfu.221.2022.04.05.16.59.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 16:59:15 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Amit Kucheria , Thara Gopinath , Rob Herring , Krzysztof Kozlowski , Michael Turquette , Stephen Boyd Cc: linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH 4/4] arm: dts: qcom-apq8064: create tsens device node Date: Wed, 6 Apr 2022 02:59:10 +0300 Message-Id: <20220405235910.373107-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405235910.373107-1-dmitry.baryshkov@linaro.org> References: <20220405235910.373107-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Create separate device node for thermal sensors on apq8064 platform. Move related properties to the newly created device tree node. Signed-off-by: Dmitry Baryshkov --- arch/arm/boot/dts/qcom-apq8064.dtsi | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi index b9e9a9f9d3e2..87e8861d647c 100644 --- a/arch/arm/boot/dts/qcom-apq8064.dtsi +++ b/arch/arm/boot/dts/qcom-apq8064.dtsi @@ -105,7 +105,7 @@ cpu0-thermal { polling-delay-passive = <250>; polling-delay = <1000>; - thermal-sensors = <&gcc 7>; + thermal-sensors = <&tsens 7>; coefficients = <1199 0>; trips { @@ -126,7 +126,7 @@ cpu1-thermal { polling-delay-passive = <250>; polling-delay = <1000>; - thermal-sensors = <&gcc 8>; + thermal-sensors = <&tsens 8>; coefficients = <1132 0>; trips { @@ -147,7 +147,7 @@ cpu2-thermal { polling-delay-passive = <250>; polling-delay = <1000>; - thermal-sensors = <&gcc 9>; + thermal-sensors = <&tsens 9>; coefficients = <1199 0>; trips { @@ -168,7 +168,7 @@ cpu3-thermal { polling-delay-passive = <250>; polling-delay = <1000>; - thermal-sensors = <&gcc 10>; + thermal-sensors = <&tsens 10>; coefficients = <1132 0>; trips { @@ -812,12 +812,21 @@ tsens_backup: backup_calib { gcc: clock-controller@900000 { compatible = "qcom,gcc-apq8064"; reg = <0x00900000 0x4000>; - nvmem-cells = <&tsens_calib>, <&tsens_backup>; - nvmem-cell-names = "calib", "calib_backup"; #clock-cells = <1>; #power-domain-cells = <1>; #reset-cells = <1>; - #thermal-sensor-cells = <1>; + + tsens: thermal-sensor@900000 { + compatible = "qcom,msm8960-tsens"; + + nvmem-cells = <&tsens_calib>, <&tsens_backup>; + nvmem-cell-names = "calib", "calib_backup"; + interrupts = ; + interrupt-names = "uplow"; + + #qcom,sensors = <11>; + #thermal-sensor-cells = <1>; + }; }; lcc: clock-controller@28000000 {