mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/1] platform/x86: serial-multi-instantiate: ACPI example code
@ 2025-11-26 12:19 Baojun Xu
  2025-11-26 12:19 ` [PATCH v4 1/1] platform/x86: serial-multi-instantiate: Add IRQ_RESOURCE_OPT for IRQ missing projects Baojun Xu
  0 siblings, 1 reply; 3+ messages in thread
From: Baojun Xu @ 2025-11-26 12:19 UTC (permalink / raw)
  To: tiwai, hansg
  Cc: ilpo.jarvinen, broonie, andriy.shevchenko, alsa-devel,
	shenghao-ding, 13916275206, platform-driver-x86, linux-sound,
	linux-kernel, baojun.xu, letitia.tsai

The tas2781-hda supports multi-projects, In some projects,
GpioInt() was dropped due to no IRQ connection.
See the example code below:

But in smi_i2c_probe(), smi_spi_probe() (serial-multi-instantiate.c),
if looking for IRQ by smi_get_irq() fails, it will return an error,
will not add new device, and cause smi_probe() to fail:
[    2.356546] Serial bus multi instantiate pseudo device driver TXNW2781:00:
error -ENXIO: IRQ index 0 not found
[    2.356561] Serial bus multi instantiate pseudo device driver TXNW2781:00:
error -ENXIO: Error requesting irq at index 0

So need to add an exception case for these situations.
BTW, this patch will take effect on both I2C and SPI devices.

Device (SPKR)
{
    Name (_ADR, One)
    Name (_HID, "TXNW2781")
    Method (_CRS, 0, NotSerialized)
    {
        Name (RBUF, ResourceTemplate ()
        {
            I2cSerialBusV2 (0x0038, ...)
            I2cSerialBusV2 (0x0039, ...)
            // GpioInt (Edge, ...) { 0x0000 }
            //"GpioInt (...) {}" was commented out due to no IRQ connection.
        })
        Return (RBUF)
    }
}

Baojun Xu (1):
  platform/x86: serial-multi-instantiate: Add IRQ_RESOURCE_OPT for IRQ
    missing projects

 drivers/platform/x86/serial-multi-instantiate.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-11-26 12:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-26 12:19 [PATCH v4 0/1] platform/x86: serial-multi-instantiate: ACPI example code Baojun Xu
2025-11-26 12:19 ` [PATCH v4 1/1] platform/x86: serial-multi-instantiate: Add IRQ_RESOURCE_OPT for IRQ missing projects Baojun Xu
2025-11-26 12:28   ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®