lkml.org 
[lkml]   [2004]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Hotplug for device power state changes

> A patch to call a hotplug device-power agent when the power state of a
> device is modified at runtime (that is, individually via sysfs or by a
> driver call, not as part of a system suspend/resume). Allows a power
> management application to be informed of changes in device power needs.
> This can be useful on platforms with dependencies between system
> clock/voltage settings and operation of certain devices (such as
> PXA27x), or, for example, on a cell phone where voiceband or network
> devices going inactive signals an opportunity to lower platform power
> levels to conserve battery life.

Why? If the device is powered down at runtime via sysfs, then the app that
did that already exists in userspace, like the ones you're trying to
notify via /sbin/hotplug. It would be much simpler for the first app to
generate e.g. a d-bus message to notify other apps, rather than creating
this conduit through the kernel.

Besides, if one process has a device open, then the driver should refuse
any requests to power it down.

And, for the case where a communication device loses signal, you should
treat it similarly to a network device, which notifies userspace of a lost
link, which then has the option of powering down the device and notifying
other processes.


Pat
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.071 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site