0

I have a touchscreen controller (which is an I2C slave) that I need to enable via APCI. This should be done by calling the _PS0 ACPI method. I call this method by using AcpiEvaluateObject with no arguments and no return values.

AcpiEvaluateObject(nullptr, (ACPI_STRING)"\\_SB.I2C4._PS0", nullptr, nullptr); // returns AE_OK
AcpiEvaluateObject(nullptr, (ACPI_STRING)"\\_SB.I2C4.TCS2._PS0", nullptr, nullptr); // returns AE_AML_UNINITIALIZED_ARG

When calling this method on the parent object (I2C4), everything goes fine but calling it on the touch screen controller (TCS2), it fails. What also makes me wonder is that it returns AE_AML_UNINITIALIZED_ARG even though it doesn't take any args (according to the DSDT).

Calling the _CRS method on the same object also works without any problems. I also looked into the Linux kernel source how they change ACPI power states and they use the exact same mechanism. It boils down to the use of acpi_evaluate_object in acpi_dev_pm_explicit_set which also seems to work on the touchscreen device.

I'm not using Linux, but Genode and the Acpica library.

what am I missing to successfully enable the touchscreen device via ACPI? Is there something the Linux kernel is initializing implicitly (I couldn't find something like this)?

jklmnn
  • 481
  • 1
  • 5
  • 11
  • `_PSx` methods are about power state, and not about *enabling* or *disabling* the hardware. – 0andriy Jul 08 '17 at 16:24
  • If you look into the Linux source, you'll see that it also sets the power state by evaluating the ACPI object. So evaluating this object seems to work under Linux (at least it returns 0 and the device is working after). http://elixir.free-electrons.com/linux/latest/source/drivers/acpi/device_pm.c#L129 Edit: I wonder why evaluating the exact same object returns an error under Genode. – jklmnn Jul 12 '17 at 12:20

0 Answers0