tech-kern archive

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

Re: pmf(9) vs sysmon for power events (especially sleep when powerd(8) is not running)



On Sat, May 07, 2011 at 09:03:42PM +0200, Jean-Yves Migeon wrote:
> - sysmon_pswitch(9) can still be used to register power switch events,
> these events being modeled following a "switch" functionality e.g. when
> a threshold is passed.

Yes. Although I don't know what you mean by thresholds.

> - pmf(9) is focused on device states, so it's lower level than
> sysmon_pswitch(9) events. pmf(9) event injection is not supposed to be
> called directly, but rather through sysmon (for switch-like
> functionality), or within pmf(9) itself for inter-device signaling.

No. Device drivers are calling pmf(9) event injections directly. I think
Jared or Jörg should clarify this, but I think the pmf(9) calls you cited
earlier were added to the sysmon routines for compatibility-like reasons.
To be effective, there needs to be also a listener for the injected events.

> So, in the current form, power switches/buttons are not supposed to
> register as devices and implement their own hooks for registration with
> pmf(9)?

I am not sure what you mean by this. For instance, a platform/laptop-specific
driver registers naturally with pmf(9), but it may also use the sysmon
routines for various tasks (e.g. also some hotkeys are handled by the sysmon
routines). There is no grand scheme of things. It is just duplicity.

- Jukka.


Home | Main Index | Thread Index | Old Index