linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrik Fimml <patrikf@chromium.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Patrik Fimml <patrikf@chromium.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Dmitry Torokhov <dtor@google.com>,
	Bastien Nocera <hadess@hadess.net>,
	linux-pm@vger.kernel.org, Benson Leung <bleung@google.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Power-managing devices that are not of interest at some point in time
Date: Fri, 18 Jul 2014 12:23:34 -0700	[thread overview]
Message-ID: <20140718192334.GA10631@google.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1407181439560.979-100000@iolanthe.rowland.org>

On Fri, Jul 18, 2014 at 03:00:46PM -0400, Alan Stern wrote:
> "Quiescing" is the wrong word.  "Quiescing a device" means stopping the
> device from doing anything, which isn't what you want.  You want to
> ignore any activity the device may generate and reduce the device's
> power consumption as much as possible.  A better word would be
> "deactivating".

Yeah, I agree that terminology is a bit tricky here, and we have some
words conveying a specific idea already ("suspend"). To me, deactivating
suggests a more permanent condition. FWIW, I've used "inhibit" in this
context before and think it captures the idea well, to add another
choice to the list.

> You mentioned that handles to the device would remain open.  So when 
> the user opens the lid again, the old handles would start functioning, 
> right?

That's the idea, yes, and I think this would be desirable for the input
device class at least.

> This has the disadvantage that the class device could not be
> unregistered, because doing so would invalidate the open handles.  
> Under such circumestances, how would a userspace video program know not
> to list a camera built into the lid among the possible video sources
> (an example given earlier in this discussion)?  The program would have
> to make an explicit test of the "deactivate" property -- it wouldn't
> automatically become aware that the camera wasn't available.
> 
> Would it sometimes be okay to unregister the class device and
> invalidate the old handles, forcing programs to open new handles when
> the lid is opened?  This would reduce the number of changes user 
> programs would need.

I guess we could potentially leave this for the device class to decide.

I'm not sure what the appropriate action for a video camera is anyway.
Should it go away completely, including its device? Should it be there,
but certainly not be the default choice when there is an external
camera? I'm thinking along the lines of some application's settings
dialog here, where it might be desirable to still be able to select the
internal camera for future recordings.

Of course, userspace could still decide simply not to
quiesce|deactivate|inhibit the device if that was desired.

Regards,
Patrik

  reply	other threads:[~2014-07-18 19:23 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16  1:32 Power-managing devices that are not of interest at some point in time Patrik Fimml
2014-07-16 10:00 ` Bastien Nocera
2014-07-16 14:17 ` Alan Stern
2014-07-16 16:14   ` Dmitry Torokhov
2014-07-16 18:08     ` Alan Stern
2014-07-16 18:55       ` Kevin Cernekee
2014-07-16 21:36       ` Oliver Neukum
2014-07-16 17:12   ` Benson Leung
2014-07-16 23:11 ` Rafael J. Wysocki
2014-07-16 23:13   ` Bastien Nocera
2014-07-16 23:33     ` Rafael J. Wysocki
2014-07-16 23:23       ` Bastien Nocera
2014-07-16 23:31         ` Dmitry Torokhov
2014-07-17 14:39           ` Alan Stern
2014-07-17 16:59             ` Dmitry Torokhov
2014-07-18  0:43               ` Rafael J. Wysocki
2014-07-18  0:43                 ` Dmitry Torokhov
2014-07-18  1:30                   ` Rafael J. Wysocki
2014-07-18  1:35                     ` Rafael J. Wysocki
2014-07-18 15:19                     ` Alan Stern
2014-07-18 17:47                 ` Patrik Fimml
2014-07-18 19:00                   ` Alan Stern
2014-07-18 19:23                     ` Patrik Fimml [this message]
2014-07-18 20:09                       ` Alan Stern
2014-07-18 21:26                         ` Dmitry Torokhov
2014-07-18 21:59                           ` Rafael J. Wysocki
2014-07-18 21:45                             ` Dmitry Torokhov
2014-07-18 22:19                               ` Rafael J. Wysocki
2014-07-18 22:55                                 ` Rafael J. Wysocki
2014-07-18 23:16                                   ` Dmitry Torokhov
2014-07-18 23:47                                     ` Rafael J. Wysocki
2014-07-19 14:51                                     ` Alan Stern
2014-07-19 15:23                                       ` Benson Leung
2014-07-19 17:59                                         ` Alan Stern
2014-07-19 18:21                                           ` Dmitry Torokhov
2014-07-19 20:19                                             ` Rafael J. Wysocki
2014-07-21 23:23                                     ` hadess
2014-07-28 19:58                                       ` Patrik Fimml
2014-07-28 20:01                                     ` Patrik Fimml
2014-07-17  6:01       ` Oliver Neukum
2014-07-16 23:17   ` Patrik Fimml

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=20140718192334.GA10631@google.com \
    --to=patrikf@chromium.org \
    --cc=bleung@google.com \
    --cc=dtor@google.com \
    --cc=hadess@hadess.net \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=stern@rowland.harvard.edu \
    /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).