[RFC PATCH v6 0/3] ACPI / EC: Tune the timing of EC events arrival during S3-exit

2017-09-28 Thread Lv Zheng
. If Linux EC driver started to detect events during early OS S3-exit, it need to timely poll EC events during noirq stages as in this stage there is no EC event triggering source. This patchset implements earlier EC event handling for Linux. Lv Zheng (3): ACPI / EC: Fix possible driver order issue

[RFC PATCH v6 1/3] ACPI / EC: Fix possible driver order issue by moving EC event handling earlier

2017-09-28 Thread Lv Zheng
the event handling is enabled and the noirq stage is ended. Known issue: 1. Event ocurred between acpi_ec_unblock_transactions() and acpi_ec_resume() may still lead to the order issue. This can only be fixed by adding a periodic detection mechanism during the noirq stage. Signed-off-by: Lv Zheng

[RFC PATCH v6 2/3] ACPI / EC: Add event detection support for noirq stages

2017-09-28 Thread Lv Zheng
be dropped, and the events occurred in early S3-exit could be deferred to acpi_ec_resume(). This patch solves event losses in S3-entry and resume order in S3-exit by timely polling EC events during these periods. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129 [#1] Signed-off-by: Lv Zheng

[RFC PATCH v6 3/3] ACPI / EC: Enable noirq stage event detection

2017-09-28 Thread Lv Zheng
to handle special BIOS requirements. If this commit is bisected to be a regression culprit, please report this to bugzilla.kernel.org for further investigation. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129 Signed-off-by: Lv Zheng <lv.zh...@intel.com> Tested-by: Tomislav Ivek <t

[RFC PATCH v6 0/3] ACPI / EC: Tune the timing of EC events arrival during S3-exit

2017-09-28 Thread Lv Zheng
. If Linux EC driver started to detect events during early OS S3-exit, it need to timely poll EC events during noirq stages as in this stage there is no EC event triggering source. This patchset implements earlier EC event handling for Linux. Lv Zheng (3): ACPI / EC: Fix possible driver order issue

[RFC PATCH v6 1/3] ACPI / EC: Fix possible driver order issue by moving EC event handling earlier

2017-09-28 Thread Lv Zheng
the event handling is enabled and the noirq stage is ended. Known issue: 1. Event ocurred between acpi_ec_unblock_transactions() and acpi_ec_resume() may still lead to the order issue. This can only be fixed by adding a periodic detection mechanism during the noirq stage. Signed-off-by: Lv Zheng

[RFC PATCH v6 2/3] ACPI / EC: Add event detection support for noirq stages

2017-09-28 Thread Lv Zheng
be dropped, and the events occurred in early S3-exit could be deferred to acpi_ec_resume(). This patch solves event losses in S3-entry and resume order in S3-exit by timely polling EC events during these periods. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129 [#1] Signed-off-by: Lv Zheng

[RFC PATCH v6 3/3] ACPI / EC: Enable noirq stage event detection

2017-09-28 Thread Lv Zheng
to handle special BIOS requirements. If this commit is bisected to be a regression culprit, please report this to bugzilla.kernel.org for further investigation. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129 Signed-off-by: Lv Zheng Tested-by: Tomislav Ivek --- drivers/acpi/ec.c | 2 +- 1

[PATCH 2/2] ACPI / EC: Fix a regression related to the PM ops support of ECDT device

2017-09-26 Thread Lv Zheng
@vger.kernel.org> # 4.9+ Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- drivers/acpi/ec.c | 69 + drivers/acpi/internal.h | 1 + drivers/acpi/scan.c | 21 ++ include/acpi/acpi_bus.h | 1 + include/acp

[PATCH 2/2] ACPI / EC: Fix a regression related to the PM ops support of ECDT device

2017-09-26 Thread Lv Zheng
Fixes: c2b46d679b30 (ACPI / EC: Add PM operations to improve event handling for resume process) Link: https://bugzilla.kernel.org/show_bug.cgi?id=196847 Reported-by: Luya Tshimbalanga Tested-by: Luya Tshimbalanga Cc: 4.9+ # 4.9+ Signed-off-by: Lv Zheng --- drivers/acpi

[PATCH 1/2] ACPI / EC: Fix a regression related to the triggering source of the EC event handling

2017-09-26 Thread Lv Zheng
irk) Fixes: 9c40f956ce9b (Revert "ACPI / EC: Enable event freeze mode..." to fix a regression) Link: https://bugzilla.kernel.org/show_bug.cgi?id=196833 Signed-off-by: Lv Zheng <lv.zh...@intel.com> Reported-by: Alistair Hamilton <ahpat...@gmail.com> Tested-by: Alistair Hamilton <

[PATCH 0/2] ACPI / EC: EC regression fixes related to EC event stuck

2017-09-26 Thread Lv Zheng
acpi.ec_freeze_events=Y. Note that PATCH 02 depends on PATCH 01 to be safe for driver unbind. Lv Zheng (2): ACPI / EC: Fix a regression related to the triggering source of the EC event handling ACPI / EC: Fix a regression related to the PM ops support of ECDT device drivers/acpi/ec.c

[PATCH 1/2] ACPI / EC: Fix a regression related to the triggering source of the EC event handling

2017-09-26 Thread Lv Zheng
irk) Fixes: 9c40f956ce9b (Revert "ACPI / EC: Enable event freeze mode..." to fix a regression) Link: https://bugzilla.kernel.org/show_bug.cgi?id=196833 Signed-off-by: Lv Zheng Reported-by: Alistair Hamilton Tested-by: Alistair Hamilton Cc: 4.11+ # 4.11+ --- drivers/acpi/ec.c | 12 +++-

