* [PATCH] iio: xilinx-ams: Fix AMS_ALARM_THR_DIRECT_MASK
@ 2025-07-15 0:30 Sean Anderson
2025-08-20 11:24 ` Erim, Salih
2025-08-20 12:31 ` O'Griofa, Conall
0 siblings, 2 replies; 4+ messages in thread
From: Sean Anderson @ 2025-07-15 0:30 UTC (permalink / raw)
To: Anand Ashok Dumbre, Jonathan Cameron, linux-iio
Cc: Andy Shevchenko, linux-kernel, Michal Simek, linux-arm-kernel,
David Lechner, Manish Narani, Nuno Sá, Sean Anderson
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")
Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
---
drivers/iio/adc/xilinx-ams.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/xilinx-ams.c b/drivers/iio/adc/xilinx-ams.c
index 76dd0343f5f7..552190dd0e6e 100644
--- a/drivers/iio/adc/xilinx-ams.c
+++ b/drivers/iio/adc/xilinx-ams.c
@@ -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)
--
2.35.1.1320.gc452695387.dirty
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH] iio: xilinx-ams: Fix AMS_ALARM_THR_DIRECT_MASK
2025-07-15 0:30 [PATCH] iio: xilinx-ams: Fix AMS_ALARM_THR_DIRECT_MASK Sean Anderson
@ 2025-08-20 11:24 ` Erim, Salih
2025-08-20 12:31 ` O'Griofa, Conall
1 sibling, 0 replies; 4+ messages in thread
From: Erim, Salih @ 2025-08-20 11:24 UTC (permalink / raw)
To: Sean Anderson, Jonathan Cameron, linux-iio@vger.kernel.org,
O'Griofa, Conall, Erim, Salih
Cc: Andy Shevchenko, linux-kernel@vger.kernel.org, Simek, Michal,
linux-arm-kernel@lists.infradead.org, David Lechner,
Manish Narani, Nuno Sá
Hi Sean,
Thanks for it.
> -----Original Message-----
> From: Sean Anderson <sean.anderson@linux.dev>
> Sent: Tuesday, July 15, 2025 1:31 AM
> To: Anand Ashok Dumbre <anand.ashok.dumbre@xilinx.com>; Jonathan Cameron
> <jic23@kernel.org>; linux-iio@vger.kernel.org
> Cc: Andy Shevchenko <andy@kernel.org>; linux-kernel@vger.kernel.org; Simek,
> Michal <michal.simek@amd.com>; linux-arm-kernel@lists.infradead.org; David
> Lechner <dlechner@baylibre.com>; Manish Narani <manish.narani@xilinx.com>;
> Nuno Sá <nuno.sa@analog.com>; Sean Anderson <sean.anderson@linux.dev>
> 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")
> Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
> ---
>
> drivers/iio/adc/xilinx-ams.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/xilinx-ams.c b/drivers/iio/adc/xilinx-ams.c index
> 76dd0343f5f7..552190dd0e6e 100644
> --- a/drivers/iio/adc/xilinx-ams.c
> +++ b/drivers/iio/adc/xilinx-ams.c
> @@ -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)
>
> --
> 2.35.1.1320.gc452695387.dirty
>
Tested-by: Erim, Salih <Salih.Erim@amd.com>
Acked-by: Erim, Salih <Salih.Erim@amd.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] iio: xilinx-ams: Fix AMS_ALARM_THR_DIRECT_MASK
2025-07-15 0:30 [PATCH] iio: xilinx-ams: Fix AMS_ALARM_THR_DIRECT_MASK Sean Anderson
2025-08-20 11:24 ` Erim, Salih
@ 2025-08-20 12:31 ` O'Griofa, Conall
2025-08-25 11:24 ` Jonathan Cameron
1 sibling, 1 reply; 4+ messages in thread
From: O'Griofa, Conall @ 2025-08-20 12:31 UTC (permalink / raw)
To: Sean Anderson, Anand Ashok Dumbre, Jonathan Cameron,
linux-iio@vger.kernel.org
Cc: Andy Shevchenko, linux-kernel@vger.kernel.org, Simek, Michal,
linux-arm-kernel@lists.infradead.org, David Lechner,
Manish Narani, Nuno Sá
Hi,
Good spot, thanks again!
Cheers,
Conall.
> -----Original Message-----
> From: Sean Anderson <sean.anderson@linux.dev>
> Sent: 15 July 2025 01:31
> To: Anand Ashok Dumbre <anand.ashok.dumbre@xilinx.com>; Jonathan Cameron
> <jic23@kernel.org>; linux-iio@vger.kernel.org
> Cc: Andy Shevchenko <andy@kernel.org>; linux-kernel@vger.kernel.org; Simek,
> Michal <michal.simek@amd.com>; linux-arm-kernel@lists.infradead.org; David
> Lechner <dlechner@baylibre.com>; Manish Narani <manish.narani@xilinx.com>;
> Nuno Sá <nuno.sa@analog.com>; Sean Anderson <sean.anderson@linux.dev>
> 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")
> Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
> ---
>
> drivers/iio/adc/xilinx-ams.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/xilinx-ams.c b/drivers/iio/adc/xilinx-ams.c index
> 76dd0343f5f7..552190dd0e6e 100644
> --- a/drivers/iio/adc/xilinx-ams.c
> +++ b/drivers/iio/adc/xilinx-ams.c
> @@ -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)
>
> --
> 2.35.1.1320.gc452695387.dirty
Reviewed-by: O'Griofa, Conall <conall.ogriofa@amd.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iio: xilinx-ams: Fix AMS_ALARM_THR_DIRECT_MASK
2025-08-20 12:31 ` O'Griofa, Conall
@ 2025-08-25 11:24 ` Jonathan Cameron
0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2025-08-25 11:24 UTC (permalink / raw)
To: O'Griofa, Conall
Cc: Sean Anderson, Anand Ashok Dumbre, linux-iio@vger.kernel.org,
Andy Shevchenko, linux-kernel@vger.kernel.org, Simek, Michal,
linux-arm-kernel@lists.infradead.org, David Lechner,
Manish Narani, Nuno Sá
On Wed, 20 Aug 2025 12:31:12 +0000
"O'Griofa, Conall" <conall.ogriofa@amd.com> wrote:
> Hi,
>
> Good spot, thanks again!
Applied to the fixes-togreg branch of iio.git and marked for stable.
Thanks,
Jonathan
>
> Cheers,
> Conall.
>
> > -----Original Message-----
> > From: Sean Anderson <sean.anderson@linux.dev>
> > Sent: 15 July 2025 01:31
> > To: Anand Ashok Dumbre <anand.ashok.dumbre@xilinx.com>; Jonathan Cameron
> > <jic23@kernel.org>; linux-iio@vger.kernel.org
> > Cc: Andy Shevchenko <andy@kernel.org>; linux-kernel@vger.kernel.org; Simek,
> > Michal <michal.simek@amd.com>; linux-arm-kernel@lists.infradead.org; David
> > Lechner <dlechner@baylibre.com>; Manish Narani <manish.narani@xilinx.com>;
> > Nuno Sá <nuno.sa@analog.com>; Sean Anderson <sean.anderson@linux.dev>
> > 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")
> > Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
> > ---
> >
> > drivers/iio/adc/xilinx-ams.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/adc/xilinx-ams.c b/drivers/iio/adc/xilinx-ams.c index
> > 76dd0343f5f7..552190dd0e6e 100644
> > --- a/drivers/iio/adc/xilinx-ams.c
> > +++ b/drivers/iio/adc/xilinx-ams.c
> > @@ -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)
> >
> > --
> > 2.35.1.1320.gc452695387.dirty
>
> Reviewed-by: O'Griofa, Conall <conall.ogriofa@amd.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-08-25 11:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-15 0:30 [PATCH] iio: xilinx-ams: Fix AMS_ALARM_THR_DIRECT_MASK Sean Anderson
2025-08-20 11:24 ` Erim, Salih
2025-08-20 12:31 ` O'Griofa, Conall
2025-08-25 11:24 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox