mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
To: "Henrique de Moraes Holschuh" <hmh@hmh.eng.br>
Cc: "Matthew Garrett" <mjg59@srcf.ucam.org>,
	"Linus Torvalds" <torvalds@linux-foundation.org>,
	"Jeremy Katz" <katzj@redhat.com>,
	linux-kernel@vger.kernel.org, davej@redhat.com
Subject: Re: [PATCH] Map volume and brightness events on thinkpads
Date: Wed, 17 Oct 2007 14:59:52 -0400	[thread overview]
Message-ID: <d120d5000710171159p617115d9w862aadf266c2470c@mail.gmail.com> (raw)
In-Reply-To: <20071017173532.GB2974@khazad-dum.debian.net>

On 10/17/07, Henrique de Moraes Holschuh <hmh@hmh.eng.br> wrote:
> On Wed, 17 Oct 2007, Matthew Garrett wrote:
> > On Wed, Oct 17, 2007 at 11:57:18AM -0400, Dmitry Torokhov wrote:
> > > say that they only care about notifications arising from keypresses
> > > then I will add EV_NOTIFY type of events to input layer. What events
> > > would we need? I can imagine:
> >
> > Why use EV_NOTIFY? They're still keys. I'd also quibble with the need
>
> Why not?  Why the heck do we have to keep the worst of the current mess,
> when many drivers CAN (and sometimes have to) tell appart the two classes of
> events?  Make notifications a separate thing from regular events, please.
>
> The use of the same path for notifications and events are already a big
> enough concession to the HAL model.  AFAIK, HAL is the only reason why on
> most systems the userspace consumer of events and notification events are
> the same.  HAL gets them all (as well as ACPI events, and whatever else its
> helpers poll the system for), and then distributes them over to various
> other paths.

I have a nagging feeling that we rely on HAL and windows environments
too much nowadays. Last night I tried to susped my laptop while at KDM
prompt but apparently some service is only running in context of user
session and so nothing was there to recognize that suspend button was
pressed (Fedora 8).

>
> On a HAL-less system, it is far less clear that anything that needs the real
> events would bother with the notifications.  The only class of applications
> that have an use for the notifications are OSD applets and the like.
>
> > for adding _NOTIFY varients of already existing keys - the existing
> > consumers can all cope already.
>
> If one adds EV_NOTIFY, one can just allow for the same KEY constants that
> are valid for EV_KEY, and be done with that, I suppose.  But my take is that
> Dmitry wants to limit the number of notifications going over input.
>

That was not my primary goal. We have bitmaps of supported events in
input_dev structure. If we were to reuse KEY_* constants for EV_NOTIFY
then I have to make this bitmap the same size as input_dev->keybit,
which is 512 bit at the moment (and I am thinking that we do need to
extend it to 1024). I expect that we need much less KEY_*_NOTIFY
events so that we could easily fit them into 32 bits.

> I'd rather we added an EV_NOTIFY *bit* that gets or-ed to the real EV_*
> type, so that one can turn any event into a notification.  This is certainly
> to be useful at least for EV_KEY and EV_SWITCH.
>

The problem with this scenario is that userspace can never be sure if
input device is capable of only KEY_BLAH, only KEY_BLAH_NOTIFY or
both. Normally we let userspace query device for all supported events.

-- 
Dmitry

  reply	other threads:[~2007-10-17 19:00 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-15 20:45 Jeremy Katz
2007-10-15 21:07 ` Henrique de Moraes Holschuh
2007-10-15 21:27   ` Jeremy Katz
2007-10-16  9:12     ` Henrique de Moraes Holschuh
2007-10-15 21:43   ` Arjan van de Ven
2007-10-16  3:38   ` Jesse Barnes
2007-10-16  8:36     ` Henrique de Moraes Holschuh
2007-10-16  8:49       ` Jesse Barnes
2007-10-16  9:18         ` Henrique de Moraes Holschuh
2007-10-17  2:40           ` Jesse Barnes
2007-10-17  6:25             ` Henrique de Moraes Holschuh
2007-10-17  6:32               ` Jesse Barnes
2007-10-17  6:39                 ` Henrique de Moraes Holschuh
2007-10-16 13:00   ` Matthew Garrett
2007-10-16 14:11     ` Henrique de Moraes Holschuh
2007-10-16 14:21       ` Matthew Garrett
2007-10-16 14:31         ` Henrique de Moraes Holschuh
2007-10-16 14:40           ` Matthew Garrett
2007-10-16 16:56             ` Henrique de Moraes Holschuh
2007-10-16 18:46               ` Matthew Garrett
2007-10-16 19:14                 ` Linus Torvalds
2007-10-16 19:20                   ` Matthew Garrett
2007-10-16 20:02                     ` Henrique de Moraes Holschuh
2007-10-16 20:15                       ` Dmitry Torokhov
2007-10-16 20:12                   ` Dmitry Torokhov
2007-10-16 20:11                     ` Jeremy Katz
2007-10-16 20:19                       ` Dmitry Torokhov
2007-10-16 20:32                     ` Linus Torvalds
2007-10-17 15:57                       ` Dmitry Torokhov
2007-10-17 16:28                         ` Matthew Garrett
2007-10-17 17:35                           ` Henrique de Moraes Holschuh
2007-10-17 18:59                             ` Dmitry Torokhov [this message]
2007-10-17 20:42                               ` Henrique de Moraes Holschuh
2007-10-18 14:37                                 ` Dmitry Torokhov
2007-10-18 22:39                                   ` Henrique de Moraes Holschuh
2007-10-23 15:54                                     ` Dmitry Torokhov
2007-10-23 23:34                                       ` Henrique de Moraes Holschuh
2007-10-16 20:48                     ` Kok, Auke
2007-10-16 20:55                       ` Matthew Garrett
2007-10-16 21:18                         ` Dmitry Torokhov
2007-10-16 20:32                   ` Dave Airlie
2007-10-16 14:27       ` Dmitry Torokhov
2007-10-16 14:54         ` Matthew Garrett
2007-10-16 15:54           ` Dmitry Torokhov
2007-10-16 15:59             ` Matthew Garrett
2007-10-16 18:53 ` Matthew Garrett
2007-10-16 19:23   ` Renato S. Yamane

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=d120d5000710171159p617115d9w862aadf266c2470c@mail.gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=davej@redhat.com \
    --cc=hmh@hmh.eng.br \
    --cc=katzj@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=torvalds@linux-foundation.org \
    /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®