[PATCH 0/2] ACPI / EC: EC regression fixes related to EC event stuck

2017-09-26 Thread Lv Zheng
acpi.ec_freeze_events=Y. Note that PATCH 02 depends on PATCH 01 to be safe for driver unbind. Lv Zheng (2): ACPI / EC: Fix a regression related to the triggering source of the EC event handling ACPI / EC: Fix a regression related to the PM ops support of ECDT device drivers/acpi/ec.c

[PATCH] tools/power/acpi: Add multi-threading test facility

2017-09-07 Thread Lv Zheng
loads: sudo tools/power/acpi/acpimt.sh \ -t 10 \ -d tools/power/acpi/acpidbg \ -f /proc/acpi/button/lid/LID0/state \ -f /sys/class/power_supply/AC0/online \ -f /sys/class/power_supply/BAT0/status Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- tools

[PATCH] tools/power/acpi: Add multi-threading test facility

2017-09-07 Thread Lv Zheng
loads: sudo tools/power/acpi/acpimt.sh \ -t 10 \ -d tools/power/acpi/acpidbg \ -f /proc/acpi/button/lid/LID0/state \ -f /sys/class/power_supply/AC0/online \ -f /sys/class/power_supply/BAT0/status Signed-off-by: Lv Zheng --- tools/power/acpi/acpimt.sh | 337

[PATCH v4 2/3] ACPI / EC: Add event detection support for noirq stages

