public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Adam Belay <ambx1@neo.rr.com>
To: Greg KH <greg@kroah.com>
Cc: David Brownell <david-b@pacbell.net>,
	Linux-pm mailing list <linux-pm@lists.osdl.org>
Subject: Re: [patch 2.6.12-rc4] remove driver model detach_state
Date: Thu, 12 May 2005 18:06:33 -0400	[thread overview]
Message-ID: <20050512220632.GA4293@neo.rr.com> (raw)
In-Reply-To: <20050512203704.GA25241@kroah.com>

[-- Attachment #1: Type: text/plain, Size: 2053 bytes --]

On Thu, May 12, 2005 at 01:37:05PM -0700, Greg KH wrote:
> On Thu, May 12, 2005 at 03:31:22PM -0400, Alan Stern wrote:
> > On Thu, 12 May 2005, David Brownell wrote:
> > 
> > > This mechanism has never AFAICT been used, and I asked a while back
> > > if anyone knew of uses ... no takers, even though it's been in the
> > > kernel for almost two years by now.
> > > 
> > > Here's a patch to remove the thing.  AFAICT, suitable to merge ASAP;
> > > it reduces sysfs size impact, and is a net code shrink.
> > 
> > Note that for Greg's "driver" tree, some of the changes you made to bus.c 
> > will have to apply to dd.c instead.  Maybe Greg will fix this up by 
> > himself; I still don't know how he manages to juggle multiple conflicting 
> > source trees...
> 
> Don't worry, I can handle it :)
> 
> > On the whole this looks like a good thing to do.
> 
> I agree.  Will apply it later this evening.
> 
> greg k-h

Although I agree with this patch, I think it's important that we don't
forget about the code's original intentions.  When manual driver binding
and unbinding is supported, it would be nice if we could specify a detach
state.  My guess is that this should only include "on" or "off", but not
any intermediate states.

->remove isn't good enough, as the driver developer makes the decision
"let's turn off the device before detaching" or "let's leave it on".
This will vary between implementations. I think it may be better to
allow the user to specify this.

Finally, if the device is disabled, the configuration (e.g. PCI config
space) may need to be restored for the device to work on a future
driver.  This seems like a tricky problem if the driver is removed.

Selective suspend may be a better alternative, in which case, we need to
decide if it will unregister class devices etc. (as I suggested earlier)
or just do a somewhat regular device_suspend().

Driver binding/unbinding and requests to disable a device play an
interesting role in power management.  It would be nice if we could
define some goals for this.

Thanks,
Adam


[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2005-05-12 22:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-12 19:06 [patch 2.6.12-rc4] remove driver model detach_state David Brownell
2005-05-12 19:31 ` Alan Stern
2005-05-12 20:37   ` Greg KH
2005-05-12 22:06     ` Adam Belay [this message]
2005-05-13  7:31       ` David Brownell
2005-05-13 18:37 ` patch driver-remove-detach_state.patch added to gregkh-2.6 tree gregkh

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=20050512220632.GA4293@neo.rr.com \
    --to=ambx1@neo.rr.com \
    --cc=david-b@pacbell.net \
    --cc=greg@kroah.com \
    --cc=linux-pm@lists.osdl.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