Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromtorvalds/linux

Commit9e811e1

Browse files
jwrdegoederafaeljw
authored andcommitted
ACPI: button: Add a LID switch blacklist and add 1 model to it
The GP-electronic T701 tablet does not have a LID switch, but itdoes define a LID device in its DSDT. The _LID method points tothe "\\_SB.GPO2" pin 0x18 GPIO with a pull setting of "PullDefault",which leaves the pin floating.This causes the ACPI button driver to cause spurious LID closed events,causing the device to suspend while the user is using it. There isnothing the ACPI button driver (or the gpio code) can do to fix this,so the only solution is to add a DMI based blacklist and ignore the LIDdevice on these tablets.Signed-off-by: Hans de Goede <hdegoede@redhat.com>Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parentae35d65 commit9e811e1

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

‎drivers/acpi/button.c‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include<linux/input.h>
3131
#include<linux/slab.h>
3232
#include<linux/acpi.h>
33+
#include<linux/dmi.h>
3334
#include<acpi/button.h>
3435

3536
#definePREFIX "ACPI: "
@@ -76,6 +77,22 @@ static const struct acpi_device_id button_device_ids[] = {
7677
};
7778
MODULE_DEVICE_TABLE(acpi,button_device_ids);
7879

80+
/*
81+
* Some devices which don't even have a lid in anyway have a broken _LID
82+
* method (e.g. pointing to a floating gpio pin) causing spurious LID events.
83+
*/
84+
staticconststructdmi_system_idlid_blacklst[]= {
85+
{
86+
/* GP-electronic T701 */
87+
.matches= {
88+
DMI_MATCH(DMI_SYS_VENDOR,"Insyde"),
89+
DMI_MATCH(DMI_PRODUCT_NAME,"T701"),
90+
DMI_MATCH(DMI_BIOS_VERSION,"BYT70A.YNCHENG.WIN.007"),
91+
},
92+
},
93+
{}
94+
};
95+
7996
staticintacpi_button_add(structacpi_device*device);
8097
staticintacpi_button_remove(structacpi_device*device);
8198
staticvoidacpi_button_notify(structacpi_device*device,u32event);
@@ -475,6 +492,9 @@ static int acpi_button_add(struct acpi_device *device)
475492
char*name,*class;
476493
interror;
477494

495+
if (!strcmp(hid,ACPI_BUTTON_HID_LID)&&dmi_check_system(lid_blacklst))
496+
return-ENODEV;
497+
478498
button=kzalloc(sizeof(structacpi_button),GFP_KERNEL);
479499
if (!button)
480500
return-ENOMEM;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp