Fix tps65217-charger vs vbus irq conflict
Subsystems (3)
v2 cover Fix tps65217-charger vs vbus irq conflict
Both the tps65217-charger and vbus drivers are trying to allocate the same TPS65217 device interrupt line (TPS65217 is a TI power management IC) which results in the following error and a probe failure:
genirq: Flags mismatch irq 148. 00002000 (vbus) vs. 00000000 (tps65217-charger)
For the Beaglebone Black's config the tps65217-charger driver is currently disabled and therefore no conflict. Based on comments from Robert C Nelson this driver has been disabled for a long time and he is uncertain on the reasons why it was disabled. With a battery connected to the BBB, I re-enabled the tps65217-charger driver which resulted in the abovementioned.
The conflict is resolved by changing both driver's threaded interrupt request function from IRQF_ONESHOT to IRQF_SHARED.
Changes in v2:
Initial patches where emailed individually and not threaded. V2 patches sent as email thread. Feedback provided by [email protected]
Grant B Adams (2):
power: supply: Fix tps65217-charger vs vbus irq conflict
usb: musb: dsps: Fix vbus vs tps65217-charger irq conflict
drivers/power/supply/tps65217_charger.c | 2 +- drivers/usb/musb/musb_dsps.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.34.1
PATCH v2 1/2 power: supply: Fix tps65217-charger vs vbus irq conflict
Enabling the tps65217-charger driver/module causes an interrupt conflict with the vbus driver resulting in a probe failure.
The conflict is resolved by changing both driver's threaded interrupt request function from IRQF_ONESHOT to IRQF_SHARED.
--- drivers/power/supply/tps65217_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/tps65217_charger.c +1 -1
@@ -238,7 +238,7 @@ static int tps65217_charger_probe(struct platform_device *pdev)for (i =0 ; i <NUM_CHARGER_IRQS ; i++) { ret =devm_request_threaded_irq (&pdev->dev, irq[i],NULL , tps65217_charger_irq, -IRQF_ONESHOT ,"tps65217-charger" , +IRQF_SHARED ,"tps65217-charger" , charger);if (ret) { dev_err(charger->dev,
Signature · 1 line
2.34.1
Re: [PATCH v2 1/2] power: supply: Fix tps65217-charger vs vbus irq conflict
Hi,
Quoted 7 lines · Grant B Adams
Enabling the tps65217-charger driver/module causes an interrupt conflict with the vbus driver resulting in a probe failure.
The conflict is resolved by changing both driver's threaded interrupt request function fromIRQF_ONESHOTtoIRQF_SHARED.Signed-off-by Grant B Adams <[email protected]>---
Your commit message does not explain why IRQF_ONESHOT is dropped; IRQF_ONESHOT and IRQF_SHARED are not mutually exclusive.
-- Sebastian
Quoted 19 lines
drivers/power/supply/tps65217_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/power/supply/tps65217_charger.c +1
-1@@ -238,7 +238,7 @@ static int tps65217_charger_probe(struct platform_device *pdev)for (i =0 ; i <NUM_CHARGER_IRQS ; i++) { ret =devm_request_threaded_irq (&pdev->dev, irq[i],NULL , tps65217_charger_irq, -IRQF_ONESHOT ,"tps65217-charger" , +IRQF_SHARED ,"tps65217-charger" , charger);if (ret) { dev_err(charger->dev,Signature · 1 line
2.34.1
PATCH v2 2/2 usb: musb: dsps: Fix vbus vs tps65217-charger irq conflict
In reply to Grant B AdamsEnabling the tps65217-charger driver/module causes an interrupt conflict with the vbus driver resulting in a probe failure.
The conflict is resolved by changing both driver's threaded interrupt request function from IRQF_ONESHOT to IRQF_SHARED.
--- drivers/usb/musb/musb_dsps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/musb/musb_dsps.c +1 -1
@@ -851,7 +851,7 @@ static int dsps_setup_optional_vbus_irq(struct platform_device *pdev, error =devm_request_threaded_irq (glue->dev, glue->vbus_irq,NULL , dsps_vbus_threaded_irq, -IRQF_ONESHOT , +IRQF_SHARED ,"vbus" , glue);if (error) { glue->vbus_irq =0 ;
Signature · 1 line
2.34.1
Quoted 14 lines · Grant B Adams
Both the tps65217-charger and vbus drivers are trying to allocate the same TPS65217 device interrupt line (TPS65217 is a TI power management IC) which results in the following error and a probe failure:
genirq: Flags mismatch irq 148. 00002000 (vbus) vs. 00000000 (tps65217-charger)
For the Beaglebone Black's config the tps65217-charger driver is currently disabled and therefore no conflict. Based on comments from Robert C Nelson this driver has been disabled for a long time and he is uncertain on the reasons why it was disabled. With a battery connected to the BBB, I re-enabled the tps65217-charger driver which resulted in the abovementioned.
Quoted 2 lines
The conflict is resolved by changing both driver's threaded interrupt request function from
IRQF_ONESHOTtoIRQF_SHARED.
Looks good to me: