Devicetree
 help / color / mirror / Atom feed
From: Christian Marangi <ansuelsmth@gmail.com>
To: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Daniel Lezcano <daniel.lezcano@kernel.org>,
	Zhang Rui <rui.zhang@intel.com>,
	Lukasz Luba <lukasz.luba@arm.com>,
	Christian Marangi <ansuelsmth@gmail.com>,
	Lorenzo Bianconi <lorenzo@kernel.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org
Subject: [PATCH v5 1/7] thermal/drivers: airoha: fix copy paste error on clamp_t low temp
Date: Wed, 20 May 2026 17:55:14 +0200	[thread overview]
Message-ID: <20260520155525.22239-2-ansuelsmth@gmail.com> (raw)
In-Reply-To: <20260520155525.22239-1-ansuelsmth@gmail.com>

In airoha_thermal_set_trips, there is a copy paste error on clamping the
value for the low trip temp point. Fix it to the correct value and actually
clamp for the low variable.

Fixes: 42de37f40e1b ("thermal/drivers: Add support for Airoha EN7581 thermal sensor")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
 drivers/thermal/airoha_thermal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/airoha_thermal.c b/drivers/thermal/airoha_thermal.c
index b9fd6bfc88e5..439aa011b75c 100644
--- a/drivers/thermal/airoha_thermal.c
+++ b/drivers/thermal/airoha_thermal.c
@@ -273,7 +273,7 @@ static int airoha_thermal_set_trips(struct thermal_zone_device *tz, int low,
 
 	if (low != -INT_MAX) {
 		/* Validate low and clamp it to a supported value */
-		low = clamp_t(int, high, RAW_TO_TEMP(priv, 0),
+		low = clamp_t(int, low, RAW_TO_TEMP(priv, 0),
 			      RAW_TO_TEMP(priv, FIELD_MAX(EN7581_DOUT_TADC_MASK)));
 
 		/* We offset the low temp of 1°C to trigger correct event */
-- 
2.53.0


  reply	other threads:[~2026-05-20 15:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-20 15:55 [PATCH v5 0/7] thermal/drivers: airoha: Add support for AN7583 Christian Marangi
2026-05-20 15:55 ` Christian Marangi [this message]
2026-05-20 16:11   ` [PATCH v5 1/7] thermal/drivers: airoha: fix copy paste error on clamp_t low temp sashiko-bot
2026-05-20 15:55 ` [PATCH v5 2/7] thermal/drivers: airoha: fix copy paste error for sen internal Christian Marangi
2026-05-20 15:55 ` [PATCH v5 3/7] thermal/drivers: airoha: Convert to regmap API Christian Marangi
2026-05-20 16:48   ` sashiko-bot
2026-05-20 15:55 ` [PATCH v5 4/7] thermal/drivers: airoha: Generalize probe function Christian Marangi
2026-05-20 17:04   ` sashiko-bot
2026-05-20 15:55 ` [PATCH v5 5/7] thermal/drivers: airoha: Generalize get_thermal_ADC and set_mux function Christian Marangi
2026-05-20 17:24   ` sashiko-bot
2026-05-20 15:55 ` [PATCH v5 6/7] dt-bindings: arm: airoha: Add the chip-scu node for AN7583 SoC Christian Marangi
2026-05-20 17:28   ` sashiko-bot
2026-05-20 15:55 ` [PATCH v5 7/7] thermal/drivers: airoha: Add support for AN7583 Thermal Sensor Christian Marangi
2026-05-20 18:04   ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260520155525.22239-2-ansuelsmth@gmail.com \
    --to=ansuelsmth@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel.lezcano@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox