tech-net archive

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

Re: wpi0: radio is disabled by hardware switch



On Wed, Dec 03, 2014 at 10:46:25AM +0100, Martin Husemann wrote:
> On Tue, Dec 02, 2014 at 10:19:56PM +0100, Manuel Bouyer wrote:
> > Now I'm confused; does powerd gets notifications from pmf_inject_event() ?
> > I though it gets only envsys(4) events.
> 
> I thought pmf would (or could) forward them to envsys, but it is the
> other way around: sysmon forwards some events to pmf:
> 
> sysmon_power.c: pmf_event_inject(NULL, PMFE_CHASSIS_LID_CLOSE);
> 
> We could do the same for the new event you are considering and replace
> the current pmf_event_inject() calls with the new equivalent (I guess there
> are only two or so of them).
> 
> But somehow this all sounds messy and could use a clearer design; something
> like all in-kernel events are converted to pmf_event_inject() and sysmon
> listens for them and forwards the relevant ones to powerd.

As I understand it, pmf_event_inject() is for communications between
kernel components; and the way athn uses PMFE_RADIO_OFF is for communication
between the driver core and a frontend (the event is not broadcasted to all
listeners). For the wpi this would be different because the button status
in read in the driver core itself.

I'm not sure it would be a good idea to mix the two.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index