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

  • From: Michael Weirauch <dev@xxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 23 Nov 2009 22:08:27 +0100

2009/11/23 Clemens zeidler <clemens.zeidler@xxxxxxxxxxxxxx>:
>> 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?)

If vendors embedd parts of their device access via the embedded controller, then
it should be universally available. Agreed. Having it integrated would tie it
stronger then a separate kernel module, no? When the apci module sets up the
adress space handlers - at least on my system - it seems to not like that the
ec space handler is not yet set up, but at a later stage when the
driver is loaded.
The FreeBSD impl calls acpi_ec_ecdt_probe() before AcpiInitializeObjects() of
which the former has an interessting comment:
/*
 * Look for an ECDT and if we find one, set up default GPE and
 * space handlers to catch attempts to access EC space before
 * we have a real driver instance in place.
...

> 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.

Thanks for the info. I will try to give it a go and get back about any results.

Michael

Other related posts: