[PATCH v2 03/13] iio: pressure: mprls0025pa: fix interrupt flag

Petre Rodan posted 13 patches 3 weeks, 5 days ago
There is a newer version of this series
[PATCH v2 03/13] iio: pressure: mprls0025pa: fix interrupt flag
Posted by Petre Rodan 3 weeks, 5 days ago
Interrupt falling/rising flags should only be defined in the device tree.

Fixes: 713337d9143e ("iio: pressure: Honeywell mprls0025pa pressure sensor")
Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
---
v1 -> v2 use IRQF_TRIGGER_NONE as Jonathan requested
---
 drivers/iio/pressure/mprls0025pa.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/pressure/mprls0025pa.c b/drivers/iio/pressure/mprls0025pa.c
index 2336f2760eae..80985c090aff 100644
--- a/drivers/iio/pressure/mprls0025pa.c
+++ b/drivers/iio/pressure/mprls0025pa.c
@@ -12,6 +12,7 @@
 #include <linux/array_size.h>
 #include <linux/bitfield.h>
 #include <linux/bits.h>
+#include <linux/interrupt.h>
 #include <linux/math64.h>
 #include <linux/mod_devicetable.h>
 #include <linux/module.h>
@@ -419,9 +420,7 @@ int mpr_common_probe(struct device *dev, const struct mpr_ops *ops, int irq)
 
 	if (data->irq > 0) {
 		ret = devm_request_irq(dev, data->irq, mpr_eoc_handler,
-				       IRQF_TRIGGER_RISING,
-				       dev_name(dev),
-				       data);
+				       IRQF_TRIGGER_NONE, dev_name(dev), data);
 		if (ret)
 			return dev_err_probe(dev, ret,
 					  "request irq %d failed\n", data->irq);

-- 
2.52.0
Re: [PATCH v2 03/13] iio: pressure: mprls0025pa: fix interrupt flag
Posted by Andy Shevchenko 3 weeks, 5 days ago
On Wed, Jan 14, 2026 at 12:05:37PM +0200, Petre Rodan wrote:
> Interrupt falling/rising flags should only be defined in the device tree.

...

>  	if (data->irq > 0) {
>  		ret = devm_request_irq(dev, data->irq, mpr_eoc_handler,
> -				       IRQF_TRIGGER_RISING,
> -				       dev_name(dev),
> -				       data);
> +				       IRQF_TRIGGER_NONE, dev_name(dev), data);

No, this is still incorrect, should be plain 0 here.

>  		if (ret)
>  			return dev_err_probe(dev, ret,
>  					  "request irq %d failed\n", data->irq);

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH v2 03/13] iio: pressure: mprls0025pa: fix interrupt flag
Posted by Jonathan Cameron 3 weeks, 5 days ago
On Wed, 14 Jan 2026 12:13:33 +0200
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> On Wed, Jan 14, 2026 at 12:05:37PM +0200, Petre Rodan wrote:
> > Interrupt falling/rising flags should only be defined in the device tree.  
> 
> ...
> 
> >  	if (data->irq > 0) {
> >  		ret = devm_request_irq(dev, data->irq, mpr_eoc_handler,
> > -				       IRQF_TRIGGER_RISING,
> > -				       dev_name(dev),
> > -				       data);
> > +				       IRQF_TRIGGER_NONE, dev_name(dev), data);  
> 
> No, this is still incorrect, should be plain 0 here.

Yeah. My mistake in agreeing with your reply in v1.  

I'll randomly blame lack of coffee ;)
See the help text above IRQF_TRIGGER_NONE in interrupt.h which talks about not
specifying up at all (i.e. 0) meaning go with whatever is already there.

Jonathan
> 
> >  		if (ret)
> >  			return dev_err_probe(dev, ret,
> >  					  "request irq %d failed\n", data->irq);  
>