From: Lv Zheng <lv.zheng@intel.com>
To: "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
"Rafael J . Wysocki" <rjw@rjwysocki.net>,
Len Brown <len.brown@intel.com>
Cc: Lv Zheng <lv.zheng@intel.com>, Lv Zheng <zetalog@gmail.com>,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Peter Hutterer <peter.hutterer@who-t.net>
Subject: [RFC PATCH v4 3/5] ACPI: button: Add lid event type debugging messages
Date: Wed, 31 May 2017 17:42:06 +0800 [thread overview]
Message-ID: <09c2bb71821655e091c4e77547c62bc143efcc88.1496221776.git.lv.zheng@intel.com> (raw)
In-Reply-To: <2a779ae8c280c968b3237ac4a3d9580df7262a46.1493951798.git.lv.zheng@intel.com>
This patch adds very useful debugging information to lid events.
These messages and with ec_log_drv() can be used to demonstrate the order
between acpi_ec_resume() and acpi_button_resume().
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/button.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 36485cf..13b75e6 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -201,12 +201,17 @@ static int acpi_lid_notify_state(struct acpi_device *device,
if (!state) {
input_report_switch(button->input, SW_LID, state);
input_sync(button->input);
+ pr_debug("faked open complement event.\n");
}
}
/* Send the platform triggered reliable event */
input_report_switch(button->input, SW_LID, !state);
input_sync(button->input);
+ if (is_bios_event)
+ pr_debug("notified %s event.\n", state ? "open" : "close");
+ else
+ pr_debug("faked %s event.\n", state ? "open" : "close");
button->last_state = !!state;
button->last_time = ktime_get();
button->last_is_bios = is_bios_event;
--
2.7.4
next prev parent reply other threads:[~2017-05-31 9:42 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2a779ae8c280c968b3237ac4a3d9580df7262a46.1493951798.git.lv.zheng@intel.com>
2017-05-26 23:42 ` [RFC PATCH v3 1/5] ACPI: button: Add indication of BIOS notification and faked events Lv Zheng
2017-05-29 16:04 ` Benjamin Tissoires
2017-05-31 8:57 ` Zheng, Lv
2017-05-26 23:42 ` [RFC PATCH v3 2/5] ACPI: button: Extends complement switch event support for all modes Lv Zheng
2017-05-26 23:42 ` [RFC PATCH v3 3/5] ACPI: button: Add lid event type debugging messages Lv Zheng
2017-05-26 23:42 ` [RFC PATCH v3 4/5] ACPI: button: Fix lid notification Lv Zheng
2017-05-26 23:42 ` [RFC PATCH v3 5/5] ACPI: button: Always notify kernel space using _LID returning value Lv Zheng
2017-05-29 16:08 ` Benjamin Tissoires
2017-05-31 8:59 ` Zheng, Lv
2017-05-31 9:41 ` [RFC PATCH v4 1/5] ACPI: button: Add indication of BIOS notification and faked events Lv Zheng
2017-05-31 9:41 ` [RFC PATCH v4 2/5] ACPI: button: Extends complement switch event support for all modes Lv Zheng
2017-05-31 9:42 ` Lv Zheng [this message]
2017-05-31 9:42 ` [RFC PATCH v4 4/5] ACPI: button: Fix lid notification locks Lv Zheng
2017-05-31 9:42 ` [RFC PATCH v4 5/5] ACPI: button: Cleanup lid notification logics Lv Zheng
2017-06-07 9:43 ` [RFC PATCH 0/2] ACPI: button: Fix button.lid_init_state=method mode Lv Zheng
2017-06-07 9:43 ` [RFC PATCH v5 1/2] ACPI: button: Fix issue that button notify cannot report stateful SW_LID state Lv Zheng
2017-06-13 6:17 ` [lkp-robot] [ACPI] 4d0c35c1af: BUG:scheduling_while_atomic kernel test robot
2017-06-07 9:43 ` [RFC PATCH v5 2/2] ACPI: button: Add a quirk mode for Surface Pro 1 like laptop Lv Zheng
2017-06-21 8:54 ` [RFC PATCH v6 0/5] ACPI: button: Fix button.lid_init_state=method mode Lv Zheng
2017-06-21 8:55 ` [RFC PATCH v6 1/5] ACPI: button: Add a workaround to fix an order issue for old userspace Lv Zheng
2017-06-23 14:02 ` Benjamin Tissoires
2017-06-30 1:34 ` [lkp-robot] [ACPI] c4a9ff748c: BUG:scheduling_while_atomic kernel test robot
2017-06-21 8:55 ` [RFC PATCH v6 2/5] ACPI: button: Add an optional workaround to fix an event missing issue for old userspace Lv Zheng
2017-06-23 14:03 ` Benjamin Tissoires
2017-06-21 8:55 ` [RFC PATCH v6 3/5] ACPI: button: Rework lid_init_state=ignore mode Lv Zheng
2017-06-23 14:03 ` Benjamin Tissoires
2017-06-21 8:55 ` [RFC PATCH v6 4/5] ACPI: button: extract input creation/destruction helpers Lv Zheng
2017-06-21 8:55 ` [RFC PATCH v6 5/5] ACPI: button: Add an optional workaround to fix a persistent close issue for old userspace Lv Zheng
2017-06-23 14:03 ` Benjamin Tissoires
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=09c2bb71821655e091c4e77547c62bc143efcc88.1496221776.git.lv.zheng@intel.com \
--to=lv.zheng@intel.com \
--cc=benjamin.tissoires@redhat.com \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.hutterer@who-t.net \
--cc=rafael.j.wysocki@intel.com \
--cc=rjw@rjwysocki.net \
--cc=zetalog@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®