aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2017-01-12 02:47:40 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-01-31 11:20:45 -0500
commitecb10b694b72ca5ea51b3c90a71ff2a11963425a (patch)
tree1ae42d3af70a19670f01ef3f6cc71aaa071d2ca6
parent77e9a4aa9de10cc1418bf9a892366988802a8025 (diff)
ACPI / button: Remove lid_init_state=method mode
The mode is buggy, and lid_init__state=open is more useful than this mode, so this patch makes it deprecated. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--Documentation/acpi/acpi-lid.txt16
-rw-r--r--drivers/acpi/button.c9
2 files changed, 4 insertions, 21 deletions
diff --git a/Documentation/acpi/acpi-lid.txt b/Documentation/acpi/acpi-lid.txt
index effe7af3a5af..22cb3091f297 100644
--- a/Documentation/acpi/acpi-lid.txt
+++ b/Documentation/acpi/acpi-lid.txt
@@ -59,28 +59,20 @@ button driver uses the following 3 modes in order not to trigger issues.
59If the userspace hasn't been prepared to ignore the unreliable "opened" 59If the userspace hasn't been prepared to ignore the unreliable "opened"
60events and the unreliable initial state notification, Linux users can use 60events and the unreliable initial state notification, Linux users can use
61the following kernel parameters to handle the possible issues: 61the following kernel parameters to handle the possible issues:
62A. button.lid_init_state=method: 62A. button.lid_init_state=open:
63 When this option is specified, the ACPI button driver reports the
64 initial lid state using the returning value of the _LID control method
65 and whether the "opened"/"closed" events are paired fully relies on the
66 firmware implementation.
67 This option can be used to fix some platforms where the returning value
68 of the _LID control method is reliable but the initial lid state
69 notification is missing.
70 This option is the default behavior during the period the userspace
71 isn't ready to handle the buggy AML tables.
72B. button.lid_init_state=open:
73 When this option is specified, the ACPI button driver always reports the 63 When this option is specified, the ACPI button driver always reports the
74 initial lid state as "opened" and whether the "opened"/"closed" events 64 initial lid state as "opened" and whether the "opened"/"closed" events
75 are paired fully relies on the firmware implementation. 65 are paired fully relies on the firmware implementation.
76 This may fix some platforms where the returning value of the _LID 66 This may fix some platforms where the returning value of the _LID
77 control method is not reliable and the initial lid state notification is 67 control method is not reliable and the initial lid state notification is
78 missing. 68 missing.
69 This option is the default behavior during the period the userspace
70 isn't ready to handle the buggy AML tables.
79 71
80If the userspace has been prepared to ignore the unreliable "opened" events 72If the userspace has been prepared to ignore the unreliable "opened" events
81and the unreliable initial state notification, Linux users should always 73and the unreliable initial state notification, Linux users should always
82use the following kernel parameter: 74use the following kernel parameter:
83C. button.lid_init_state=ignore: 75B. button.lid_init_state=ignore:
84 When this option is specified, the ACPI button driver never reports the 76 When this option is specified, the ACPI button driver never reports the
85 initial lid state and there is a compensation mechanism implemented to 77 initial lid state and there is a compensation mechanism implemented to
86 ensure that the reliable "closed" notifications can always be delievered 78 ensure that the reliable "closed" notifications can always be delievered
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 6d5a8c1d3132..668137e4a069 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -57,7 +57,6 @@
57 57
58#define ACPI_BUTTON_LID_INIT_IGNORE 0x00 58#define ACPI_BUTTON_LID_INIT_IGNORE 0x00
59#define ACPI_BUTTON_LID_INIT_OPEN 0x01 59#define ACPI_BUTTON_LID_INIT_OPEN 0x01
60#define ACPI_BUTTON_LID_INIT_METHOD 0x02
61 60
62#define _COMPONENT ACPI_BUTTON_COMPONENT 61#define _COMPONENT ACPI_BUTTON_COMPONENT
63ACPI_MODULE_NAME("button"); 62ACPI_MODULE_NAME("button");
@@ -377,9 +376,6 @@ static void acpi_lid_initialize_state(struct acpi_device *device)
377 case ACPI_BUTTON_LID_INIT_OPEN: 376 case ACPI_BUTTON_LID_INIT_OPEN:
378 (void)acpi_lid_notify_state(device, 1); 377 (void)acpi_lid_notify_state(device, 1);
379 break; 378 break;
380 case ACPI_BUTTON_LID_INIT_METHOD:
381 (void)acpi_lid_update_state(device);
382 break;
383 case ACPI_BUTTON_LID_INIT_IGNORE: 379 case ACPI_BUTTON_LID_INIT_IGNORE:
384 default: 380 default:
385 break; 381 break;
@@ -563,9 +559,6 @@ static int param_set_lid_init_state(const char *val, struct kernel_param *kp)
563 if (!strncmp(val, "open", sizeof("open") - 1)) { 559 if (!strncmp(val, "open", sizeof("open") - 1)) {
564 lid_init_state = ACPI_BUTTON_LID_INIT_OPEN; 560 lid_init_state = ACPI_BUTTON_LID_INIT_OPEN;
565 pr_info("Notify initial lid state as open\n"); 561 pr_info("Notify initial lid state as open\n");
566 } else if (!strncmp(val, "method", sizeof("method") - 1)) {
567 lid_init_state = ACPI_BUTTON_LID_INIT_METHOD;
568 pr_info("Notify initial lid state with _LID return value\n");
569 } else if (!strncmp(val, "ignore", sizeof("ignore") - 1)) { 562 } else if (!strncmp(val, "ignore", sizeof("ignore") - 1)) {
570 lid_init_state = ACPI_BUTTON_LID_INIT_IGNORE; 563 lid_init_state = ACPI_BUTTON_LID_INIT_IGNORE;
571 pr_info("Do not notify initial lid state\n"); 564 pr_info("Do not notify initial lid state\n");
@@ -579,8 +572,6 @@ static int param_get_lid_init_state(char *buffer, struct kernel_param *kp)
579 switch (lid_init_state) { 572 switch (lid_init_state) {
580 case ACPI_BUTTON_LID_INIT_OPEN: 573 case ACPI_BUTTON_LID_INIT_OPEN:
581 return sprintf(buffer, "open"); 574 return sprintf(buffer, "open");
582 case ACPI_BUTTON_LID_INIT_METHOD:
583 return sprintf(buffer, "method");
584 case ACPI_BUTTON_LID_INIT_IGNORE: 575 case ACPI_BUTTON_LID_INIT_IGNORE:
585 return sprintf(buffer, "ignore"); 576 return sprintf(buffer, "ignore");
586 default: 577 default: