tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: power management and pseudo-devices



On Sun, 18 Jul 2010, Quentin Garnier wrote:

On Sun, Jul 18, 2010 at 07:14:57AM -0700, Paul Goyette wrote:
Currently, pseudo-devices are silently attached to the device tree
without giving the driver any access to the associated device_t
structure.  As a result, the pseudo-device driver is unable to
access much of the pmf framework.  In particular, the pseudo-device
cannot register a suspend/resume/shutdown handler, nor can it
register to receive pmf event notifications.

It seems to me that it would be reasonably useful for pseudo-devices
to be capabile of participating in pmf.  One particular example I've
run into recently is the swwdog pseudo-device.  Other watchdog
drivers can prevent a suspend if their timer is armed, but since
swwdog is only a pseudo-device it cannot register a pmf handler.

Convert it to a defpseudodev then.


I've done this, and it works.  Diffs are attached.



-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index