The IRQ1 of these laptops with Ryzen 6000 and Insyde UEFI are active
low and defined in legacy format in ACPI DSDT. The kernel override
makes the keyboard interrupt polarity inverted, resulting in
non-functional keyboard.
Skip legacy IRQ override for:
Lenovo ThinkBook 14G4+ ARA
Redmi Book Pro 15 2022 Ryzen
Asus Zenbook S 13 OLED UM5302
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Tighe Donnelly <tighe.donnelly(a)protonmail.com>
Signed-off-by: Kent Hou Man <knthmn0(a)gmail.com>
Signed-off-by: Chuanhong Guo <gch981213(a)gmail.com>
---
Changes since v1:
Match DMI_PRODUCT_NAME for ThinkBook because the board name
is used for other completely different Lenovo laptops.
Add a patch for RedmiBook
Changes since v2:
Fix alphabetical order in skip_override_table
Add a patch for Asus Zenbook
Changes since v3:
Merge patches as requested
Fix another alphabetical ordering between two structs
Changes since v4:
rename the ident in RedmiBook entry.
There's also an Intel version of this series, so
rename it to make it specific.
reword commit title
drivers/acpi/resource.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
index c2d494784425..0491da180fc5 100644
--- a/drivers/acpi/resource.c
+++ b/drivers/acpi/resource.c
@@ -381,6 +381,31 @@ unsigned int acpi_dev_get_irq_type(int triggering, int polarity)
}
EXPORT_SYMBOL_GPL(acpi_dev_get_irq_type);
+static const struct dmi_system_id irq1_edge_low_shared[] = {
+ {
+ .ident = "Asus Zenbook S 13 OLED UM5302",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_BOARD_NAME, "UM5302TA"),
+ },
+ },
+ {
+ .ident = "Lenovo ThinkBook 14 G4+ ARA",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21D0"),
+ },
+ },
+ {
+ .ident = "Redmi Book Pro 15 2022 Ryzen",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "TIMI"),
+ DMI_MATCH(DMI_BOARD_NAME, "TM2113"),
+ },
+ },
+ { }
+};
+
static const struct dmi_system_id medion_laptop[] = {
{
.ident = "MEDION P15651",
@@ -408,6 +433,7 @@ struct irq_override_cmp {
};
static const struct irq_override_cmp skip_override_table[] = {
+ { irq1_edge_low_shared, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1 },
{ medion_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0 },
};
--
2.36.1
When device_match_data is called - with device tree, of_match list is
looked up to find the data, which by default is 0. So, no matter which
kind of device compatible we use, we match with config 0 which implies
we enable 8 channels even on devices that do not have 8 channels.
Solve it by providing the match data similar to what we do with the ACPI
lookup information.
Fixes: 9e611c9e5a20 ("iio: adc128s052: Add OF match table")
Cc: <stable(a)vger.kernel.org> # 5.0+
Signed-off-by: Nishanth Menon <nm(a)ti.com>
---
Side note: commits 9e611c9e5a20c ("iio: adc128s052: Add OF match table"),
37cd3c8768edc ("iio: adc128s052: Add pin-compatible IDs"),
b41fa86b67bd3 ("iio:adc128s052: add support for adc124s021") introduce
code that is fixed by this patch, but it makes no real sense to go and
split this patch to apply to versions older than 5.0 - which seems to be
the earliest the patch would apply. I picked the "Add OF match table" as
the patch that set the precedence which follow on patches followed.
drivers/iio/adc/ti-adc128s052.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/iio/adc/ti-adc128s052.c b/drivers/iio/adc/ti-adc128s052.c
index 622fd384983c..21a7764cbb93 100644
--- a/drivers/iio/adc/ti-adc128s052.c
+++ b/drivers/iio/adc/ti-adc128s052.c
@@ -181,13 +181,13 @@ static int adc128_probe(struct spi_device *spi)
}
static const struct of_device_id adc128_of_match[] = {
- { .compatible = "ti,adc128s052", },
- { .compatible = "ti,adc122s021", },
- { .compatible = "ti,adc122s051", },
- { .compatible = "ti,adc122s101", },
- { .compatible = "ti,adc124s021", },
- { .compatible = "ti,adc124s051", },
- { .compatible = "ti,adc124s101", },
+ { .compatible = "ti,adc128s052", .data = 0},
+ { .compatible = "ti,adc122s021", .data = 1},
+ { .compatible = "ti,adc122s051", .data = 1},
+ { .compatible = "ti,adc122s101", .data = 1},
+ { .compatible = "ti,adc124s021", .data = 2},
+ { .compatible = "ti,adc124s051", .data = 2},
+ { .compatible = "ti,adc124s101", .data = 2},
{ /* sentinel */ },
};
MODULE_DEVICE_TABLE(of, adc128_of_match);
--
2.31.1