Skip to contentSkip to conversation

iio: xilinx-ams: Fix AMS_ALARM_THR_DIRECT_MASK

PATCH Applied Sean Anderson 4 participants 4 messages Jul 15, 2025 – Aug 25, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: xilinx-ams: Fix AMS_ALARM_THR_DIRECT_MASK

AMS_ALARM_THR_DIRECT_MASK should be bit 0, not bit 1. This would cause hysteresis to be enabled with a lower threshold of -28C. The temperature alarm would never deassert even if the temperature dropped below the upper threshold.

Fixes d5c70627a794 ("iio: adc: Add Xilinx AMS driver")

---

 drivers/iio/adc/xilinx-ams.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/xilinx-ams.c +1 -1
index 76dd0343f5f7..552190dd0e6e 100644
@@ -118,7 +118,7 @@
 #define AMS_ALARM_THRESHOLD_OFF_10	0x10
 #define AMS_ALARM_THRESHOLD_OFF_20	0x20
 
-#define AMS_ALARM_THR_DIRECT_MASK	BIT(1)
+#define AMS_ALARM_THR_DIRECT_MASK	BIT(0)
 #define AMS_ALARM_THR_MIN		0x0000
 #define AMS_ALARM_THR_MAX		(BIT(16) - 1)
 
Signature · 1 line
2.35.1.1320.gc452695387.dirty
Tested-by Acked-by on v1 1/1
#1 lore raw

Hi Sean,

Thanks for it.

Quoted 40 lines

-----Original Message-----
From: Sean Anderson <[email protected]>
Sent: Tuesday, July 15, 2025 1:31 AM
To: Anand Ashok Dumbre <[email protected]>; Jonathan Cameron <[email protected]>; [email protected]
Cc: Andy Shevchenko <[email protected]>; [email protected]; Simek, Michal <[email protected]>; [email protected]; David Lechner <[email protected]>; Manish Narani <[email protected]>; Nuno Sá <[email protected]>; Sean Anderson <[email protected]>
Subject: [PATCH] iio: xilinx-ams: Fix AMS_ALARM_THR_DIRECT_MASK

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.

AMS_ALARM_THR_DIRECT_MASK should be bit 0, not bit 1. This would cause hysteresis to be enabled with a lower threshold of -28C. The temperature alarm would never deassert even if the temperature dropped below the upper threshold.

Fixes d5c70627a794 ("iio: adc: Add Xilinx AMS driver")

---

 drivers/iio/adc/xilinx-ams.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/xilinx-ams.c index renamed from drivers/iio/adc/xilinx-ams.c +0 -0

76dd0343f5f7..552190dd0e6e 100644

drivers/iio/adc/xilinx-ams.c +1 -2
@@ -118,7 +118,7 @@
 #define AMS_ALARM_THRESHOLD_OFF_10     0x10
 #define AMS_ALARM_THRESHOLD_OFF_20     0x20
 
-#define AMS_ALARM_THR_DIRECT_MASK      BIT(1)
+#define AMS_ALARM_THR_DIRECT_MASK      BIT(0)
 #define AMS_ALARM_THR_MIN              0x0000
 #define AMS_ALARM_THR_MAX              (BIT(16) - 1)
 
--
Quoted 2 lines

2.35.1.1320.gc452695387.dirty

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Sean Anderson

Hi,

Good spot, thanks again!

Cheers,
Conall.

Quoted 36 lines

-----Original Message-----
From: Sean Anderson <[email protected]>
Sent: 15 July 2025 01:31
To: Anand Ashok Dumbre <[email protected]>; Jonathan Cameron <[email protected]>; [email protected]
Cc: Andy Shevchenko <[email protected]>; [email protected]; Simek, Michal <[email protected]>; [email protected]; David Lechner <[email protected]>; Manish Narani <[email protected]>; Nuno Sá <[email protected]>; Sean Anderson <[email protected]>
Subject: [PATCH] iio: xilinx-ams: Fix AMS_ALARM_THR_DIRECT_MASK

AMS_ALARM_THR_DIRECT_MASK should be bit 0, not bit 1. This would cause hysteresis to be enabled with a lower threshold of -28C. The temperature alarm would never deassert even if the temperature dropped below the upper threshold.

Fixes d5c70627a794 ("iio: adc: Add Xilinx AMS driver")

---

 drivers/iio/adc/xilinx-ams.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/xilinx-ams.c index renamed from drivers/iio/adc/xilinx-ams.c +0 -0

76dd0343f5f7..552190dd0e6e 100644

drivers/iio/adc/xilinx-ams.c +1 -2
@@ -118,7 +118,7 @@
 #define AMS_ALARM_THRESHOLD_OFF_10	0x10
 #define AMS_ALARM_THRESHOLD_OFF_20	0x20
 
-#define AMS_ALARM_THR_DIRECT_MASK	BIT(1)
+#define AMS_ALARM_THR_DIRECT_MASK	BIT(0)
 #define AMS_ALARM_THR_MIN		0x0000
 #define AMS_ALARM_THR_MAX		(BIT(16) - 1)
 
--
Quoted 1 line

2.35.1.1320.gc452695387.dirty

maintainer Applied
#3 lore raw
Quoted 3 lines · Conall

Hi,

Good spot, thanks again!

Applied to the fixes-togreg branch of iio.git and marked for stable. Thanks,

Jonathan

Quoted 43 lines

Cheers,
Conall.

Quoted 36 lines

-----Original Message-----
From: Sean Anderson <[email protected]>
Sent: 15 July 2025 01:31
To: Anand Ashok Dumbre <[email protected]>; Jonathan Cameron <[email protected]>; [email protected]
Cc: Andy Shevchenko <[email protected]>; [email protected]; Simek, Michal <[email protected]>; [email protected]; David Lechner <[email protected]>; Manish Narani <[email protected]>; Nuno Sá <[email protected]>; Sean Anderson <[email protected]>
Subject: [PATCH] iio: xilinx-ams: Fix AMS_ALARM_THR_DIRECT_MASK

AMS_ALARM_THR_DIRECT_MASK should be bit 0, not bit 1. This would cause hysteresis to be enabled with a lower threshold of -28C. The temperature alarm would never deassert even if the temperature dropped below the upper threshold.

Fixes d5c70627a794 ("iio: adc: Add Xilinx AMS driver")

---

 drivers/iio/adc/xilinx-ams.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/xilinx-ams.c index renamed from drivers/iio/adc/xilinx-ams.c +0 -0

76dd0343f5f7..552190dd0e6e 100644

drivers/iio/adc/xilinx-ams.c +1 -2
@@ -118,7 +118,7 @@
 #define AMS_ALARM_THRESHOLD_OFF_10	0x10
 #define AMS_ALARM_THRESHOLD_OFF_20	0x20
 
-#define AMS_ALARM_THR_DIRECT_MASK	BIT(1)
+#define AMS_ALARM_THR_DIRECT_MASK	BIT(0)
 #define AMS_ALARM_THR_MIN		0x0000
 #define AMS_ALARM_THR_MAX		(BIT(16) - 1)
 
--
Quoted 1 line

2.35.1.1320.gc452695387.dirty