Skip to contentSkip to conversation

platform/x86: serial-multi-instantiate: IRQ_RESOURCE_AUTO should be compatible with IRQ_RESOURCE_NONE

PATCH In review Baojun Xu 3 participants 3 messages Nov 25, 2025 – Nov 27, 2025

Subsystems (3)
lore
Share & tools
lore

Baojun Xu

author
#0 lore raw

PATCH v2 1/1 platform/x86: serial-multi-instantiate: IRQ_RESOURCE_AUTO should be compatible with IRQ_RESOURCE_NONE

The tas2781-hda supports multi-projects, in some projects, no irq is required, so the IRQ_RESOURCE_AUTO should be compatible with IRQ_RESOURCE_NONE.

---
v2:
- Remove error ignore, change to AUTO compatible with NONE.

---
 drivers/platform/x86/serial-multi-instantiate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/platform/x86/serial-multi-instantiate.c +2 -1
index db030b0f176a..eb3fffbc29ad 100644
@@ -64,7 +64,8 @@ static int smi_get_irq(struct platform_device *pdev, struct acpi_device *adev,
 			dev_dbg(&pdev->dev, "Using platform irq\n");
 			break;
 		}
-		break;
+		dev_dbg(&pdev->dev, "No irq\n");
+		return 0;
 	case IRQ_RESOURCE_GPIO:
 		ret = acpi_dev_gpio_irq_get(adev, inst->irq_idx);
 		break;
Signature · 1 line
2.25.1
#1 lore raw
Quoted 3 lines · Baojun Xu

The tas2781-hda supports multi-projects, in some projects, no irq is required, so the IRQ_RESOURCE_AUTO should be compatible with IRQ_RESOURCE_NONE.

TL;DR: NAK.

It will relax the conditions for the devices where IRQ is required. Probably you need to consider DMI quirks or so.

Also you failed to provide the ACPI DSDT excerpts to show the real use case. And what the board is that that uses polling mode?

You can also consider this approach (as a compromise between two:

#define IRQ_RESOURCE_OPTIONAL BIT(2)
...

	switch (inst->flags & IRQ_RESOURCE_TYPE) {
	case IRQ_RESOURCE_AUTO:
		...
		if (inst->flags & IRQ_RESOURCE_OPTIONAL)
			ret = 0;
	break;
	...
	}
...
		{ "tas2781-hda", IRQ_RESOURCE_AUTO | IRQ_RESOURCE_OPTIONAL, 0 },
Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw

Good change making IRQ_RESOURCE_AUTO compatible with IRQ_RESOURCE_NONE. This clarifies the behavior when no IRQ is needed, preventing potential errors. Has anyone considered the power management implications in the no-IRQ scenario? It's like strategically placing blocks in Block Blast to maximize efficiency! https://blockblastfree.com