1*49cdfc7eSAndroid Build Coastguard Worker- ACPI testcase - 2*49cdfc7eSAndroid Build Coastguard Worker ACPI must be enabled in the kernel. Since ACPI will control devices and possibly put them to sleep, 3*49cdfc7eSAndroid Build Coastguard Worker it's not recommended that any other tests be run concurrently with these tests since you may 4*49cdfc7eSAndroid Build Coastguard Worker get unexpected results. 5*49cdfc7eSAndroid Build Coastguard Worker These tests are currently ONLY supported on the 2.5 kernels. 2.4 kernels probably won't even build much 6*49cdfc7eSAndroid Build Coastguard Worker less run. 7*49cdfc7eSAndroid Build Coastguard Worker run ltpacpi.sh -r run to execute the tests 8*49cdfc7eSAndroid Build Coastguard Worker 9*49cdfc7eSAndroid Build Coastguard Worker3.a. A function "acpi_get_object_info" has been added to the LtpAcpiCmds.c file of LTP project. 10*49cdfc7eSAndroid Build Coastguard Worker (\ltp\testcases\kernel\device-drivers\acpi\LtpAcpiCmds.c) 11*49cdfc7eSAndroid Build Coastguard Worker This function returns information about an object as seen from the namespace node. 12*49cdfc7eSAndroid Build Coastguard Worker 13*49cdfc7eSAndroid Build Coastguard Worker3.b. A function "acpi_install_fixed_event_handler" has been added to the LtpAcpiCmds.c file of LTP project. 14*49cdfc7eSAndroid Build Coastguard Worker This function saves the pointer to the handler function and then enables the event. 15*49cdfc7eSAndroid Build Coastguard Worker 16*49cdfc7eSAndroid Build Coastguard Worker3.c. A function "acpi_remove_fixed_event_handler" has been added to the LtpAcpiCmds.c file. 17*49cdfc7eSAndroid Build Coastguard Worker Disables the event and unregisters the event handler. 18*49cdfc7eSAndroid Build Coastguard Worker 19*49cdfc7eSAndroid Build Coastguard Worker3.d. A function "acpi_acquire_global_lock" has been added to LtpAcpiCmds.c file. 20*49cdfc7eSAndroid Build Coastguard Worker Acquire the ACPI Global Lock 21*49cdfc7eSAndroid Build Coastguard Worker 22*49cdfc7eSAndroid Build Coastguard Worker3.e. A function "acpi_release_global_lock" has been added to LtpAcpiCmds.c file. 23*49cdfc7eSAndroid Build Coastguard Worker Release the ACPI Global Lock 24*49cdfc7eSAndroid Build Coastguard Worker 25*49cdfc7eSAndroid Build Coastguard Worker3.f. A function "acpi_bus_find_driver" has been added to LtpAcpiCmds.c file. 26*49cdfc7eSAndroid Build Coastguard Worker Parses the list of registered drivers looking for a driver applicable for the specified device. 27*49cdfc7eSAndroid Build Coastguard Worker 28*49cdfc7eSAndroid Build Coastguard Worker3.g. A function "acpi_bus_get_power" has been added to LtpAcpiCmds.c file. 29*49cdfc7eSAndroid Build Coastguard Worker Get the device's power state either directly (via _PSC) or indirectly (via power resources). 30*49cdfc7eSAndroid Build Coastguard Worker 31*49cdfc7eSAndroid Build Coastguard Worker3.h. A function "acpi_evaluate_integer" has been added to LtpAcpiCmds.c file. 32*49cdfc7eSAndroid Build Coastguard Worker Looks for _GPE object (an integer). If _GPE evaluates to an integer, 33*49cdfc7eSAndroid Build Coastguard Workerthe value is the bit assignment of the SCI interrupt within the GPEx_STS register of a GPE 34*49cdfc7eSAndroid Build Coastguard Workerblock described in the FADT that the embedded controller will trigger. 35*49cdfc7eSAndroid Build Coastguard Worker 36*49cdfc7eSAndroid Build Coastguard Worker4. Including ACPI support into the kernel 37*49cdfc7eSAndroid Build Coastguard Worker 38*49cdfc7eSAndroid Build Coastguard Worker By default, the kernel may not enable ACPI feature. A kernel configuration option must be selected 39*49cdfc7eSAndroid Build Coastguard Worker to enable ACPI support. 40*49cdfc7eSAndroid Build Coastguard Worker 41*49cdfc7eSAndroid Build Coastguard Worker5. FAQ 42*49cdfc7eSAndroid Build Coastguard Worker 43*49cdfc7eSAndroid Build Coastguard WorkerQ.5.1. Are there any limitations on using this patch? 44*49cdfc7eSAndroid Build Coastguard Worker 45*49cdfc7eSAndroid Build Coastguard WorkerA.5.1. If the device supports ACPI feature and the ACPI feature is enabled in the kernel, 46*49cdfc7eSAndroid Build Coastguard Workerthen only a user will be able to use these scripts. 47*49cdfc7eSAndroid Build Coastguard Worker 48