Skip to content

Commit 8e9ada1

Browse files
jwrdegoededtor
authored andcommitted
Input: soc_button_array - add use_low_level_irq module parameter
It seems that the Windows drivers for the ACPI0011 soc_button_array device use low level triggered IRQs rather then using edge triggering. Some ACPI tables depend on this, directly poking the GPIO controller's registers to clear the trigger type when closing a laptop's/2-in-1's lid and re-instating the trigger when opening the lid again. Linux sets the edge/level on which to trigger to both low+high since it is using edge type IRQs, the ACPI tables then ends up also setting the bit for level IRQs and since both low and high level have been selected by Linux we get an IRQ storm leading to soft lockups. As a workaround for this the soc_button_array already contains a DMI quirk table with device models known to have this issue. Add a module parameter for this so that users can easily test if their device is affected too and so that they can use the module parameter as a workaround. Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent b8ebf25 commit 8e9ada1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/input/misc/soc_button_array.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
#include <linux/gpio.h>
1919
#include <linux/platform_device.h>
2020

21+
static bool use_low_level_irq;
22+
module_param(use_low_level_irq, bool, 0444);
23+
MODULE_PARM_DESC(use_low_level_irq, "Use low-level triggered IRQ instead of edge triggered");
24+
2125
struct soc_button_info {
2226
const char *name;
2327
int acpi_index;
@@ -164,7 +168,8 @@ soc_button_device_create(struct platform_device *pdev,
164168
}
165169

166170
/* See dmi_use_low_level_irq[] comment */
167-
if (!autorepeat && dmi_check_system(dmi_use_low_level_irq)) {
171+
if (!autorepeat && (use_low_level_irq ||
172+
dmi_check_system(dmi_use_low_level_irq))) {
168173
irq_set_irq_type(irq, IRQ_TYPE_LEVEL_LOW);
169174
gpio_keys[n_buttons].irq = irq;
170175
gpio_keys[n_buttons].gpio = -ENOENT;

0 commit comments

Comments
 (0)