From: Hans de Goede <hansg@kernel.org>
To: Baojun Xu <baojun.xu@ti.com>, tiwai@suse.de
Cc: ilpo.jarvinen@linux.intel.com, broonie@kernel.org,
andriy.shevchenko@linux.intel.com, alsa-devel@alsa-project.org,
shenghao-ding@ti.com, 13916275206@139.com,
platform-driver-x86@vger.kernel.org, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org, letitia.tsai@hp.com
Subject: Re: [PATCH v4 1/1] platform/x86: serial-multi-instantiate: Add IRQ_RESOURCE_OPT for IRQ missing projects
Date: Wed, 26 Nov 2025 13:28:55 +0100 [thread overview]
Message-ID: <9b2dca55-1207-48a3-94b0-3efad1462d0f@kernel.org> (raw)
In-Reply-To: <20251126121911.10980-2-baojun.xu@ti.com>
Hi,
On 26-Nov-25 1:19 PM, Baojun Xu wrote:
> The tas2781-hda supports multi-projects. In some projects,
> GpioInt() was dropped due to no IRQ connection.
> See the example code in the cover letter.
Please don't do this, the example code is not that big, people
should not need to go and hunt down the example code, please just
add it to the commit message.
Also please use longer lines (wrap at 75 chars) for the commit msg
and please use empty lines between paragraphs to clearly separate
the paragraphs.
Regards,
Hans
> 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.
> So, we need to add an exception case for these situations.
> BTW, this patch will take effect on both I2C and SPI devices.
>
> Signed-off-by: Baojun Xu <baojun.xu@ti.com>
> ---
> v4:
> - Change the description for this patch.
> v3:
> - Add IRQ_RESOURCE_OPT for IRQ missing cases.
> v2:
> - Remove error ignore, change to AUTO compatible with NONE.
> ---
> drivers/platform/x86/serial-multi-instantiate.c | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/platform/x86/serial-multi-instantiate.c b/drivers/platform/x86/serial-multi-instantiate.c
> index db030b0f176a..1a369334f9cb 100644
> --- a/drivers/platform/x86/serial-multi-instantiate.c
> +++ b/drivers/platform/x86/serial-multi-instantiate.c
> @@ -22,6 +22,7 @@
> #define IRQ_RESOURCE_GPIO 1
> #define IRQ_RESOURCE_APIC 2
> #define IRQ_RESOURCE_AUTO 3
> +#define IRQ_RESOURCE_OPT BIT(2)
>
> enum smi_bus_type {
> SMI_I2C,
> @@ -64,6 +65,10 @@ static int smi_get_irq(struct platform_device *pdev, struct acpi_device *adev,
> dev_dbg(&pdev->dev, "Using platform irq\n");
> break;
> }
> + if (inst->flags & IRQ_RESOURCE_OPT) {
> + dev_dbg(&pdev->dev, "No irq\n");
> + return 0;
> + }
> break;
> case IRQ_RESOURCE_GPIO:
> ret = acpi_dev_gpio_irq_get(adev, inst->irq_idx);
> @@ -386,10 +391,10 @@ static const struct smi_node cs35l57_hda = {
>
> static const struct smi_node tas2781_hda = {
> .instances = {
> - { "tas2781-hda", IRQ_RESOURCE_AUTO, 0 },
> - { "tas2781-hda", IRQ_RESOURCE_AUTO, 0 },
> - { "tas2781-hda", IRQ_RESOURCE_AUTO, 0 },
> - { "tas2781-hda", IRQ_RESOURCE_AUTO, 0 },
> + { "tas2781-hda", IRQ_RESOURCE_AUTO | IRQ_RESOURCE_OPT, 0 },
> + { "tas2781-hda", IRQ_RESOURCE_AUTO | IRQ_RESOURCE_OPT, 0 },
> + { "tas2781-hda", IRQ_RESOURCE_AUTO | IRQ_RESOURCE_OPT, 0 },
> + { "tas2781-hda", IRQ_RESOURCE_AUTO | IRQ_RESOURCE_OPT, 0 },
> {}
> },
> .bus_type = SMI_AUTO_DETECT,
prev parent reply other threads:[~2025-11-26 12:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9b2dca55-1207-48a3-94b0-3efad1462d0f@kernel.org \
--to=hansg@kernel.org \
--cc=13916275206@139.com \
--cc=alsa-devel@alsa-project.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=baojun.xu@ti.com \
--cc=broonie@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=letitia.tsai@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=shenghao-ding@ti.com \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®