FAILED: patch "[PATCH] iio: light: ltr501: Power down chip if request irq fails" failed to apply to 6.18-stable tree
Subsystems (2)
Sasha Levin
maintainerThe patch below does not apply to the 6.18-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.18.y
git checkout FETCH_HEAD
git cherry-pick -x 8a9bcd587d7d768e6c8e9fff88bb89645e412731
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '[email protected]' --subject-prefix 'PATCH 6.18.y' 'HEAD^..'
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From 8a9bcd587d7d768e6c8e9fff88bb89645e412731 Mon Sep 17 00:00:00 2001
From: Esben Haabendal <[email protected]>
Date: Mon, 17 Aug 2026 19:08:53 +0200
Subject: [PATCH] iio: light: ltr501: Power down chip if request irq fails
In case devm_request_threaded_irq() failed, we were leaving the chip powered instead of powering it down again. Power down the chip switching ALS and PS modes to standby.
--- drivers/iio/light/ltr501.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/light/ltr501.c +1 -1
@@ -1538,7 +1538,7 @@ static int ltr501_probe(struct i2c_client *client)"ltr501_thresh_event" , indio_dev);if (ret) -return ret; + goto powerdown_on_error; }else { indio_dev->info = data->chip_info->info_no_irq; }
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 1/2 iio: light: Remove redundant dev_err()/dev_err_probe()
From: Pan Chuang <[email protected]>
[ Upstream commit 9cf89c342bc2508b79b4ab8823df90da8f77f1f1 ]
Since commit55b48e23f5c4 ("genirq/devres: Add error handling in devm_request_*_irq()"), devm_request_irq() and devm_request_threaded_irq() automatically log detailed error messages on failure. Remove the now-redundant driver-specific dev_err() and dev_err_probe() calls.
Standardize error check on if (ret) rather than if (ret < 0).
Stable-dep-of: 8a9bcd587d7d ("iio: light: ltr501: Power down chip if request irq fails")
--- drivers/iio/light/adux1020.c | 4 +--- drivers/iio/light/apds9160.c | 7 ++----- drivers/iio/light/apds9300.c | 4 +--- drivers/iio/light/apds9306.c | 3 +-- drivers/iio/light/apds9960.c | 4 +--- drivers/iio/light/bh1745.c | 3 +-- drivers/iio/light/cm3605.c | 4 +--- drivers/iio/light/gp2ap002.c | 4 +--- drivers/iio/light/ltr390.c | 3 +-- drivers/iio/light/ltr501.c | 5 +---- drivers/iio/light/opt4060.c | 2 +- drivers/iio/light/rpr0521.c | 5 +---- drivers/iio/light/si1145.c | 4 +--- drivers/iio/light/st_uvis25_core.c | 5 +---- drivers/iio/light/stk3310.c | 5 +---- drivers/iio/light/tsl2563.c | 2 +- drivers/iio/light/tsl2772.c | 5 +---- drivers/iio/light/veml6030.c | 4 +--- drivers/iio/light/vl6180.c | 2 +- 19 files changed, 20 insertions(+), 55 deletions(-)
drivers/iio/light/adux1020.c +1 -3
@@ -808,10 +808,8 @@ static int adux1020_probe(struct i2c_client *client)NULL , adux1020_interrupt_handler,IRQF_TRIGGER_HIGH |IRQF_ONESHOT , ADUX1020_DRV_NAME, indio_dev); -if (ret) { -dev_err (&client->dev,"irq request error %d\n" , -ret); +if (ret)return ret; - } }return devm_iio_device_register (&client->dev, indio_dev);
drivers/iio/light/apds9160.c +2 -5
@@ -1545,11 +1545,8 @@ static int apds9160_probe(struct i2c_client *client) apds9160_irq_handler,IRQF_ONESHOT ,"apds9160_event" , indio_dev); -if (ret) { -return dev_err_probe (dev, ret, -"request irq (%d) failed\n" , - client->irq); - } +if (ret) +return ret; }else { indio_dev->info = &apds9160_info_no_events; indio_dev->channels = apds9160_channels_without_events;
drivers/iio/light/apds9300.c +1 -3
@@ -432,10 +432,8 @@ static int apds9300_probe(struct i2c_client *client)NULL , apds9300_interrupt_handler,IRQF_TRIGGER_FALLING |IRQF_ONESHOT , "apds9300_event", indio_dev); -if (ret) { -dev_err (&client->dev,"irq request error %d\n" , -ret); +if (ret) goto err; - } } ret =iio_device_register (indio_dev);
drivers/iio/light/apds9306.c +1 -2
@@ -1286,8 +1286,7 @@ static int apds9306_probe(struct i2c_client *client) apds9306_irq_handler,IRQF_ONESHOT , "apds9306_event", indio_dev);if (ret) -return dev_err_probe (dev, ret, -"failed to assign interrupt.\n" ); +return ret; }else { indio_dev->info = &apds9306_info_no_events; indio_dev->channels = apds9306_channels_without_events;
drivers/iio/light/apds9960.c +1 -3
@@ -1098,10 +1098,8 @@ static int apds9960_probe(struct i2c_client *client)IRQF_TRIGGER_FALLING |IRQF_ONESHOT ,"apds9960_event" , indio_dev); -if (ret) { -dev_err (&client->dev,"request irq (%d) failed\n" , client->irq); +if (ret) goto error_power_down; - } ret =iio_device_register (indio_dev);if (ret)
drivers/iio/light/bh1745.c +1 -2
@@ -784,8 +784,7 @@ static int bh1745_setup_triggered_buffer(struct iio_dev *indio_dev,IRQF_ONESHOT , "bh1745_interrupt", indio_dev);if (ret) -return dev_err_probe (dev, ret, -"Request for IRQ failed\n" ); +return ret; }return 0 ;
drivers/iio/light/cm3605.c +1 -3
@@ -233,10 +233,8 @@ static int cm3605_probe(struct platform_device *pdev) ret =devm_request_threaded_irq (dev, irq, cm3605_prox_irq,NULL ,0 ,"cm3605" , indio_dev); -if (ret) { -dev_err (dev,"unable to request IRQ\n" ); +if (ret) goto out_disable_aset; - }/* Just name the trigger the same as the driver */ led_trigger_register_simple ("cm3605" , &cm3605->led);
drivers/iio/light/gp2ap002.c +1 -3
@@ -580,10 +580,8 @@ static int gp2ap002_probe(struct i2c_client *client) ret =devm_request_threaded_irq (dev, client->irq,NULL , gp2ap002_prox_irq,IRQF_ONESHOT ,"gp2ap002" , indio_dev); -if (ret) { -dev_err (dev,"unable to request IRQ\n" ); +if (ret) goto out_put_pm; - } gp2ap002->irq = client->irq;/*
drivers/iio/light/ltr390.c +1 -2
@@ -838,8 +838,7 @@ static int ltr390_probe(struct i2c_client *client)"ltr390_thresh_event" , indio_dev);if (ret) -return dev_err_probe (dev, ret, -"request irq (%d) failed\n" , client->irq); +return ret; } ret =ltr390_pm_init (data);
drivers/iio/light/ltr501.c +1 -4
@@ -1538,11 +1538,8 @@ static int ltr501_probe(struct i2c_client *client)IRQF_ONESHOT ,"ltr501_thresh_event" , indio_dev); -if (ret) { -dev_err (&client->dev,"request irq (%d) failed\n" , - client->irq); +if (ret)return ret; - } }else { indio_dev->info = data->chip_info->info_no_irq; }
drivers/iio/light/opt4060.c +1 -1
@@ -1223,7 +1223,7 @@ static int opt4060_setup_trigger(struct opt4060_chip *chip, struct iio_dev *idevIRQF_TRIGGER_FALLING |IRQF_ONESHOT , name, idev);if (ret) -return dev_err_probe (chip->dev, ret,"Could not request IRQ\n" ); +return ret;init_completion (&chip->completion);
drivers/iio/light/rpr0521.c +1 -4
@@ -988,11 +988,8 @@ static int rpr0521_probe(struct i2c_client *client) rpr0521_drdy_irq_handler, rpr0521_drdy_irq_thread,IRQF_TRIGGER_FALLING |IRQF_ONESHOT , "rpr0521_event", indio_dev); -if (ret <0 ) { -dev_err (&client->dev,"request irq %d for trigger0 failed\n" , - client->irq); +if (ret) goto err_pm_disable; - } ret =devm_iio_trigger_register (indio_dev->dev.parent, data->drdy_trigger0);
drivers/iio/light/si1145.c +1 -3
@@ -1251,10 +1251,8 @@ static int si1145_probe_trigger(struct iio_dev *indio_dev)IRQF_TRIGGER_FALLING |IRQF_NO_THREAD ,"si1145_irq" , trig); -if (ret <0 ) { -dev_err (&client->dev,"irq request failed\n" ); +if (ret)return ret; - } ret =devm_iio_trigger_register (&client->dev, trig);if (ret)
drivers/iio/light/st_uvis25_core.c +1 -4
@@ -196,11 +196,8 @@ static int st_uvis25_allocate_trigger(struct iio_dev *iio_dev) st_uvis25_trigger_handler_thread, irq_type |IRQF_ONESHOT , iio_dev->name, hw); -if (err) { -dev_err (dev,"failed to request trigger irq %d\n" , - hw->irq); +if (err)return err; - } hw->trig =devm_iio_trigger_alloc (dev,"%s-trigger" , iio_dev->name);
drivers/iio/light/stk3310.c +1 -4
@@ -661,11 +661,8 @@ static int stk3310_probe(struct i2c_client *client)IRQF_TRIGGER_FALLING |IRQF_ONESHOT , "stk3310_event", indio_dev); -if (ret <0 ) { -dev_err (&client->dev,"request irq %d failed\n" , - client->irq); +if (ret) goto err_standby; - } } ret =iio_device_register (indio_dev);
drivers/iio/light/tsl2563.c +1 -1
@@ -755,7 +755,7 @@ static int tsl2563_probe(struct i2c_client *client)"tsl2563_event" , indio_dev);if (err) -return dev_err_probe (dev, err,"irq request error\n" ); +return err; } err =tsl2563_configure (chip);
drivers/iio/light/tsl2772.c +1 -4
@@ -1837,11 +1837,8 @@ static int tsl2772_probe(struct i2c_client *clientp)IRQF_ONESHOT ,"TSL2772_event" , indio_dev); -if (ret) { -dev_err (&clientp->dev, -"%s: irq request failed\n" , __func__); +if (ret)return ret; - } }else { indio_dev->channels = chip->chip_info->channel_without_events; }
drivers/iio/light/veml6030.c +1 -3
@@ -925,9 +925,7 @@ static int veml6030_set_info(struct iio_dev *indio_dev)IRQF_TRIGGER_LOW |IRQF_ONESHOT , indio_dev->name, indio_dev);if (ret <0 ) -return dev_err_probe (&client->dev, ret, -"irq %d request failed\n" , - client->irq); +return ret; indio_dev->info = &veml6030_info; }else {
drivers/iio/light/vl6180.c +1 -1
@@ -722,7 +722,7 @@ static int vl6180_probe(struct i2c_client *client)IRQF_ONESHOT , indio_dev->name, indio_dev);if (ret) -return dev_err_probe (&client->dev, ret,"devm_request_irq error\n" ); +return ret;init_completion (&data->completion);
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 2/2 iio: light: ltr501: Power down chip if request irq fails
From: Esben Haabendal <[email protected]>
[ Upstream commit 8a9bcd587d7d768e6c8e9fff88bb89645e412731 ]
In case devm_request_threaded_irq() failed, we were leaving the chip powered instead of powering it down again. Power down the chip switching ALS and PS modes to standby.
--- drivers/iio/light/ltr501.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/light/ltr501.c +1 -1
@@ -1539,7 +1539,7 @@ static int ltr501_probe(struct i2c_client *client)"ltr501_thresh_event" , indio_dev);if (ret) -return ret; + goto powerdown_on_error; }else { indio_dev->info = data->chip_info->info_no_irq; }
Signature · 1 line
2.53.0