diff options
Diffstat (limited to 'drivers/acpi/bus.c')
-rw-r--r-- | drivers/acpi/bus.c | 45 |
1 files changed, 38 insertions, 7 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index f87ed3be779a..676c9788e1c8 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -66,10 +66,37 @@ static int set_copy_dsdt(const struct dmi_system_id *id) | |||
66 | return 0; | 66 | return 0; |
67 | } | 67 | } |
68 | #endif | 68 | #endif |
69 | static int set_gbl_term_list(const struct dmi_system_id *id) | ||
70 | { | ||
71 | acpi_gbl_parse_table_as_term_list = 1; | ||
72 | return 0; | ||
73 | } | ||
69 | 74 | ||
70 | static const struct dmi_system_id dsdt_dmi_table[] __initconst = { | 75 | static const struct dmi_system_id acpi_quirks_dmi_table[] __initconst = { |
76 | /* | ||
77 | * Touchpad on Dell XPS 9570/Precision M5530 doesn't work under I2C | ||
78 | * mode. | ||
79 | * https://bugzilla.kernel.org/show_bug.cgi?id=198515 | ||
80 | */ | ||
81 | { | ||
82 | .callback = set_gbl_term_list, | ||
83 | .ident = "Dell Precision M5530", | ||
84 | .matches = { | ||
85 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
86 | DMI_MATCH(DMI_PRODUCT_NAME, "Precision M5530"), | ||
87 | }, | ||
88 | }, | ||
89 | { | ||
90 | .callback = set_gbl_term_list, | ||
91 | .ident = "Dell XPS 15 9570", | ||
92 | .matches = { | ||
93 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
94 | DMI_MATCH(DMI_PRODUCT_NAME, "XPS 15 9570"), | ||
95 | }, | ||
96 | }, | ||
71 | /* | 97 | /* |
72 | * Invoke DSDT corruption work-around on all Toshiba Satellite. | 98 | * Invoke DSDT corruption work-around on all Toshiba Satellite. |
99 | * DSDT will be copied to memory. | ||
73 | * https://bugzilla.kernel.org/show_bug.cgi?id=14679 | 100 | * https://bugzilla.kernel.org/show_bug.cgi?id=14679 |
74 | */ | 101 | */ |
75 | { | 102 | { |
@@ -83,7 +110,7 @@ static const struct dmi_system_id dsdt_dmi_table[] __initconst = { | |||
83 | {} | 110 | {} |
84 | }; | 111 | }; |
85 | #else | 112 | #else |
86 | static const struct dmi_system_id dsdt_dmi_table[] __initconst = { | 113 | static const struct dmi_system_id acpi_quirks_dmi_table[] __initconst = { |
87 | {} | 114 | {} |
88 | }; | 115 | }; |
89 | #endif | 116 | #endif |
@@ -108,6 +135,7 @@ acpi_status acpi_bus_get_status_handle(acpi_handle handle, | |||
108 | } | 135 | } |
109 | return status; | 136 | return status; |
110 | } | 137 | } |
138 | EXPORT_SYMBOL_GPL(acpi_bus_get_status_handle); | ||
111 | 139 | ||
112 | int acpi_bus_get_status(struct acpi_device *device) | 140 | int acpi_bus_get_status(struct acpi_device *device) |
113 | { | 141 | { |
@@ -119,6 +147,12 @@ int acpi_bus_get_status(struct acpi_device *device) | |||
119 | return 0; | 147 | return 0; |
120 | } | 148 | } |
121 | 149 | ||
150 | /* Battery devices must have their deps met before calling _STA */ | ||
151 | if (acpi_device_is_battery(device) && device->dep_unmet) { | ||
152 | acpi_set_device_status(device, 0); | ||
153 | return 0; | ||
154 | } | ||
155 | |||
122 | status = acpi_bus_get_status_handle(device->handle, &sta); | 156 | status = acpi_bus_get_status_handle(device->handle, &sta); |
123 | if (ACPI_FAILURE(status)) | 157 | if (ACPI_FAILURE(status)) |
124 | return -ENODEV; | 158 | return -ENODEV; |
@@ -1019,11 +1053,8 @@ void __init acpi_early_init(void) | |||
1019 | 1053 | ||
1020 | acpi_permanent_mmap = true; | 1054 | acpi_permanent_mmap = true; |
1021 | 1055 | ||
1022 | /* | 1056 | /* Check machine-specific quirks */ |
1023 | * If the machine falls into the DMI check table, | 1057 | dmi_check_system(acpi_quirks_dmi_table); |
1024 | * DSDT will be copied to memory | ||
1025 | */ | ||
1026 | dmi_check_system(dsdt_dmi_table); | ||
1027 | 1058 | ||
1028 | status = acpi_reallocate_root_table(); | 1059 | status = acpi_reallocate_root_table(); |
1029 | if (ACPI_FAILURE(status)) { | 1060 | if (ACPI_FAILURE(status)) { |