public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [linux-pm] [PATCH]switching off autosuspend through sysfs
@ 2007-01-25 15:32 Scott E. Preece
  0 siblings, 0 replies; 9+ messages in thread
From: Scott E. Preece @ 2007-01-25 15:32 UTC (permalink / raw)
  To: greg; +Cc: oneukum, gregkh, linux-pm, linux-usb-devel


| From: Greg KH<greg@kroah.com>
| 
| ...
| > > 
| > > Would it help to add a flag somewhere in struct device (or struct
| > > dev_pm_info) for indicating that the device is not cognizant of PM?  For
| > > instance, all those USB endpoint pseudo-devices we create -- it's a waste
| > > of time to try doing power management on them and it generates a bunch of
| > > useless and distracting warning messages in the system log.
| > 
| > Yes.  In fact we should just make it a "has pm" type flag, as the
| > majority of devices do not.
| > 
| > So, what kind of devices do support these files?  I can think of:
| > 	PCI
| > 	USB
| > and that's it right now.  Do platform devices really use those files?
| 
| Something as simple as this patch perhaps?
| 
| thanks,
| 
| greg k-h
| 
| ---
|  drivers/base/power/sysfs.c |    7 +++++--
|  drivers/pci/probe.c        |    1 +
|  include/linux/device.h     |    1 +
|  3 files changed, 7 insertions(+), 2 deletions(-)
| 
| --- gregkh-2.6.orig/drivers/base/power/sysfs.c
| +++ gregkh-2.6/drivers/base/power/sysfs.c
| @@ -156,10 +156,13 @@ static struct attribute_group pm_attr_gr
|  
|  int dpm_sysfs_add(struct device * dev)
|  {
| -	return sysfs_create_group(&dev->kobj, &pm_attr_group);
| +	if (dev->supports_power)
| +		return sysfs_create_group(&dev->kobj, &pm_attr_group);
| +	return 0;
|  }
|  ...
---

Hmm - could you make it "dev->pm_aware" or "dev->supports_pm" rather
than "supports_power"?

thanks,
scott
-- 
scott preece
motorola mobile devices, il67, 1800 s. oak st., champaign, il  61820  
e-mail:	preece@motorola.com	fax:	+1-217-384-8550
phone:	+1-217-384-8589	cell: +1-217-433-6114	pager: 2174336114@vtext.com



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-01-26 14:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20070124003221.GA3755@suse.de>
2007-01-24 16:51 ` [linux-usb-devel] [PATCH]switching off autosuspend through sysfs Alan Stern
2007-01-25  1:15   ` Greg KH
2007-01-25  1:28     ` [linux-pm] " Greg KH
2007-01-25 16:03       ` Alan Stern
2007-01-25  2:15     ` David Brownell
2007-01-25 11:13       ` [linux-pm] " David Brownell
2007-01-25 16:09       ` [linux-usb-devel] " Alan Stern
2007-01-26 14:27   ` Oliver Neukum
2007-01-25 15:32 [linux-pm] " Scott E. Preece

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox