linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bastien Nocera <hadess@hadess.net>
To: Benjamin Tissoires <benjamin.tissoires@gmail.com>,
	Lv Zheng <lv.zheng@intel.com>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <len.brown@intel.com>, Lv Zheng <zetalog@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-input <linux-input@vger.kernel.org>
Subject: Re: [PATCH v3 1/2] ACPI / button: Add KEY_LID_CLOSE for new usage model
Date: Mon, 18 Jul 2016 17:51:33 +0200	[thread overview]
Message-ID: <1468857093.6761.23.camel@hadess.net> (raw)
In-Reply-To: <CAN+gG=EcUjnDZqRZC8QfMnxyOX-sNSzBhyfgLfeAmRABiiG8+w@mail.gmail.com>

On Mon, 2016-07-18 at 09:53 +0200, Benjamin Tissoires wrote:
> 
<snip>
> I don't think this is a good solution to have a kernel parameter. I
> thought the final decision were to have userspace decide which event
> was valid, and so we just need to export and emit both of events.
> 
> _If_ you export a kernel parameter, it makes sense to have a dmi
> blacklist to have a good default experience, which is what you wanted
> to avoid.
> So if you just export and use both events at the same time, you will
> have:
> - correct ACPI machines will just have an extra KEY_LID_CLOSE event
> emitted, which will not harm logind
> - wrong ACPI machines will not have their SW_LID input event updated
> because it will be kept closed. But given that logind will ignore it,
> there is no harm either
> 
> As Dmitry said, we could also have a KEY_LID_OPEN emitted for
> symmetrical purposes, but I am not entirely sure if this will confuse
> userspace or not. On the other hand, there are few users of these
> states, and we can teach them how to properly use them.
> 
> So in the end, I think you should just get rid of the kernel
> parameter, export SW_LID, KEY_LID_CLOSE, KEY_LID_OPEN in the event
> node, and only add the KEY_LID_CLOSE|OPEN events on an actual acpi
> notification.
> 
> Then a small hwdb entry set will teach logind/powerd if they need to
> ignore the SW_LID event or not.

So user-space would have its own blacklist (likely in udev through an
hwdb), instead of having it in the kernel? That seems like a fine idea
to me, and one of the first consumers, logind, would have all the
necessary data straight away.

  reply	other threads:[~2016-07-18 15:51 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1467717304.git.lv.zheng@intel.com>
2016-07-05 11:18 ` [PATCH 4/5] ACPI / button: Add SW_ACPI_LID for new usage model Lv Zheng
     [not found] ` <cover.1467875142.git.lv.zheng@intel.com>
2016-07-07  7:10   ` [PATCH v2 3/4] " Lv Zheng
2016-07-08  9:27     ` Benjamin Tissoires
2016-07-08 17:55       ` Dmitry Torokhov
2016-07-07  7:11   ` [PATCH v2 4/4] ACPI / button: Add document for ACPI control method lid device restrictions Lv Zheng
2016-07-08  9:17     ` Benjamin Tissoires
2016-07-08 17:51       ` Dmitry Torokhov
2016-07-11 11:34         ` Benjamin Tissoires
2016-07-12  0:41           ` Dmitry Torokhov
2016-07-12  7:43             ` Zheng, Lv
2016-07-20  3:21             ` Zheng, Lv
2016-07-12  7:13           ` Zheng, Lv
2016-07-19  7:17         ` Zheng, Lv
2016-07-19  8:40           ` Benjamin Tissoires
2016-07-19  8:57             ` Zheng, Lv
2016-07-19  9:07               ` Benjamin Tissoires
2016-07-11  3:20       ` Zheng, Lv
2016-07-11 10:58         ` Bastien Nocera
2016-07-12  7:06           ` Zheng, Lv
2016-07-11 11:42         ` Benjamin Tissoires
2016-07-11 11:47           ` Benjamin Tissoires
2016-07-12  7:34             ` Zheng, Lv
2016-07-12 10:17 ` [PATCH v3 1/2] ACPI / button: Add KEY_LID_CLOSE for new usage model Lv Zheng
2016-07-18  7:53   ` Benjamin Tissoires
2016-07-18 15:51     ` Bastien Nocera [this message]
2016-07-19  4:48     ` Zheng, Lv
2016-07-12 10:17 ` [PATCH v3 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=1468857093.6761.23.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=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).