linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bastien Nocera <hadess@hadess.net>
To: Benjamin Tissoires <benjamin.tissoires@gmail.com>,
	"Zheng, Lv" <lv.zheng@intel.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	"Zhang, Rui" <rui.zhang@intel.com>,
	"Wysocki, Rafael J" <rafael.j.wysocki@intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"Brown, Len" <len.brown@intel.com>, Lv Zheng <zetalog@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>
Subject: Re: [PATCH v4 2/2] ACPI / button: Add document for ACPI control method lid device restrictions
Date: Sun, 24 Jul 2016 13:28:56 +0200	[thread overview]
Message-ID: <1469359736.6761.110.camel@hadess.net> (raw)
In-Reply-To: <CAN+gG=FBE1e96qZsbAvV7gCizMByca3m38-qt=8ftsSXYFyQhA@mail.gmail.com>

On Fri, 2016-07-22 at 11:08 +0200, Benjamin Tissoires wrote:
> 
<snip>
> Then you just need to amend the documentation to say that the
> fallback
> of the KEY events is not the "future" but a way to get events on some
> reduced platforms and it will not be the default.
> Please make sure userspace knows that the default is the good SW_LID,
> and some particular cases will need to be handled through the KEY
> events, not the other way around.
> 
> [few thoughts later]
> 
> How about:
> - you send only one patch with the SW_LID ON/OFF or OFF/ON when we
> receive the notification on buggy platform
> - in the same patch, you add the documentation saying that on most
> platforms, LID is reliable but some don't provide a reliable LID
> state, but you guarantee to send an event when the state changes
> - in userspace, we add the hwdb which says "on this particular
> platform, don't rely on the actual state, but wait for events" ->
> this
> basically removes the polling on these platforms.
> 
> Bastien, Dmitry?
> 
> I still don't like relying on userspace to actually set the SW_LID
> back to open on resume, as we should not rely on some userspace
> program to set the value (but if logind really wants it, it's up to
> them).

>From my point of view, I would only send the events that can actually
be generated by the system, not any synthetic ones, because user-space
would have no way to know that this was synthetic, and how accurate it
would be.

So we'd have a separate API, or a separate event for the "close to
Windows behaviour" devices. We'd then use hwdb in udev to tag the
machines that don't have a reliable LID status, in user-space, so we
can have a quick turn around for those machines.

That should hopefully give us a way to tag test systems, so we can test
the new behaviour, though we'll certainly need to have some changes
made in the stack.

As Benjamin mentioned, it would be nice to have a list of devices that
don't work today, because of this problem.

