mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Dmitry Torokhov <dtor@google.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	Patrik Fimml <patrikf@chromium.org>,
	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 23:59:18 +0200	[thread overview]
Message-ID: <1539989.Y0kuKjTTVX@vostro.rjw.lan> (raw)
In-Reply-To: <1660498.3ZcWSfNcWh@dtor-glaptop>

On Friday, July 18, 2014 02:26:21 PM Dmitry Torokhov wrote:
> On Friday, July 18, 2014 04:09:46 PM Alan Stern wrote:
> > On Fri, 18 Jul 2014, Patrik Fimml wrote:
> > > On Fri, Jul 18, 2014 at 03:00:46PM -0400, Alan Stern wrote:

[cut]

> > > 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.
> > 
> > There's some question about how much of userspace needs to get
> > involved.  Just the daemon that manages these configuration changes, or
> > other programs as well?  I guess that's not really our problem...
> 
> We need to provide means of implementing policy; the policy itself is not 
> really our concern ;)
> 
> > 
> > In the end, it sounds like you're suggesting a new pair of PM
> > callbacks: ->deactivate() and ->reactivate(), or ->inhibit() and
> > ->uninhibit().  Plus an optional (?) sysfs interface for invoking the
> > callbacks.
> 
> We do need sysfs interface so that userspace can talk to the devices in 
> question; and we also need to make sure that PM core is aware of the new 
> callbacks and provides guarantees about their interactions with system- and 
> runtime-PM callbacks so that individual drivers do not have to sort it out on 
> their own.

A step back, please.

I have no idea why those need to be PM callbacks.

What you need really seems to be a way to tell a driver "ignore input from this
device from now on as it is most likely bogus".  A natural reaction of the
driver to that might be to stop processing input from the device and then
runtime suspend it (and prevent it from generating remote wakeup as that may
be bogus as well), but I don't see why the PM core needs to be involved in
that at all.

Rafael


  reply	other threads:[~2014-07-18 21:41 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16  1:32 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
2014-07-18 20:09                       ` Alan Stern
2014-07-18 21:26                         ` Dmitry Torokhov
2014-07-18 21:59                           ` Rafael J. Wysocki [this message]
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=1539989.Y0kuKjTTVX@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --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=patrikf@chromium.org \
    --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

all inboxes | Powered by JetHome®