[haiku-development] Re: acpi_thinkpad: request for assistance

  • From: Clemens zeidler <clemens.zeidler@xxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 23 Nov 2009 18:43:56 +0100

Hi,

The device manager is not the ACPI bus manager. It's being told
about devices when the ACPI bus manager iterates over the ACPI
tables. Then the device manager takes care of "telling" the drivers
to see if they can handle the device. The ACPI bus manager is just
the parent of ACPI device (which it published/presented before).
It can be acquired via the device manager. (I hope this was
technically correct.)

Yes over the device manager you get a acpi_device_module_info (don't mix it with acpi_module_info which is more general, get it over the module name B_ACPI_MODULE_NAME) and a acpi_device cookie which contains the acpi handle:
http://haiku.it.su.se:8180/source/xref/src/add-ons/kernel/bus_managers/acpi/acpi_priv.h#acpi_device_cookie

Perhaps Clemens can shed some light into the discussion if it is
possible at all to use the acpi_embedded_controller from within
another driver or if it actually needs to be a kernel module.

No at the moment you can't use the ec driver, the driver just register some handler function in acpi. Maybe as Fredrik suggested one could put the ec into the acpi bus manager. Also on could think about ec busmanager. At the moment I don't know what the best solution is. I just take a short look at the bsd ibm acpi driver. Some infos are just evaluate a ec acpi_handle. The others just read a ec register, right? (why they write the register after reading it?)

You can try to read the registers directly (but maybe this interfere with the ec driver). See the ec driver how I got the ec address and read / write the registers there. You can also try to find out how acpi use the ec driver and if there is a interface to read the register.

Hope this helps a bit,
        Clemens


Other related posts: