diff options
-rw-r--r-- | drivers/acpi/acpica/acpredef.h | 5 | ||||
-rw-r--r-- | drivers/acpi/blacklist.c | 17 | ||||
-rw-r--r-- | drivers/acpi/sleep.c | 8 | ||||
-rw-r--r-- | drivers/platform/x86/acerhdf.c | 12 | ||||
-rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 26 |
5 files changed, 53 insertions, 15 deletions
diff --git a/drivers/acpi/acpica/acpredef.h b/drivers/acpi/acpica/acpredef.h index cd80d1dd1950..57bdaf6ffab1 100644 --- a/drivers/acpi/acpica/acpredef.h +++ b/drivers/acpi/acpica/acpredef.h | |||
@@ -203,8 +203,9 @@ static const union acpi_predefined_info predefined_names[] = | |||
203 | {{"_BCT", 1, ACPI_RTYPE_INTEGER}}, | 203 | {{"_BCT", 1, ACPI_RTYPE_INTEGER}}, |
204 | {{"_BDN", 0, ACPI_RTYPE_INTEGER}}, | 204 | {{"_BDN", 0, ACPI_RTYPE_INTEGER}}, |
205 | {{"_BFS", 1, 0}}, | 205 | {{"_BFS", 1, 0}}, |
206 | {{"_BIF", 0, ACPI_RTYPE_PACKAGE}}, /* Fixed-length (9 Int),(4 Str) */ | 206 | {{"_BIF", 0, ACPI_RTYPE_PACKAGE} }, /* Fixed-length (9 Int),(4 Str/Buf) */ |
207 | {{{ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 9, ACPI_RTYPE_STRING}, 4,0}}, | 207 | {{{ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 9, |
208 | ACPI_RTYPE_STRING | ACPI_RTYPE_BUFFER}, 4, 0} }, | ||
208 | 209 | ||
209 | {{"_BIX", 0, ACPI_RTYPE_PACKAGE}}, /* Fixed-length (16 Int),(4 Str) */ | 210 | {{"_BIX", 0, ACPI_RTYPE_PACKAGE}}, /* Fixed-length (16 Int),(4 Str) */ |
210 | {{{ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 16, ACPI_RTYPE_STRING}, 4, | 211 | {{{ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 16, ACPI_RTYPE_STRING}, 4, |
diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c index e56b2a7b53db..23e5a0519af5 100644 --- a/drivers/acpi/blacklist.c +++ b/drivers/acpi/blacklist.c | |||
@@ -224,6 +224,7 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
224 | * _OSI(Linux) helps sound | 224 | * _OSI(Linux) helps sound |
225 | * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad R61"), | 225 | * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad R61"), |
226 | * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T61"), | 226 | * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T61"), |
227 | * T400, T500 | ||
227 | * _OSI(Linux) has Linux specific hooks | 228 | * _OSI(Linux) has Linux specific hooks |
228 | * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X61"), | 229 | * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X61"), |
229 | * _OSI(Linux) is a NOP: | 230 | * _OSI(Linux) is a NOP: |
@@ -254,6 +255,22 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
254 | DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X61"), | 255 | DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X61"), |
255 | }, | 256 | }, |
256 | }, | 257 | }, |
258 | { | ||
259 | .callback = dmi_enable_osi_linux, | ||
260 | .ident = "Lenovo ThinkPad T400", | ||
261 | .matches = { | ||
262 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
263 | DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T400"), | ||
264 | }, | ||
265 | }, | ||
266 | { | ||
267 | .callback = dmi_enable_osi_linux, | ||
268 | .ident = "Lenovo ThinkPad T500", | ||
269 | .matches = { | ||
270 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
271 | DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T500"), | ||
272 | }, | ||
273 | }, | ||
257 | {} | 274 | {} |
258 | }; | 275 | }; |
259 | 276 | ||
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 4cc1b8116e76..5f2c379ab7bf 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c | |||
@@ -430,6 +430,14 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = { | |||
430 | }, | 430 | }, |
431 | { | 431 | { |
432 | .callback = init_set_sci_en_on_resume, | 432 | .callback = init_set_sci_en_on_resume, |
433 | .ident = "Hewlett-Packard Compaq Presario C700 Notebook PC", | ||
434 | .matches = { | ||
435 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | ||
436 | DMI_MATCH(DMI_PRODUCT_NAME, "Compaq Presario C700 Notebook PC"), | ||
437 | }, | ||
438 | }, | ||
439 | { | ||
440 | .callback = init_set_sci_en_on_resume, | ||
433 | .ident = "Hewlett-Packard Compaq Presario CQ40 Notebook PC", | 441 | .ident = "Hewlett-Packard Compaq Presario CQ40 Notebook PC", |
434 | .matches = { | 442 | .matches = { |
435 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | 443 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), |
diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c index 0a8f735f6c4a..ab64522aaa64 100644 --- a/drivers/platform/x86/acerhdf.c +++ b/drivers/platform/x86/acerhdf.c | |||
@@ -52,7 +52,7 @@ | |||
52 | */ | 52 | */ |
53 | #undef START_IN_KERNEL_MODE | 53 | #undef START_IN_KERNEL_MODE |
54 | 54 | ||
55 | #define DRV_VER "0.5.17" | 55 | #define DRV_VER "0.5.18" |
56 | 56 | ||
57 | /* | 57 | /* |
58 | * According to the Atom N270 datasheet, | 58 | * According to the Atom N270 datasheet, |
@@ -61,7 +61,7 @@ | |||
61 | * measured by the on-die thermal monitor are within 0 <= Tj <= 90. So, | 61 | * measured by the on-die thermal monitor are within 0 <= Tj <= 90. So, |
62 | * assume 89°C is critical temperature. | 62 | * assume 89°C is critical temperature. |
63 | */ | 63 | */ |
64 | #define ACERHDF_TEMP_CRIT 89 | 64 | #define ACERHDF_TEMP_CRIT 89000 |
65 | #define ACERHDF_FAN_OFF 0 | 65 | #define ACERHDF_FAN_OFF 0 |
66 | #define ACERHDF_FAN_AUTO 1 | 66 | #define ACERHDF_FAN_AUTO 1 |
67 | 67 | ||
@@ -69,7 +69,7 @@ | |||
69 | * No matter what value the user puts into the fanon variable, turn on the fan | 69 | * No matter what value the user puts into the fanon variable, turn on the fan |
70 | * at 80 degree Celsius to prevent hardware damage | 70 | * at 80 degree Celsius to prevent hardware damage |
71 | */ | 71 | */ |
72 | #define ACERHDF_MAX_FANON 80 | 72 | #define ACERHDF_MAX_FANON 80000 |
73 | 73 | ||
74 | /* | 74 | /* |
75 | * Maximum interval between two temperature checks is 15 seconds, as the die | 75 | * Maximum interval between two temperature checks is 15 seconds, as the die |
@@ -85,8 +85,8 @@ static int kernelmode; | |||
85 | #endif | 85 | #endif |
86 | 86 | ||
87 | static unsigned int interval = 10; | 87 | static unsigned int interval = 10; |
88 | static unsigned int fanon = 63; | 88 | static unsigned int fanon = 63000; |
89 | static unsigned int fanoff = 58; | 89 | static unsigned int fanoff = 58000; |
90 | static unsigned int verbose; | 90 | static unsigned int verbose; |
91 | static unsigned int fanstate = ACERHDF_FAN_AUTO; | 91 | static unsigned int fanstate = ACERHDF_FAN_AUTO; |
92 | static char force_bios[16]; | 92 | static char force_bios[16]; |
@@ -171,7 +171,7 @@ static int acerhdf_get_temp(int *temp) | |||
171 | if (ec_read(bios_cfg->tempreg, &read_temp)) | 171 | if (ec_read(bios_cfg->tempreg, &read_temp)) |
172 | return -EINVAL; | 172 | return -EINVAL; |
173 | 173 | ||
174 | *temp = read_temp; | 174 | *temp = read_temp * 1000; |
175 | 175 | ||
176 | return 0; | 176 | return 0; |
177 | } | 177 | } |
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index d93108d148fc..a848c7e20aeb 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c | |||
@@ -1680,36 +1680,48 @@ static void tpacpi_remove_driver_attributes(struct device_driver *drv) | |||
1680 | | (__bv1) << 8 | (__bv2) } | 1680 | | (__bv1) << 8 | (__bv2) } |
1681 | 1681 | ||
1682 | #define TPV_Q_X(__v, __bid1, __bid2, __bv1, __bv2, \ | 1682 | #define TPV_Q_X(__v, __bid1, __bid2, __bv1, __bv2, \ |
1683 | __eid1, __eid2, __ev1, __ev2) \ | 1683 | __eid, __ev1, __ev2) \ |
1684 | { .vendor = (__v), \ | 1684 | { .vendor = (__v), \ |
1685 | .bios = TPID(__bid1, __bid2), \ | 1685 | .bios = TPID(__bid1, __bid2), \ |
1686 | .ec = TPID(__eid1, __eid2), \ | 1686 | .ec = __eid, \ |
1687 | .quirks = (__ev1) << 24 | (__ev2) << 16 \ | 1687 | .quirks = (__ev1) << 24 | (__ev2) << 16 \ |
1688 | | (__bv1) << 8 | (__bv2) } | 1688 | | (__bv1) << 8 | (__bv2) } |
1689 | 1689 | ||
1690 | #define TPV_QI0(__id1, __id2, __bv1, __bv2) \ | 1690 | #define TPV_QI0(__id1, __id2, __bv1, __bv2) \ |
1691 | TPV_Q(PCI_VENDOR_ID_IBM, __id1, __id2, __bv1, __bv2) | 1691 | TPV_Q(PCI_VENDOR_ID_IBM, __id1, __id2, __bv1, __bv2) |
1692 | 1692 | ||
1693 | /* Outdated IBM BIOSes often lack the EC id string */ | ||
1693 | #define TPV_QI1(__id1, __id2, __bv1, __bv2, __ev1, __ev2) \ | 1694 | #define TPV_QI1(__id1, __id2, __bv1, __bv2, __ev1, __ev2) \ |
1694 | TPV_Q_X(PCI_VENDOR_ID_IBM, __id1, __id2, \ | 1695 | TPV_Q_X(PCI_VENDOR_ID_IBM, __id1, __id2, \ |
1695 | __bv1, __bv2, __id1, __id2, __ev1, __ev2) | 1696 | __bv1, __bv2, TPID(__id1, __id2), \ |
1697 | __ev1, __ev2), \ | ||
1698 | TPV_Q_X(PCI_VENDOR_ID_IBM, __id1, __id2, \ | ||
1699 | __bv1, __bv2, TPACPI_MATCH_UNKNOWN, \ | ||
1700 | __ev1, __ev2) | ||
1696 | 1701 | ||
1702 | /* Outdated IBM BIOSes often lack the EC id string */ | ||
1697 | #define TPV_QI2(__bid1, __bid2, __bv1, __bv2, \ | 1703 | #define TPV_QI2(__bid1, __bid2, __bv1, __bv2, \ |
1698 | __eid1, __eid2, __ev1, __ev2) \ | 1704 | __eid1, __eid2, __ev1, __ev2) \ |
1699 | TPV_Q_X(PCI_VENDOR_ID_IBM, __bid1, __bid2, \ | 1705 | TPV_Q_X(PCI_VENDOR_ID_IBM, __bid1, __bid2, \ |
1700 | __bv1, __bv2, __eid1, __eid2, __ev1, __ev2) | 1706 | __bv1, __bv2, TPID(__eid1, __eid2), \ |
1707 | __ev1, __ev2), \ | ||
1708 | TPV_Q_X(PCI_VENDOR_ID_IBM, __bid1, __bid2, \ | ||
1709 | __bv1, __bv2, TPACPI_MATCH_UNKNOWN, \ | ||
1710 | __ev1, __ev2) | ||
1701 | 1711 | ||
1702 | #define TPV_QL0(__id1, __id2, __bv1, __bv2) \ | 1712 | #define TPV_QL0(__id1, __id2, __bv1, __bv2) \ |
1703 | TPV_Q(PCI_VENDOR_ID_LENOVO, __id1, __id2, __bv1, __bv2) | 1713 | TPV_Q(PCI_VENDOR_ID_LENOVO, __id1, __id2, __bv1, __bv2) |
1704 | 1714 | ||
1705 | #define TPV_QL1(__id1, __id2, __bv1, __bv2, __ev1, __ev2) \ | 1715 | #define TPV_QL1(__id1, __id2, __bv1, __bv2, __ev1, __ev2) \ |
1706 | TPV_Q_X(PCI_VENDOR_ID_LENOVO, __id1, __id2, \ | 1716 | TPV_Q_X(PCI_VENDOR_ID_LENOVO, __id1, __id2, \ |
1707 | __bv1, __bv2, __id1, __id2, __ev1, __ev2) | 1717 | __bv1, __bv2, TPID(__id1, __id2), \ |
1718 | __ev1, __ev2) | ||
1708 | 1719 | ||
1709 | #define TPV_QL2(__bid1, __bid2, __bv1, __bv2, \ | 1720 | #define TPV_QL2(__bid1, __bid2, __bv1, __bv2, \ |
1710 | __eid1, __eid2, __ev1, __ev2) \ | 1721 | __eid1, __eid2, __ev1, __ev2) \ |
1711 | TPV_Q_X(PCI_VENDOR_ID_LENOVO, __bid1, __bid2, \ | 1722 | TPV_Q_X(PCI_VENDOR_ID_LENOVO, __bid1, __bid2, \ |
1712 | __bv1, __bv2, __eid1, __eid2, __ev1, __ev2) | 1723 | __bv1, __bv2, TPID(__eid1, __eid2), \ |
1724 | __ev1, __ev2) | ||
1713 | 1725 | ||
1714 | static const struct tpacpi_quirk tpacpi_bios_version_qtable[] __initconst = { | 1726 | static const struct tpacpi_quirk tpacpi_bios_version_qtable[] __initconst = { |
1715 | /* Numeric models ------------------ */ | 1727 | /* Numeric models ------------------ */ |
@@ -6313,7 +6325,7 @@ static int brightness_write(char *buf) | |||
6313 | * Doing it this way makes the syscall restartable in case of EINTR | 6325 | * Doing it this way makes the syscall restartable in case of EINTR |
6314 | */ | 6326 | */ |
6315 | rc = brightness_set(level); | 6327 | rc = brightness_set(level); |
6316 | return (rc == -EINTR)? ERESTARTSYS : rc; | 6328 | return (rc == -EINTR)? -ERESTARTSYS : rc; |
6317 | } | 6329 | } |
6318 | 6330 | ||
6319 | static struct ibm_struct brightness_driver_data = { | 6331 | static struct ibm_struct brightness_driver_data = { |