]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/x86: serial-multi-instantiate: Auto detect IRQ resource for CSC3551
authorDavid Xu <xuwd1@hotmail.com>
Thu, 13 Jul 2023 13:35:28 +0000 (21:35 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Aug 2023 16:27:31 +0000 (18:27 +0200)
commitafc4ddd9507f2d829b503a41b8de33535e521c55
tree1f94eaf6daf40fc6ade89492b800c647e968dfd6
parent38b0020f68b7d80242e46b8eba69ed80ceaec157
platform/x86: serial-multi-instantiate: Auto detect IRQ resource for CSC3551

commit 676b7c5ecab36274442887ceadd6dee8248a244f upstream.

The current code assumes that the CSC3551(multiple cs35l41) always have
its interrupt pin connected to GPIO thus the IRQ can be acquired with
acpi_dev_gpio_irq_get. However on some newer laptop models this is no
longer the case as they have the CSC3551's interrupt pin connected to
APIC. This causes smi_i2c_probe to fail on these machines.

To support these machines, a new macro IRQ_RESOURCE_AUTO was introduced
for cs35l41 smi_node, and smi_get_irq function was modified so it tries
to get GPIO irq resource first and if failed, tries to get
APIC irq resource for cs35l41.

This patch affects only the cs35l41's probing and brings no negative
influence on machines that indeed have the cs35l41's interrupt pin
connected to GPIO.

Signed-off-by: David Xu <xuwd1@hotmail.com>
Link: https://lore.kernel.org/r/SY4P282MB18350CD8288687B87FFD2243E037A@SY4P282MB1835.AUSP282.PROD.OUTLOOK.COM
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/x86/serial-multi-instantiate.c