From patchwork Sun Sep 27 15:09:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Chauvet X-Patchwork-Id: 256692 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DEE84C47423 for ; Sun, 27 Sep 2020 15:10:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A1F222389F for ; Sun, 27 Sep 2020 15:10:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mU8e0vtY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726280AbgI0PKF (ORCPT ); Sun, 27 Sep 2020 11:10:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726196AbgI0PKE (ORCPT ); Sun, 27 Sep 2020 11:10:04 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91AF0C0613CE; Sun, 27 Sep 2020 08:10:04 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id e2so4113214wme.1; Sun, 27 Sep 2020 08:10:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IQU/5no96PfQVnDWZvRJxAMbJR8IojKL6s+SB7SMMPA=; b=mU8e0vtY9QN5IrHDotz7Fgyf4RdU20rP+QnbHLKsPR7mD5Bp7Naam4oldT6+ebRG64 9kY1nkqtzMVoL3i7J7M3sE3l4gqVrtKAh0D9qYYXhJNrvPL3S2NrbU+hvG/r2D4D87mS wwf6ZW3bKBcec68FnZNb4pRp6qSdCuuK86JlXA2TmD6lq0CzRGzVX5voBpt1R3NfBj09 cjo5zhdBzO32+Gk4yXdyv212M2D/bLIke6oBpXsUULAYJhQuos9CR9Ptk/YK8oYZdJRx Xh51bmNeKV2NMfvELh1rwgrBR/OiQ/oAEkUAFP3xN+AZnsPLxWmx38sQNM6xUwjYPtRg 02LA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=IQU/5no96PfQVnDWZvRJxAMbJR8IojKL6s+SB7SMMPA=; b=SB6StpGvyKdwH8NLAiHgunl+Ffo7QjOujLXayu/WKZ04QxjZtPmRPlHANlZqv7d1yN Uh+9qAceo0O6LAOIzkXTh6w63tsRecFvKdBqqwKrdE40of9/uPf5nlZ1GRpRcydxMeOD oZdzphy61oY1RsDUSv+/H3g0ld3ZQkewzGMSawSxPl7nF3b74udUyrKqmUaZbmeqM3O3 ubtUUBSFXft6KA4j6hXkWxfDSkgxRGKGEHPO9T2E21nDA2jZIZy+1bLikv5sPeJz3fzN 1EEDSaAVoN6heO/tJh2xz895feu7f0nFkQUdueeeTx6CHwMmt3LPaUaCWiNFpunKjFut FXpw== X-Gm-Message-State: AOAM532BZkwoS6Ghq1Hv8VU1pG4Ii8sdkMjAl0k1bUvlczlx0mSinvOH mDVx6OrqQVNpwN7UHZ1OMBc= X-Google-Smtp-Source: ABdhPJyRKBrj4QfpDb+e1kJEIQs4AmQ0NQQRZXPqEl6jo4XI0Gfuk7IK8exT/uG7zrS5lYWQ5ORuPw== X-Received: by 2002:a05:600c:21c4:: with SMTP id x4mr7446993wmj.107.1601219403352; Sun, 27 Sep 2020 08:10:03 -0700 (PDT) Received: from arrakis.kwizart.net (lfbn-nic-1-212-171.w2-15.abo.wanadoo.fr. [2.15.59.171]) by smtp.gmail.com with ESMTPSA id s11sm9565114wrt.43.2020.09.27.08.10.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 08:10:02 -0700 (PDT) From: Nicolas Chauvet To: Thierry Reding , Jonathan Hunter , Zhang Rui , Daniel Lezcano Cc: linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, Nicolas Chauvet Subject: [PATCH v2 2/6] ARM: tegra: Add missing hot temperatures to tegra124 thermal-zones Date: Sun, 27 Sep 2020 17:09:52 +0200 Message-Id: <20200927150956.34609-3-kwizart@gmail.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200927150956.34609-1-kwizart@gmail.com> References: <20200927150956.34609-1-kwizart@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org According to dmesg, thermal-zones for mem and cpu are missing hot temperatures properties. throttrip: pll: missing hot temperature ... throttrip: mem: missing hot temperature ... Adding them will clear the messages. Signed-off-by: Nicolas Chauvet --- arch/arm/boot/dts/tegra124.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi index a0fa5821a232..c71d597ace01 100644 --- a/arch/arm/boot/dts/tegra124.dtsi +++ b/arch/arm/boot/dts/tegra124.dtsi @@ -1248,6 +1248,11 @@ mem-shutdown-trip { hysteresis = <0>; type = "critical"; }; + mem-throttle-trip { + temperature = <99000>; + hysteresis = <1000>; + type = "hot"; + }; }; cooling-maps { @@ -1299,6 +1304,11 @@ pllx-shutdown-trip { hysteresis = <0>; type = "critical"; }; + pllx-throttle-trip { + temperature = <99000>; + hysteresis = <1000>; + type = "hot"; + }; }; cooling-maps { From patchwork Sun Sep 27 15:09:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Chauvet X-Patchwork-Id: 256691 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D468BC47420 for ; Sun, 27 Sep 2020 15:10:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9CA962399C for ; Sun, 27 Sep 2020 15:10:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TkxGGsf7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726303AbgI0PKH (ORCPT ); Sun, 27 Sep 2020 11:10:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726196AbgI0PKG (ORCPT ); Sun, 27 Sep 2020 11:10:06 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95A7AC0613CE; Sun, 27 Sep 2020 08:10:06 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id c18so8952334wrm.9; Sun, 27 Sep 2020 08:10:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HMVabqNDpRm5jRigfMy/HSkt9g7XhYmIwimrxhJfJvQ=; b=TkxGGsf7AhHgvKTOqLLuyHlNnTMX2xsgmCsz/B9oj1CwPeXjoiiRr54Eliz/xjBGQe thAXINErMhrAsr5bnQ+9vk6x5Fi5LxcVQ7WjKqGO8W50PUPSNKxamHVOy/9C8t2NL0wK 2sqJuxtIttZiX4H4PYH1w+l4em8+ojMhveJ60X9CYPhmd7l8jJmLbmtdPNc1rFUdjdPe jJ+W0ZkttAeoxtfKVq9N4v1gavDjWBHmlPqiUILfGhfZzbVjsCUFSTMo1UAkLfq7aRzJ qgGZo9zN+He2YChmM0ZVDlavX/49LQ9G4V7jQFfW+9YRPDnFnOMO9V+I2tJM0UtpVLmG tkRQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=HMVabqNDpRm5jRigfMy/HSkt9g7XhYmIwimrxhJfJvQ=; b=OirNBsN7sP9MEPY1z2JwCB0EDzIeZWHdsq9yKjUBu+nUXLscGVcT7UvLSEhO7mVCOG QOVuBDkJU+wqPJ318P36lal3S1Ka7Yo5fWaLoRgB1ZttFy9YKDEtixVRwQRm5nuAE1Ji /LnzlCHzHdCJUsXoPsgKq3u46E7+gAH0Yvo1499v8F50Gk8M0ED93QkLcYSfTLlsXnYH lLHvRJUEihLv9wLtntoHr+oQHsdh3CMr2wo4GtmA0eod4Y7HmWosu2mSDTOgyZaIueg+ 1l1vSj2tNGAKGFS6IaudIGHnaDxeeQMzmDWKbVmvHDTv8W36T0ecB4vgqOU7Lmd/Oahf zhOA== X-Gm-Message-State: AOAM530mofMQ3LaCMtGTZXHt+xBdXMwd+woug3U1XRk8r5Oe3A27LTIJ mDTEG29K/x7mMp2XqtjJpmD6STRIB7wtGe3J X-Google-Smtp-Source: ABdhPJxXQkXpfAdTjoBbm1Eq3yFMek1ks+tD8lDdfcrvNKaiExSLVktaf+NLI5Ru87arAicswKdzMQ== X-Received: by 2002:a5d:4811:: with SMTP id l17mr14832728wrq.252.1601219405330; Sun, 27 Sep 2020 08:10:05 -0700 (PDT) Received: from arrakis.kwizart.net (lfbn-nic-1-212-171.w2-15.abo.wanadoo.fr. [2.15.59.171]) by smtp.gmail.com with ESMTPSA id s11sm9565114wrt.43.2020.09.27.08.10.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 08:10:04 -0700 (PDT) From: Nicolas Chauvet To: Thierry Reding , Jonathan Hunter , Zhang Rui , Daniel Lezcano Cc: linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, Nicolas Chauvet Subject: [PATCH v2 4/6] arm64: tegra: Add missing gpu-throt-level to tegra210 soctherm Date: Sun, 27 Sep 2020 17:09:54 +0200 Message-Id: <20200927150956.34609-5-kwizart@gmail.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200927150956.34609-1-kwizart@gmail.com> References: <20200927150956.34609-1-kwizart@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On jetson-tx1 the following message can be seen: tegra_soctherm 700e2000.thermal-sensor: throttle-cfg: heavy: no throt prop or invalid prop This patch will fix the invalid prop issue according to the binding. Signed-off-by: Nicolas Chauvet --- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi b/arch/arm64/boot/dts/nvidia/tegra210.dtsi index 8cca2166a446..c518292ee3f5 100644 --- a/arch/arm64/boot/dts/nvidia/tegra210.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra210.dtsi @@ -1582,6 +1582,7 @@ throttle-cfgs { throttle_heavy: heavy { nvidia,priority = <100>; nvidia,cpu-throt-percent = <85>; + nvidia,gpu-throt-level = ; #cooling-cells = <2>; }; From patchwork Sun Sep 27 15:09:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Chauvet X-Patchwork-Id: 256690 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A8E8C47425 for ; Sun, 27 Sep 2020 15:10:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 44C562399C for ; Sun, 27 Sep 2020 15:10:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="V7XdetLF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726321AbgI0PKJ (ORCPT ); Sun, 27 Sep 2020 11:10:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726196AbgI0PKJ (ORCPT ); Sun, 27 Sep 2020 11:10:09 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3590C0613CE; Sun, 27 Sep 2020 08:10:08 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id d4so3863484wmd.5; Sun, 27 Sep 2020 08:10:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SzBl7wm7ho9tfo3JwIhFeWjVTbWY4f6C5L5RqhX83yE=; b=V7XdetLFjHr1QJVK/NImxfK8Pnczz47E1Un3RQL6OXGDBntzC72TsWb93lB9cIdsfQ 9g48SjY7RKHsLXeE6p6YfyePPldvUFnIbxyEabhyNN1u6yhX4XpNz4blpLHDhJtt45C/ DLmgWr9em+BvNUXsynNvjL54p+urXn2I6CkTGxW2eXHOogn3nySw4Y80vsKyZiTqMa3f NvbODaxlktP1RhFC8Vfgck3YAPSYF/DeO3mTrILSpka+p3TP4m5gPXv9p2ffU/lvW8lS ifR/GM4kRMG8HkSA/h8NM1rZzGmKMf9wKVWwG4hr+JXvImgYdqZgZzWR8NLxXLv5PAGR 8MlA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=SzBl7wm7ho9tfo3JwIhFeWjVTbWY4f6C5L5RqhX83yE=; b=GacD1oBz1geWwUYvIkj0dm6bvFQWV4kyqOJrDtCl5XpJDfxDI2kJjcoTvPCztsuQv7 WPm+gO+R96krHKGnAks9fgZUjjefcv0SNJCEsbBTSvpkgxCsshyVC6Vin+380/7d1njg wQowj7yPaROHZ5WckffhdhJauuaCiDyslRMIWwNC2AGkyMbq9gLm1xMYwjEBhjuC4pdg TsnHtuatCQBmNh260ynyHuKj3WVpgtpLtHOaE1g8w8xXnMNGgUaqU00TMeV8l8XCp/GA VxNCTBhoBcxobzN2pjFm7plJD5eVwZtDIa7P2a2+JrNDl5cmvLBfYPjJ566xgYMPsDMS 0PzA== X-Gm-Message-State: AOAM532C0u1nwjNIRZBuONvRN+X11Hp9D53ItqpXBen0o+8pjTxoVr1m LudOiGm8Znoq4Rm1rSF6XTs= X-Google-Smtp-Source: ABdhPJzPADGTLSo9o6D4RuPD0rYbuOY+XKHH2BryYiM+CGy/wpxWPav6OBAoDphnUyNZPcD3t2hv1w== X-Received: by 2002:a1c:2dc6:: with SMTP id t189mr7567161wmt.92.1601219407518; Sun, 27 Sep 2020 08:10:07 -0700 (PDT) Received: from arrakis.kwizart.net (lfbn-nic-1-212-171.w2-15.abo.wanadoo.fr. [2.15.59.171]) by smtp.gmail.com with ESMTPSA id s11sm9565114wrt.43.2020.09.27.08.10.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 08:10:06 -0700 (PDT) From: Nicolas Chauvet To: Thierry Reding , Jonathan Hunter , Zhang Rui , Daniel Lezcano Cc: linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, Nicolas Chauvet , stable@vger.kernel.org Subject: [PATCH v2 6/6] thermal: tegra: Avoid setting edp_irq when not relevant Date: Sun, 27 Sep 2020 17:09:56 +0200 Message-Id: <20200927150956.34609-7-kwizart@gmail.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200927150956.34609-1-kwizart@gmail.com> References: <20200927150956.34609-1-kwizart@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org According to the binding, the edp_irq is not available on tegra124/132 This commit moves the initialization of tegra->edp_irq after the introduced has_edp_irq condition. This will have the following effects: - soctherm_interrupts_init will not return prematurely with unfinished thermal_irq initialization on tegra124 and tegra132 - edp_irq initialization will be done only when relevant As a result, this will clear the following error on jetson-tk1 : kernel: tegra_soctherm 700e2000.thermal-sensor: IRQ index 1 not found v2: * Use .has_edp_irq boolean instead of of_compatible * Switch subject prefix to use thermal instead of ARM Fixes: 4a04beb1bf2e (thermal: tegra: add support for EDP IRQ) Cc: stable@vger.kernel.org Signed-off-by: Nicolas Chauvet --- drivers/thermal/tegra/soctherm.c | 38 +++++++++++++---------- drivers/thermal/tegra/soctherm.h | 1 + drivers/thermal/tegra/tegra124-soctherm.c | 1 + drivers/thermal/tegra/tegra132-soctherm.c | 1 + drivers/thermal/tegra/tegra210-soctherm.c | 1 + 5 files changed, 26 insertions(+), 16 deletions(-) diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c index 66e0639da4bf..0c79e033e7ea 100644 --- a/drivers/thermal/tegra/soctherm.c +++ b/drivers/thermal/tegra/soctherm.c @@ -2025,12 +2025,6 @@ static int soctherm_interrupts_init(struct platform_device *pdev, return 0; } - tegra->edp_irq = platform_get_irq(pdev, 1); - if (tegra->edp_irq < 0) { - dev_dbg(&pdev->dev, "get 'edp_irq' failed.\n"); - return 0; - } - ret = devm_request_threaded_irq(&pdev->dev, tegra->thermal_irq, soctherm_thermal_isr, @@ -2043,16 +2037,28 @@ static int soctherm_interrupts_init(struct platform_device *pdev, return ret; } - ret = devm_request_threaded_irq(&pdev->dev, - tegra->edp_irq, - soctherm_edp_isr, - soctherm_edp_isr_thread, - IRQF_ONESHOT, - "soctherm_edp", - tegra); - if (ret < 0) { - dev_err(&pdev->dev, "request_irq 'edp_irq' failed.\n"); - return ret; + /* Initialize edp_irq when available */ + if (tegra->soc->has_edp_irq) { + /* get IRQ */ + + tegra->edp_irq = platform_get_irq(pdev, 1); + if (tegra->edp_irq < 0) { + dev_dbg(&pdev->dev, "get 'edp_irq' failed.\n"); + return 0; + } + + /* request IRQ */ + ret = devm_request_threaded_irq(&pdev->dev, + tegra->edp_irq, + soctherm_edp_isr, + soctherm_edp_isr_thread, + IRQF_ONESHOT, + "soctherm_edp", + tegra); + if (ret < 0) { + dev_err(&pdev->dev, "request_irq 'edp_irq' failed.\n"); + return ret; + } } return 0; diff --git a/drivers/thermal/tegra/soctherm.h b/drivers/thermal/tegra/soctherm.h index 70501e73d586..b93cfdd06e5d 100644 --- a/drivers/thermal/tegra/soctherm.h +++ b/drivers/thermal/tegra/soctherm.h @@ -128,6 +128,7 @@ struct tegra_soctherm_soc { const int thresh_grain; const unsigned int bptt; const bool use_ccroc; + const bool has_edp_irq; struct tsensor_group_thermtrips *thermtrips; }; diff --git a/drivers/thermal/tegra/tegra124-soctherm.c b/drivers/thermal/tegra/tegra124-soctherm.c index 20ad27f4d1a1..c8c8231f6cdd 100644 --- a/drivers/thermal/tegra/tegra124-soctherm.c +++ b/drivers/thermal/tegra/tegra124-soctherm.c @@ -216,4 +216,5 @@ const struct tegra_soctherm_soc tegra124_soctherm = { .thresh_grain = TEGRA124_THRESH_GRAIN, .bptt = TEGRA124_BPTT, .use_ccroc = false, + .has_edp_irq = false, }; diff --git a/drivers/thermal/tegra/tegra132-soctherm.c b/drivers/thermal/tegra/tegra132-soctherm.c index b76308fdad9e..1bc9481de5fc 100644 --- a/drivers/thermal/tegra/tegra132-soctherm.c +++ b/drivers/thermal/tegra/tegra132-soctherm.c @@ -216,4 +216,5 @@ const struct tegra_soctherm_soc tegra132_soctherm = { .thresh_grain = TEGRA132_THRESH_GRAIN, .bptt = TEGRA132_BPTT, .use_ccroc = true, + .has_edp_irq = false, }; diff --git a/drivers/thermal/tegra/tegra210-soctherm.c b/drivers/thermal/tegra/tegra210-soctherm.c index d0ff793f18c5..2b09c8a811d0 100644 --- a/drivers/thermal/tegra/tegra210-soctherm.c +++ b/drivers/thermal/tegra/tegra210-soctherm.c @@ -224,5 +224,6 @@ const struct tegra_soctherm_soc tegra210_soctherm = { .thresh_grain = TEGRA210_THRESH_GRAIN, .bptt = TEGRA210_BPTT, .use_ccroc = false, + .has_edp_irq = true, .thermtrips = tegra210_tsensor_thermtrips, };