iio: xilinx-ams: Fix AMS_ALARM_THR_DIRECT_MASK
Subsystems (3)
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.
---
drivers/iio/adc/xilinx-ams.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/xilinx-ams.c +1 -1
@@ -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
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: FixAMS_ALARM_THR_DIRECT_MASKCaution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
AMS_ALARM_THR_DIRECT_MASKshould 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")Signed-off-by Sean Anderson <[email protected]>---
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..552190dd0e6e100644drivers/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
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: FixAMS_ALARM_THR_DIRECT_MASK
AMS_ALARM_THR_DIRECT_MASKshould 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")Signed-off-by Sean Anderson <[email protected]>---
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..552190dd0e6e100644drivers/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
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: FixAMS_ALARM_THR_DIRECT_MASK
AMS_ALARM_THR_DIRECT_MASKshould 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")Signed-off-by Sean Anderson <[email protected]>---
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..552190dd0e6e100644drivers/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
Reviewed-by O'Griofa, Conall <[email protected]>