Hi @RobertCNelson
I’ve never created and posted a patch before but keen to do it… could you please check my steps.
clone linux mainline (git clone kernel/git/torvalds/linux.git - Linux kernel source tree)
git describe --tags
v6.5-rc5-55-g22883973244b
Modify and commit drivers/power/supply/tps65217_charger.c & drivers/usb/musb/musb_dsps.c.
Note: I only tested these changes on the BBB kernel:[4.19.94-ti-r74.1], with and without a battery connected.
git format-patch HEAD~2
0001-power-supply-Fix-tps65217-charger-vs-vbus-irq-conflict.patch
0002-usb-musb-dsps-Fix-vbus-vs-tps65217-charger-irq-conflict.patch
./scripts/checkpatch.pl 0001-power-supply-Fix-tps65217-charger-vs-vbus-irq-conflict.patch
total: 0 errors, 0 warnings, 8 lines checked
./scripts/checkpatch.pl 0002-usb-musb-dsps-Fix-vbus-vs-tps65217-charger-irq-conflict.patch
total: 0 errors, 0 warnings, 8 lines checked
cat 0001-power-supply-Fix-tps65217-charger-vs-vbus-irq-conflict.patch
From 4b38cb1f0e34c09938ee5a9e02711917abbedfbb Mon Sep 17 00:00:00 2001
From: nemith <...@gmail.com>
Date: Thu, 10 Aug 2023 18:36:36 +0200
Subject: [PATCH 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.
Signed-off-by: nemth <...@gmail.com>
---
drivers/power/supply/tps65217_charger.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/supply/tps65217_charger.c b/drivers/power/supply/tps65217_charger.c
index a4bc9f2a10bc..6f68becdbfd0 100644
--- a/drivers/power/supply/tps65217_charger.c
+++ b/drivers/power/supply/tps65217_charger.c
@@ -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,
--
2.34.1
cat 0002-usb-musb-dsps-Fix-vbus-vs-tps65217-charger-irq-conflict.patch
From a9a04e889e296966abc96f72b9bfcbf535ddb0d4 Mon Sep 17 00:00:00 2001
From: nemth <...@gmail.com>
Date: Thu, 10 Aug 2023 18:40:08 +0200
Subject: [PATCH 2/2] usb: musb: dsps: Fix vbus vs tps65217-charger 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.
Signed-off-by: nemith <...@gmail.com>
---
drivers/usb/musb/musb_dsps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 9119b1d51370..cbb45de5a76f 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -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;
--
2.34.1
./scripts/get_maintainer.pl 0001-power-supply-Fix-tps65217-charger-vs-vbus-irq-conflict.patch
Sebastian Reichel sre@kernel.org (maintainer:POWER SUPPLY CLASS/SUBSYSTEM and DRIVERS)
linux-pm@vger.kernel.org (open list:POWER SUPPLY CLASS/SUBSYSTEM and DRIVERS)
linux-kernel@vger.kernel.org (open list)
./scripts/get_maintainer.pl 0002-usb-musb-dsps-Fix-vbus-vs-tps65217-charger-irq-conflict.patch
Bin Liu b-liu@ti.com (maintainer:MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER)
Greg Kroah-Hartman gregkh@linuxfoundation.org (supporter:USB SUBSYSTEM)
linux-usb@vger.kernel.org (open list:MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER)
I’ve already setup git send-email and will email it to myself first to double check.
git send-email \
–cc-cmd=‘./scripts/get_maintainer.pl --norolestats 0001-power-supply-Fix-tps65217-charger-vs-vbus-irq-conflict.patch’ 0001-power-supply-Fix-tps65217-charger-vs-vbus-irq-conflict.patch
git send-email \
–cc-cmd=‘./scripts/get_maintainer.pl --norolestats 0002-usb-musb-dsps-Fix-vbus-vs-tps65217-charger-irq-conflict.patch’ 0002-usb-musb-dsps-Fix-vbus-vs-tps65217-charger-irq-conflict.patch
Nemith