Subject: Re: APM *and* ACPI or is it APM *or* ACPI?
To: Jaromir Dolecek <jdolecek@netbsd.org>
From: Jared D.McNeill <jmcneill@invisible.ca>
List: port-i386
Date: 02/11/2003 10:10:25
On Tuesday, February 11, 2003, at 09:59 AM, Jaromir Dolecek wrote:
> Jared D. McNeill wrote:
>> How are you associating the acpifan driver with acpitz?
>
> Not at all at this moment. I'm not sure how properly
> export the fan list from ACPI thermal zone. I didn't think
> about this too hard yet, to be honest.
Each ACPI thermal zone has a control method (can't remember the name
off-hand, sorry) to return a list of 'ACPI handles' to devices in that
zone.
My idea was to have the acpifan driver register a list of callbacks,
something like:
thermal_zone_register(sc->sc_acpihandle, &fan_tz_if, sc);
And when the device is detached:
thermal_zone_unregister(sc->sc_acpihandle);
That way different instances of acpitz (ie different "zones") can
lookup in a list that thermal_zone_register creates the devices that
are present in its zone, and execute callbacks for them. This makes it
a bit more flexible than having acpitz call the fan _ON/_OFF CMs
explicitly (it also allows us to hook in other devices, such as an
'ACPI processor').
Cheers,
Jared