Cheers

  parent reply	other threads:[~2016-07-24 11:29 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-17  8:27 [RFC PATCH 1/2] ACPI / button: Send "open" state after boot/resume Lv Zheng
2016-05-17 23:36 ` Rafael J. Wysocki
2016-05-18  1:25   ` Zheng, Lv
2016-05-18 22:56     ` Rafael J. Wysocki
2016-05-19  1:50       ` Zheng, Lv
2016-05-19 13:21         ` Rafael J. Wysocki
2016-05-26 13:31           ` Benjamin Tissoires
2016-05-30  1:39             ` Zheng, Lv
2016-05-18 12:57 ` Bastien Nocera
2016-05-18 21:41   ` Rafael J. Wysocki
2016-05-19  1:59   ` Zheng, Lv
2016-05-27  7:15 ` [PATCH v2 0/3] ACPI / button: Clarify initial lid state Lv Zheng
2016-05-27  7:15   ` [PATCH v2 1/3] ACPI / button: Remove initial lid state notification Lv Zheng
2016-05-27  7:15   ` [PATCH v2 2/3] ACPI / button: Refactor functions to eliminate redundant code Lv Zheng
2016-05-27  7:16   ` [PATCH v2 3/3] ACPI / button: Send "open" state after boot/resume Lv Zheng
2016-05-30  8:10     ` Benjamin Tissoires
2016-05-31  2:55       ` Zheng, Lv
2016-05-31 14:47         ` Benjamin Tissoires
2016-06-01  1:17           ` Zheng, Lv
2016-06-01  7:51             ` Zheng, Lv
2016-06-01  8:07               ` Benjamin Tissoires
2016-05-27 22:10   ` [PATCH v2 0/3] ACPI / button: Clarify initial lid state Valdis.Kletnieks
2016-06-01 10:10 ` [PATCH v3 1/3] ACPI / button: Remove initial lid state notification Lv Zheng
2016-06-23  0:36   ` Rafael J. Wysocki
2016-06-23  0:57     ` Zheng, Lv
2016-06-01 10:10 ` [PATCH v3 2/3] ACPI / button: Refactor functions to eliminate redundant code Lv Zheng
2016-06-01 10:10 ` [PATCH v3 3/3] ACPI / button: Add quirks for initial lid state notification Lv Zheng
2016-06-01 11:01   ` Bastien Nocera
2016-06-02  1:08     ` Zheng, Lv
2016-06-02 14:01       ` Bastien Nocera
2016-06-02 15:25         ` Benjamin Tissoires
2016-06-03  0:41           ` Zheng, Lv
2016-07-19  8:11 ` [PATCH v4 1/2] ACPI / button: Add KEY_LID_OPEN/KEY_LID_CLOSE for new usage model Lv Zheng
2016-07-19  8:46   ` Benjamin Tissoires
2016-07-21 13:35   ` Rafael J. Wysocki
2016-07-21 20:33     ` Dmitry Torokhov
2016-07-19  8:11 ` [PATCH v4 2/2] ACPI / button: Add document for ACPI control method lid device restrictions Lv Zheng
2016-07-19  8:44   ` Benjamin Tissoires
2016-07-21 20:32   ` Dmitry Torokhov
2016-07-22  0:24     ` Zheng, Lv
2016-07-22  4:37       ` Dmitry Torokhov
2016-07-22  6:55         ` Benjamin Tissoires
2016-07-22  8:47           ` Zheng, Lv
2016-07-22  9:08             ` Benjamin Tissoires
2016-07-22  9:38               ` Zheng, Lv
2016-07-24 11:28               ` Bastien Nocera [this message]
2016-07-25  0:38                 ` Zheng, Lv
2016-07-22 17:02           ` Dmitry Torokhov
2016-07-23 12:17             ` Zheng, Lv
2016-07-22  8:37         ` Zheng, Lv
2016-07-22 17:22           ` Dmitry Torokhov
2016-07-23 11:57             ` Zheng, Lv
2016-07-22  6:24 ` [PATCH v5 1/3] ACPI / button: Add missing event to keep SW_LID running without additional event loss Lv Zheng
2016-07-22 10:26   ` Zheng, Lv
2016-07-23 12:37   ` Rafael J. Wysocki
2016-07-25  0:24     ` Zheng, Lv
2016-07-22  6:24 ` [PATCH v5 2/3] ACPI / button: Add KEY_LID_OPEN/KEY_LID_CLOSE for new usage model Lv Zheng
2016-07-22  6:24 ` [PATCH v5 3/3] ACPI / button: Add document for ACPI control method lid device restrictions Lv Zheng
2016-07-25  1:14 ` [PATCH v6] ACPI / button: Fix an issue that the platform triggered "close" event may not be delivered to the userspace Lv Zheng
2016-07-26  9:52 ` [PATCH v7 1/2] ACPI / button: Fix an issue that the platform triggered reliable events " Lv Zheng
2016-08-17  0:19   ` Rafael J. Wysocki
2016-08-17  4:45     ` Zheng, Lv
2016-07-26  9:52 ` [PATCH v7 2/2] ACPI / button: Add document for ACPI control method lid device restrictions Lv Zheng
2016-08-17  8:22 ` [PATCH v8 1/2] ACPI / button: Fix an issue in button.lid_init_state=ignore mode Lv Zheng
2016-09-12 22:10   ` Rafael J. Wysocki
2016-08-17  8:23 ` [PATCH v8 2/2] ACPI / button: Add document for ACPI control method lid device restrictions Lv Zheng

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=1469359736.6761.110.camel@hadess.net \
    --to=hadess@hadess.net \
    --cc=benjamin.tissoires@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lv.zheng@intel.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    --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;
as well as URLs for NNTP newsgroup(s).