2017-08-31 Thread Lv Zheng
.kernel.org/show_bug.cgi?id=196129 [#1] Signed-off-by: Lv Zheng <lv.zh...@intel.com> Tested-by: Tomislav Ivek <tomislav.i...@gmail.com> --- drivers/acpi/ec.c | 93 +++-- drivers/acpi/internal.h | 1 + 2 files changed, 92 insertions(+),

[PATCH v4 2/3] ACPI / EC: Add event detection support for noirq stages

2017-08-31 Thread Lv Zheng
.kernel.org/show_bug.cgi?id=196129 [#1] Signed-off-by: Lv Zheng Tested-by: Tomislav Ivek --- drivers/acpi/ec.c | 93 +++-- drivers/acpi/internal.h | 1 + 2 files changed, 92 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/ec.c

[PATCH v4 3/3] ACPI / EC: Enable noirq stage event detection

2017-08-31 Thread Lv Zheng
to handle special BIOS requirements. If this commit is bisected to be a regression culprit, please report this to bugzilla.kernel.org for further investigation. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129 Signed-off-by: Lv Zheng <lv.zh...@intel.com> Tested-by: Tomislav Ivek <t

[PATCH v4 3/3] ACPI / EC: Enable noirq stage event detection

2017-08-31 Thread Lv Zheng
to handle special BIOS requirements. If this commit is bisected to be a regression culprit, please report this to bugzilla.kernel.org for further investigation. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129 Signed-off-by: Lv Zheng Tested-by: Tomislav Ivek --- drivers/acpi/ec.c | 2 +- 1

[PATCH v4 1/3] ACPI / EC: Fix possible driver order issue by moving EC event handling earlier

2017-08-31 Thread Lv Zheng
acpi_ec_unblock_transactions() and acpi_ec_resume() may still lead to the order issue. This can only be fixed by adding a periodic detection mechanism during the noirq stage. Signed-off-by: Lv Zheng <lv.zh...@intel.com> Tested-by: Tomislav Ivek <tomislav.i...@gmail.com> --- drivers/ac

[PATCH v4 1/3] ACPI / EC: Fix possible driver order issue by moving EC event handling earlier

2017-08-31 Thread Lv Zheng
acpi_ec_unblock_transactions() and acpi_ec_resume() may still lead to the order issue. This can only be fixed by adding a periodic detection mechanism during the noirq stage. Signed-off-by: Lv Zheng Tested-by: Tomislav Ivek --- drivers/acpi/ec.c | 23 +++ 1 file changed, 19 insertions(+), 4

[PATCH v4 0/3] ACPI / EC: Fix EC event handling issues

2017-08-31 Thread Lv Zheng
handling may stuck. This patchset fixes these issues. v4 of this patch series re-orders the fixes so that the fix of the problem 2 could be independent against the fix of the problem 1, this is done by refining the fix of the problem 2, making it immune to the problem 3. Lv Zheng (3): ACPI / EC: Fix

[PATCH v4 0/3] ACPI / EC: Fix EC event handling issues

2017-08-31 Thread Lv Zheng
handling may stuck. This patchset fixes these issues. v4 of this patch series re-orders the fixes so that the fix of the problem 2 could be independent against the fix of the problem 1, this is done by refining the fix of the problem 2, making it immune to the problem 3. Lv Zheng (3): ACPI / EC: Fix

[PATCH v3 4/4] ACPI / EC: Enable noirq stage GPE polling

2017-08-11 Thread Lv Zheng
to be a regression culprit, please report this to bugzilla.kernel.org for further investigation. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129 Signed-off-by: Lv Zheng <lv.zh...@intel.com> Tested-by: Tomislav Ivek <tomislav.i...@gmail.com> --- drivers/acpi/ec.c | 2 +- 1 file changed,

[PATCH v3 2/4] ACPI / EC: Add IRQ polling support for noirq stages

2017-08-11 Thread Lv Zheng
h has been validated to be able to improve situation related to the reported bug (see Link #1) which requires to handle EC GPEs longer during suspend. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129 [#1] Signed-off-by: Lv Zheng <lv.zh...@intel.com> Tested-by: Tomislav

[PATCH v3 4/4] ACPI / EC: Enable noirq stage GPE polling

2017-08-11 Thread Lv Zheng
to be a regression culprit, please report this to bugzilla.kernel.org for further investigation. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129 Signed-off-by: Lv Zheng Tested-by: Tomislav Ivek --- drivers/acpi/ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi

[PATCH v3 2/4] ACPI / EC: Add IRQ polling support for noirq stages

2017-08-11 Thread Lv Zheng
h has been validated to be able to improve situation related to the reported bug (see Link #1) which requires to handle EC GPEs longer during suspend. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129 [#1] Signed-off-by: Lv Zheng Tested-by: Tomislav Ivek --- drivers/acpi/ec.c | 130 ++

[PATCH v3 0/4] ACPI / EC: Poll more EC events during suspend/resume

2017-08-11 Thread Lv Zheng
EC events earlier during resume, and have great opportunities to fix some driver order issues caused by the deferred detected EC events. v3 of this patch series only contains patch description updates. Lv Zheng (4): ACPI / EC: Cleanup EC GPE mask flag ACPI / EC: Add IRQ polling support

[PATCH v3 0/4] ACPI / EC: Poll more EC events during suspend/resume

2017-08-11 Thread Lv Zheng
EC events earlier during resume, and have great opportunities to fix some driver order issues caused by the deferred detected EC events. v3 of this patch series only contains patch description updates. Lv Zheng (4): ACPI / EC: Cleanup EC GPE mask flag ACPI / EC: Add IRQ polling support

[PATCH v3 3/4] ACPI / EC: Add support to handle EC events earlier

2017-08-11 Thread Lv Zheng
Now as GPE poller is implemented, EC driver is able to detect EC events during suspend/resume noirq stages, we can try to move EC event handling earlier without being worried about post-resume event stuck. This may help to solve driver order issues during resume. Signed-off-by: Lv Zheng <lv

[PATCH v3 1/4] ACPI / EC: Cleanup EC GPE mask flag

2017-08-11 Thread Lv Zheng
EC_FLAGS_COMMAND_STORM is actually used to mask GPE during IRQ processing. This patch cleans it up using more readable flag/function names. Signed-off-by: Lv Zheng <lv.zh...@intel.com> Tested-by: Tomislav Ivek <tomislav.i...@gmail.com> --- drivers/acpi/ec.c | 23 +++

[PATCH v3 3/4] ACPI / EC: Add support to handle EC events earlier

2017-08-11 Thread Lv Zheng
Now as GPE poller is implemented, EC driver is able to detect EC events during suspend/resume noirq stages, we can try to move EC event handling earlier without being worried about post-resume event stuck. This may help to solve driver order issues during resume. Signed-off-by: Lv Zheng Tested

[PATCH v3 1/4] ACPI / EC: Cleanup EC GPE mask flag

2017-08-11 Thread Lv Zheng
EC_FLAGS_COMMAND_STORM is actually used to mask GPE during IRQ processing. This patch cleans it up using more readable flag/function names. Signed-off-by: Lv Zheng Tested-by: Tomislav Ivek --- drivers/acpi/ec.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions

[PATCH 2/2] ACPICA: Events: Dispatch GPEs after enabling for the first time

2017-08-10 Thread Lv Zheng
a's report and Rafael's original Linux based fix. Based on Linux commit originated from Rafael J. Wysocki, fixed by Lv Zheng, tested by Mika Westerberg. Original-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> Signed-off-by: Lv Zheng <lv.zh...@intel.com> Tested-by: Mika We

[PATCH 2/2] ACPICA: Events: Dispatch GPEs after enabling for the first time

2017-08-10 Thread Lv Zheng
a's report and Rafael's original Linux based fix. Based on Linux commit originated from Rafael J. Wysocki, fixed by Lv Zheng, tested by Mika Westerberg. Original-by: Rafael J. Wysocki Signed-off-by: Lv Zheng Tested-by: Mika Westerberg --- drivers/acpi/acpica/evxfgpe.c | 22

[PATCH 0/2] ACPICA: Events: Fix GPE enabling issues related to edge-triggered GPEs

2017-08-10 Thread Lv Zheng
it is enabled. This patchset fixes these 2 problems. Lv Zheng (2): ACPICA: Events: Stop unconditionally clearing ACPI IRQs during suspend/resume ACPICA: Events: Dispatch GPEs after enabling for the first time drivers/acpi/acpica/evgpe.c | 7 --- drivers/acpi/acpica/evxfgpe.c

[PATCH 0/2] ACPICA: Events: Fix GPE enabling issues related to edge-triggered GPEs

2017-08-10 Thread Lv Zheng
it is enabled. This patchset fixes these 2 problems. Lv Zheng (2): ACPICA: Events: Stop unconditionally clearing ACPI IRQs during suspend/resume ACPICA: Events: Dispatch GPEs after enabling for the first time drivers/acpi/acpica/evgpe.c | 7 --- drivers/acpi/acpica/evxfgpe.c

[PATCH 1/2] ACPICA: Events: Stop unconditionally clearing ACPI IRQs during suspend/resume

2017-08-10 Thread Lv Zheng
as no-ops. Please report any regression related to this commit to the ACPI component on kernel bugzilla. Reported by Eric Bakula-Davis, fixed by Lv Zheng. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196249 Signed-off-by: Lv Zheng <lv.zh...@intel.com> Reported-and-tested-by: Eric Bakula

[PATCH 1/2] ACPICA: Events: Stop unconditionally clearing ACPI IRQs during suspend/resume

2017-08-10 Thread Lv Zheng
as no-ops. Please report any regression related to this commit to the ACPI component on kernel bugzilla. Reported by Eric Bakula-Davis, fixed by Lv Zheng. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196249 Signed-off-by: Lv Zheng Reported-and-tested-by: Eric Bakula-Davis Tested-by: Mika

[PATCH v2 4/4] ACPI / EC: Enable noirq stage GPE polling

2017-07-30 Thread Lv Zheng
to be a regression culprit, please report this to bugzilla.kernel.org for further investigation. Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- drivers/acpi/ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 5f951ba..f5d629b

[PATCH v2 4/4] ACPI / EC: Enable noirq stage GPE polling

2017-07-30 Thread Lv Zheng
to be a regression culprit, please report this to bugzilla.kernel.org for further investigation. Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 5f951ba..f5d629b 100644 --- a/drivers/acpi/ec.c +++ b

[PATCH v2 3/4] ACPI / EC: Add support to handle EC events earlier

2017-07-30 Thread Lv Zheng
Now as GPE poller is implemented, EC driver is able to detect EC events during suspend/resume noirq stages, we can try to move EC event handling earlier without being worried about post-resume event stuck. Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- drivers/acpi/ec.c | 4 +++-

[PATCH v2 3/4] ACPI / EC: Add support to handle EC events earlier

2017-07-30 Thread Lv Zheng
Now as GPE poller is implemented, EC driver is able to detect EC events during suspend/resume noirq stages, we can try to move EC event handling earlier without being worried about post-resume event stuck. Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 4 +++- 1 file changed, 3 insertions

[PATCH v2 2/4] ACPI / EC: Add IRQ polling support for noirq stages

2017-07-30 Thread Lv Zheng
may not require this, this patch prepares an option to make this behavior configurable. Note that this solution can also solve problem 2. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129 [#1] Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- drivers/acpi/ec.c | 130 +++

[PATCH v2 2/4] ACPI / EC: Add IRQ polling support for noirq stages

2017-07-30 Thread Lv Zheng
may not require this, this patch prepares an option to make this behavior configurable. Note that this solution can also solve problem 2. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129 [#1] Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 130 ++

[PATCH v2 1/4] ACPI / EC: Cleanup EC GPE mask flag

2017-07-30 Thread Lv Zheng
EC_FLAGS_COMMAND_STORM is actually used to mask GPE during IRQ processing. This patch cleans it up using more readable flag/function names. Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- drivers/acpi/ec.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-)

[PATCH v2 1/4] ACPI / EC: Cleanup EC GPE mask flag

2017-07-30 Thread Lv Zheng
EC_FLAGS_COMMAND_STORM is actually used to mask GPE during IRQ processing. This patch cleans it up using more readable flag/function names. Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/acpi

[PATCH v2 0/4] ACPI / EC: Solve EC event handling issues

2017-07-30 Thread Lv Zheng
in noirq stage to poll EC GPEs. In this newest timer version, timer running period is shortened and thus is safer for s2idle mode. After adding such a mechanism, we can try to handle EC events earlier after resume, this may be able to solve some driver order issues. Lv Zheng (4): ACPI / EC: Cleanup EC

[PATCH v2 0/4] ACPI / EC: Solve EC event handling issues

2017-07-30 Thread Lv Zheng
in noirq stage to poll EC GPEs. In this newest timer version, timer running period is shortened and thus is safer for s2idle mode. After adding such a mechanism, we can try to handle EC events earlier after resume, this may be able to solve some driver order issues. Lv Zheng (4): ACPI / EC: Cleanup EC

[PATCH 3/3] ACPI: EC: Enable noirq stage GPE polling

2017-07-27 Thread Lv Zheng
to be a regression culprit, please report this to bugzilla.kernel.org for further investigation. Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- drivers/acpi/ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 47f900c..12e0c8a

[PATCH 3/3] ACPI: EC: Enable noirq stage GPE polling

2017-07-27 Thread Lv Zheng
to be a regression culprit, please report this to bugzilla.kernel.org for further investigation. Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 47f900c..12e0c8a 100644 --- a/drivers/acpi/ec.c +++ b

[PATCH 1/3] ACPI / EC: Cleanup EC GPE mask flag

2017-07-27 Thread Lv Zheng
EC_FLAGS_COMMAND_STORM is actually used to mask GPE during IRQ processing. This patch cleans it up using more readable flag/function names. Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- drivers/acpi/ec.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-)

[PATCH 1/3] ACPI / EC: Cleanup EC GPE mask flag

2017-07-27 Thread Lv Zheng
EC_FLAGS_COMMAND_STORM is actually used to mask GPE during IRQ processing. This patch cleans it up using more readable flag/function names. Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/acpi

[PATCH 2/3] ACPI: EC: Add IRQ polling support for noirq stages

2017-07-27 Thread Lv Zheng
ug.cgi?id=196129 [#1] Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- drivers/acpi/ec.c | 135 drivers/acpi/internal.h | 1 + 2 files changed, 136 insertions(+) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 54879c7..47f900c

[PATCH 2/3] ACPI: EC: Add IRQ polling support for noirq stages

2017-07-27 Thread Lv Zheng
ug.cgi?id=196129 [#1] Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 135 drivers/acpi/internal.h | 1 + 2 files changed, 136 insertions(+) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 54879c7..47f900c 100644 --- a/drivers/acp

[PATCH 2/2] ACPI: EC: Revert "ACPI / EC: Enable event freeze mode..." to fix a regression

2017-07-11 Thread Lv Zheng
#1] Tested-by: Damjan Georgievski <gdam...@gmail.com> Signed-off-by: Lv Zheng <lv.zh...@intel.com> Cc: Stable <sta...@vger.kernel.org> # 4.9+ --- drivers/acpi/ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 05e4eb5..ddb01

[PATCH 1/2] ACPI: EC: Drop EC noirq hooks to fix a regression

2017-07-11 Thread Lv Zheng
.com> Tested-by: Fernando Chaves <nanocha...@gmail.com> Tested-by: Tomislav Ivek <tomislav.i...@gmail.com> Tested-by: Denis P. <theoriginal.skullbur...@gmail.com> Signed-off-by: Lv Zheng <lv.zh...@intel.com> Cc: Stable <sta...@vger.kernel.org> # all applicable --- driv

[PATCH 2/2] ACPI: EC: Revert "ACPI / EC: Enable event freeze mode..." to fix a regression

2017-07-11 Thread Lv Zheng
#1] Tested-by: Damjan Georgievski Signed-off-by: Lv Zheng Cc: Stable # 4.9+ --- drivers/acpi/ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 05e4eb5..ddb01e9 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -147,7 +147,7

[PATCH 1/2] ACPI: EC: Drop EC noirq hooks to fix a regression

2017-07-11 Thread Lv Zheng
P. Signed-off-by: Lv Zheng Cc: Stable # all applicable --- drivers/acpi/ec.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 854d428..05e4eb5 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1870,24 +1870,6 @@

[RFC PATCH v6 4/5] ACPI: button: extract input creation/destruction helpers

2017-06-21 Thread Lv Zheng
input node. This patch prepares the dynamic creation/destruction of the input node. Signed-off-by: Benjamin Tissoires <benjamin.tissoi...@redhat.com> Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- drivers/acpi/button.c | 86 +++

[RFC PATCH v6 4/5] ACPI: button: extract input creation/destruction helpers

2017-06-21 Thread Lv Zheng
the dynamic creation/destruction of the input node. Signed-off-by: Benjamin Tissoires Signed-off-by: Lv Zheng --- drivers/acpi/button.c | 86 +++ 1 file changed, 53 insertions(+), 33 deletions(-) diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c

[RFC PATCH v6 3/5] ACPI: button: Rework lid_init_state=ignore mode

2017-06-21 Thread Lv Zheng
tate=ignore ABI change solution is now too complicated if its purpose is to only solve this final incompliant use case. This patch re-works it by unconditionally prepending "open" complement events. Cc: <systemd-de...@lists.freedesktop.org> Cc: Benjamin Tissoires <benjamin

[RFC PATCH v6 3/5] ACPI: button: Rework lid_init_state=ignore mode

2017-06-21 Thread Lv Zheng
tate=ignore ABI change solution is now too complicated if its purpose is to only solve this final incompliant use case. This patch re-works it by unconditionally prepending "open" complement events. Cc: Cc: Benjamin Tissoires Cc: Peter Hutterer Signed-off-by: Lv Zheng --- drivers

[RFC PATCH v6 5/5] ACPI: button: Add an optional workaround to fix a persistent close issue for old userspace

2017-06-21 Thread Lv Zheng
ing global lid_device. Signed-off-by: Benjamin Tissoires <benjamin.tissoi...@redhat.com> Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- drivers/acpi/button.c | 96 ++- 1 file changed, 88 insertions(+), 8 deletions(-) diff --git a/d

[RFC PATCH v6 2/5] ACPI: button: Add an optional workaround to fix an event missing issue for old userspace

2017-06-21 Thread Lv Zheng
ts.freedesktop.org> Cc: Benjamin Tissoires <benjamin.tissoi...@redhat.com> Cc: Peter Hutterer <peter.hutte...@who-t.net> Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- drivers/acpi/button.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git

[RFC PATCH v6 5/5] ACPI: button: Add an optional workaround to fix a persistent close issue for old userspace

2017-06-21 Thread Lv Zheng
is left to userspace to handle with a hwdb file and a udev rule. Reworked by Lv to make this solution optional, code based on top of old "ignore" mode and make lid_reliable configurable to all lid devices to eliminate the difficulties of synchronously handling global lid_device. S

[RFC PATCH v6 2/5] ACPI: button: Add an optional workaround to fix an event missing issue for old userspace

2017-06-21 Thread Lv Zheng
way, this patch prepares an option for users to enable on failure platforms for old userspace programs. Users can configure update interval via button.lid_update_interval. This should be configured to a smaller value than HoldoffTimeoutSec in /etc/systemd/logind.conf. Cc: Cc: Benjamin Tissoires

[RFC PATCH v6 1/5] ACPI: button: Add a workaround to fix an order issue for old userspace

2017-06-21 Thread Lv Zheng
d still considers the last state as "close" and suspends the platform after the HoldoffTimeoutSec times out. Cc: <systemd-de...@lists.freedesktop.org> Cc: Benjamin Tissoires <benjamin.tissoi...@redhat.com> Cc: Peter Hutterer <peter.hutte...@who-t.net> Signed-off-by: L

[RFC PATCH v6 1/5] ACPI: button: Add a workaround to fix an order issue for old userspace

2017-06-21 Thread Lv Zheng
d still considers the last state as "close" and suspends the platform after the HoldoffTimeoutSec times out. Cc: Cc: Benjamin Tissoires Cc: Peter Hutterer Signed-off-by: Lv Zheng --- drivers/acpi/button.c | 36 ++-- 1 file changed, 34 insertion

[RFC PATCH v6 0/5] ACPI: button: Fix button.lid_init_state=method mode

2017-06-21 Thread Lv Zheng
complement open events. 3.2. lid_unreliable=1: dymamically adds/removes input node. Benjamin Tissoires (2): ACPI: button: extract input creation/destruction helpers ACPI: button: Add an optional workaround to fix a persistent close issue for old userspace Lv Zheng (3): ACPI: butt

[RFC PATCH v6 0/5] ACPI: button: Fix button.lid_init_state=method mode

2017-06-21 Thread Lv Zheng
complement open events. 3.2. lid_unreliable=1: dymamically adds/removes input node. Benjamin Tissoires (2): ACPI: button: extract input creation/destruction helpers ACPI: button: Add an optional workaround to fix a persistent close issue for old userspace Lv Zheng (3): ACPI: butt

[PATCH v3 2/4] ACPI / EC: Add support to skip boot stage DSDT probe

2017-06-14 Thread Lv Zheng
-by: Daniel Drake <dr...@endlessm.com> Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- drivers/acpi/ec.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index c1f480b..44b973e 100644 --- a/drivers/acpi/ec.c +++ b/drive

[PATCH v3 2/4] ACPI / EC: Add support to skip boot stage DSDT probe

2017-06-14 Thread Lv Zheng
-by: Daniel Drake Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index c1f480b..44b973e 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1667,12 +1667,34 @@ static const struct

[PATCH v3 3/4] ACPI / EC: Fix media keys not working problem on some Asus laptops

2017-06-14 Thread Lv Zheng
hris Chiu <c...@endlessm.com> Signed-off-by: Carlo Caione <ca...@caione.org> Signed-off-by: Lv Zheng <lv.zh...@intel.com> Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- drivers/acpi/ec.c | 49 +++-- 1 file changed, 43 insertions(+), 6 del

[PATCH v3 4/4] ACPI / EC: Add quirk for GL720VMK

2017-06-14 Thread Lv Zheng
From: Carlo Caione <ca...@caione.org> ASUS GL720VMK is also affected by the EC GPE preference issue. Signed-off-by: Carlo Caione <ca...@caione.org> Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- drivers/acpi/ec.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) di

[PATCH v3 1/4] ACPI / EC: Enhance boot EC sanity check

2017-06-14 Thread Lv Zheng
/show_bug.cgi?id=195651 Tested-by: Daniel Drake <dr...@endlessm.com> Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- drivers/acpi/ec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index c24235d..c1f480b 100644 --- a/drivers/acpi/ec.c +++ b/drive

[PATCH v3 3/4] ACPI / EC: Fix media keys not working problem on some Asus laptops

2017-06-14 Thread Lv Zheng
Zheng Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 49 +++-- 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 44b973e..2189048 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -190,6

[PATCH v3 4/4] ACPI / EC: Add quirk for GL720VMK

2017-06-14 Thread Lv Zheng
From: Carlo Caione ASUS GL720VMK is also affected by the EC GPE preference issue. Signed-off-by: Carlo Caione Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 2189048..ab04f0c

[PATCH v3 1/4] ACPI / EC: Enhance boot EC sanity check

2017-06-14 Thread Lv Zheng
/show_bug.cgi?id=195651 Tested-by: Daniel Drake Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index c24235d..c1f480b 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1362,6 +1362,8 @@ ec_parse_device

[PATCH v3 0/4] ACPI / EC: Add quirk modes for boot EC support

2017-06-14 Thread Lv Zheng
: Fix media keys not working problem on some Asus laptops Lv Zheng (2): ACPI / EC: Enhance boot EC sanity check ACPI / EC: Add support to skip boot stage DSDT probe drivers/acpi/ec.c | 77 ++- 1 file changed, 71 insertions(+), 6 deletions

[PATCH v3 0/4] ACPI / EC: Add quirk modes for boot EC support

2017-06-14 Thread Lv Zheng
: Fix media keys not working problem on some Asus laptops Lv Zheng (2): ACPI / EC: Enhance boot EC sanity check ACPI / EC: Add support to skip boot stage DSDT probe drivers/acpi/ec.c | 77 ++- 1 file changed, 71 insertions(+), 6 deletions

[PATCH 2/3] ACPI: EC: Fix EC command visibility for dynamic debug

2017-06-14 Thread Lv Zheng
bugzilla triage work. This patch fixes this issue by enabling acpi_ec_cmd_string() for CONFIG_DYNAMIC_DEBUG. Tested-by: Wang Wendy <wendy.w...@intel.com> Tested-by: Feng Chenzhou <chenzhoux.f...@intel.com> Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- drivers/acpi/ec.c | 2

[PATCH 3/3] ACPI: EC: Change EC noirq tuning to be an optional behavior

2017-06-14 Thread Lv Zheng
by: Jens Axboe <ax...@kernel.dk> Tested-by: Gjorgji Jankovski <j.gjor...@gmail.com> Tested-by: Damjan Georgievski <gdam...@gmail.com> Tested-by: Fernando Chaves <nanocha...@gmail.com> Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- drivers/acpi/ec.c | 20 ++-

[PATCH 2/3] ACPI: EC: Fix EC command visibility for dynamic debug

2017-06-14 Thread Lv Zheng
bugzilla triage work. This patch fixes this issue by enabling acpi_ec_cmd_string() for CONFIG_DYNAMIC_DEBUG. Tested-by: Wang Wendy Tested-by: Feng Chenzhou Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/ec.c b/dri

[PATCH 3/3] ACPI: EC: Change EC noirq tuning to be an optional behavior

2017-06-14 Thread Lv Zheng
-by: Lv Zheng --- drivers/acpi/ec.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index f3ff591..de5dde6 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -151,6 +151,10 @@ static bool ec_freeze_events

[PATCH 1/3] ACPI: EC: Fix an EC event IRQ storming issue

2017-06-13 Thread Lv Zheng
://jira01.devtools.intel.com/browse/LCK-4004 [#1] Tested-by: Wang Wendy <wendy.w...@intel.com> Tested-by: Feng Chenzhou <chenzhoux.f...@intel.com> Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- drivers/acpi/ec.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) di

[PATCH 1/3] ACPI: EC: Fix an EC event IRQ storming issue

2017-06-13 Thread Lv Zheng
://jira01.devtools.intel.com/browse/LCK-4004 [#1] Tested-by: Wang Wendy Tested-by: Feng Chenzhou Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index c24235d..30d7f82 100644

[RFC PATCH v5 1/2] ACPI: button: Fix issue that button notify cannot report stateful SW_LID state

2017-06-07 Thread Lv Zheng
reedesktop.org> Cc: Benjamin Tissoires <benjamin.tissoi...@redhat.com> Cc: Peter Hutterer <peter.hutte...@who-t.net> Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- drivers/acpi/button.c | 36 +--- 1 file changed, 29 insertions(+), 7 delet

[RFC PATCH v5 1/2] ACPI: button: Fix issue that button notify cannot report stateful SW_LID state

2017-06-07 Thread Lv Zheng
y updating lid state. Thus this patch doesn't kill the timer after seeing the BIOS notification, but continously sending _LID return value to the input layer for button.lid_init_state=method mode. The users can configure update interval via button.lid_update_interval. Cc: Cc: Benjamin Tissoires C

[RFC PATCH v5 2/2] ACPI: button: Add a quirk mode for Surface Pro 1 like laptop

2017-06-07 Thread Lv Zheng
m> Cc: Peter Hutterer <peter.hutte...@who-t.net> Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- drivers/acpi/button.c | 164 -- 1 file changed, 66 insertions(+), 98 deletions(-) diff --git a/drivers/acpi/button.c b/drivers/acp

[RFC PATCH v5 2/2] ACPI: button: Add a quirk mode for Surface Pro 1 like laptop

2017-06-07 Thread Lv Zheng
Since such platform only sends "close", old complicated "open" complement event mechanism is replaced by a simpler one of always prepending "open" before any events. Cc: Cc: Benjamin Tissoires Cc: Peter Hutterer Signed-

[RFC PATCH 0/2] ACPI: button: Fix button.lid_init_state=method mode

2017-06-07 Thread Lv Zheng
change again is unnecessary for such platforms, so this patch simply converts "lid_unreliable" into "button.lid_init_state=ignore". This material is just sent to demonstrate solutions and issues, the final solution is not determined yet. So marking them a

[RFC PATCH 0/2] ACPI: button: Fix button.lid_init_state=method mode

2017-06-07 Thread Lv Zheng
change again is unnecessary for such platforms, so this patch simply converts "lid_unreliable" into "button.lid_init_state=ignore". This material is just sent to demonstrate solutions and issues, the final solution is not determined yet. So marking them a

[PATCH v5] ACPICA: Tables: Add mechanism to allow to balance late stage acpi_get_table() independently

2017-06-06 Thread Lv Zheng
essage. Lv Zheng. Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- drivers/acpi/acpica/tbutils.c | 36 +++- include/acpi/actbl.h | 13 + 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/drivers/acpi/acpica/tbutils.c b/dri

[PATCH v5] ACPICA: Tables: Add mechanism to allow to balance late stage acpi_get_table() independently

2017-06-06 Thread Lv Zheng
essage. Lv Zheng. Signed-off-by: Lv Zheng --- drivers/acpi/acpica/tbutils.c | 36 +++- include/acpi/actbl.h | 13 + 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c ind

[RFC PATCH v4 5/5] ACPI: button: Cleanup lid notification logics

2017-05-31 Thread Lv Zheng
<benjamin.tissoi...@redhat.com> Cc: Peter Hutterer <peter.hutte...@who-t.net> Signed-off-by: Lv Zheng <lv.zh...@intel.com> --- drivers/acpi/button.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) Index: linux-acpica/dri

[RFC PATCH v4 5/5] ACPI: button: Cleanup lid notification logics

2017-05-31 Thread Lv Zheng
Hutterer Signed-off-by: Lv Zheng --- drivers/acpi/button.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) Index: linux-acpica/drivers/acpi/button.c === --- linux-acpica.orig/drivers/acpi/button.c +++ linux

[RFC PATCH v4 2/5] ACPI: button: Extends complement switch event support for all modes

2017-05-31 Thread Lv Zheng
new indication: generating complement switch event for BIOS notified "close". So that when button driver is reverted back to "method" mode, it won't act worse than "ignore" mode on fixed systemd. Tested with systemd 233, all modes worked fine (no suspend/resume loop a

[RFC PATCH v4 2/5] ACPI: button: Extends complement switch event support for all modes

2017-05-31 Thread Lv Zheng
new indication: generating complement switch event for BIOS notified "close". So that when button driver is reverted back to "method" mode, it won't act worse than "ignore" mode on fixed systemd. Tested with systemd 233, all modes worked fine (no suspend/resume loop a

  1   2   3   4   5   6   7   8   9   10   >