Loading Documentation/thinkpad-acpi.txt +11 −14 Original line number Diff line number Diff line Loading @@ -138,7 +138,7 @@ Hot keys -------- procfs: /proc/acpi/ibm/hotkey sysfs device attribute: hotkey/* sysfs device attribute: hotkey_* Without this driver, only the Fn-F4 key (sleep button) generates an ACPI event. With the driver loaded, the hotkey feature enabled and the Loading Loading @@ -196,10 +196,7 @@ The following commands can be written to the /proc/acpi/ibm/hotkey file: sysfs notes: The hot keys attributes are in a hotkey/ subdirectory off the thinkpad device. bios_enabled: hotkey_bios_enabled: Returns the status of the hot keys feature when thinkpad-acpi was loaded. Upon module unload, the hot key feature status will be restored to this value. Loading @@ -207,19 +204,19 @@ sysfs notes: 0: hot keys were disabled 1: hot keys were enabled bios_mask: hotkey_bios_mask: Returns the hot keys mask when thinkpad-acpi was loaded. Upon module unload, the hot keys mask will be restored to this value. enable: hotkey_enable: Enables/disables the hot keys feature, and reports current status of the hot keys feature. 0: disables the hot keys feature / feature disabled 1: enables the hot keys feature / feature enabled mask: hotkey_mask: bit mask to enable ACPI event generation for each hot key (see above). Returns the current status of the hot keys mask, and allows one to modify it. Loading @@ -229,7 +226,7 @@ Bluetooth --------- procfs: /proc/acpi/ibm/bluetooth sysfs device attribute: bluetooth/enable sysfs device attribute: bluetooth_enable This feature shows the presence and current state of a ThinkPad Bluetooth device in the internal ThinkPad CDC slot. Loading @@ -244,7 +241,7 @@ If Bluetooth is installed, the following commands can be used: Sysfs notes: If the Bluetooth CDC card is installed, it can be enabled / disabled through the "bluetooth/enable" thinkpad-acpi device disabled through the "bluetooth_enable" thinkpad-acpi device attribute, and its current status can also be queried. enable: Loading @@ -252,7 +249,7 @@ Sysfs notes: 1: enables Bluetooth / Bluetooth is enabled. Note: this interface will be probably be superseeded by the generic rfkill class. generic rfkill class, so it is NOT to be considered stable yet. Video output control -- /proc/acpi/ibm/video -------------------------------------------- Loading Loading @@ -898,7 +895,7 @@ EXPERIMENTAL: WAN ----------------- procfs: /proc/acpi/ibm/wan sysfs device attribute: wwan/enable sysfs device attribute: wwan_enable This feature is marked EXPERIMENTAL because the implementation directly accesses hardware registers and may not work as expected. USE Loading @@ -921,7 +918,7 @@ If the W-WAN card is installed, the following commands can be used: Sysfs notes: If the W-WAN card is installed, it can be enabled / disabled through the "wwan/enable" thinkpad-acpi device disabled through the "wwan_enable" thinkpad-acpi device attribute, and its current status can also be queried. enable: Loading @@ -929,7 +926,7 @@ Sysfs notes: 1: enables WWAN card / WWAN card is enabled. Note: this interface will be probably be superseeded by the generic rfkill class. generic rfkill class, so it is NOT to be considered stable yet. Multiple Commands, Module Parameters ------------------------------------ Loading drivers/acpi/numa.c +1 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ int node_to_pxm(int node) return node_to_pxm_map[node]; } int __cpuinit acpi_map_pxm_to_node(int pxm) int acpi_map_pxm_to_node(int pxm) { int node = pxm_to_node_map[pxm]; Loading drivers/acpi/tables/tbinstal.c +4 −4 Original line number Diff line number Diff line Loading @@ -123,14 +123,14 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, } } /* The table must be either an SSDT or a PSDT */ /* The table must be either an SSDT or a PSDT or an OEMx */ if ((!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_PSDT)) && (!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT))) { (!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT)) && (strncmp(table_desc->pointer->signature, "OEM", 3))) { ACPI_ERROR((AE_INFO, "Table has invalid signature [%4.4s], must be SSDT or PSDT", "Table has invalid signature [%4.4s], must be SSDT, PSDT or OEMx", table_desc->pointer->signature)); return_ACPI_STATUS(AE_BAD_SIGNATURE); } Loading drivers/acpi/thermal.c +7 −6 Original line number Diff line number Diff line Loading @@ -827,6 +827,7 @@ static int acpi_thermal_temp_open_fs(struct inode *inode, struct file *file) static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset) { struct acpi_thermal *tz = seq->private; struct acpi_device *device; int i = 0; int j = 0; Loading @@ -849,9 +850,8 @@ static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset) tz->trips.passive.tc1, tz->trips.passive.tc2, tz->trips.passive.tsp); for (j = 0; j < tz->trips.passive.devices.count; j++) { seq_printf(seq, "0x%p ", tz->trips.passive.devices.handles[j]); acpi_bus_get_device(tz->trips.passive.devices.handles[j], &device); seq_printf(seq, "%4.4s ", acpi_device_bid(device)); } seq_puts(seq, "\n"); } Loading @@ -862,9 +862,10 @@ static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset) seq_printf(seq, "active[%d]: %ld C: devices=", i, KELVIN_TO_CELSIUS(tz->trips.active[i].temperature)); for (j = 0; j < tz->trips.active[i].devices.count; j++) seq_printf(seq, "0x%p ", tz->trips.active[i].devices.handles[j]); for (j = 0; j < tz->trips.active[i].devices.count; j++){ acpi_bus_get_device(tz->trips.active[i].devices.handles[j], &device); seq_printf(seq, "%4.4s ", acpi_device_bid(device)); } seq_puts(seq, "\n"); } Loading drivers/acpi/utilities/utcopy.c +50 −70 Original line number Diff line number Diff line Loading @@ -67,6 +67,10 @@ static acpi_status acpi_ut_copy_esimple_to_isimple(union acpi_object *user_obj, union acpi_operand_object **return_obj); static acpi_status acpi_ut_copy_epackage_to_ipackage(union acpi_object *external_object, union acpi_operand_object **internal_object); static acpi_status acpi_ut_copy_simple_object(union acpi_operand_object *source_desc, union acpi_operand_object *dest_desc); Loading Loading @@ -518,75 +522,71 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object, return_ACPI_STATUS(AE_NO_MEMORY); } #ifdef ACPI_FUTURE_IMPLEMENTATION /* Code to convert packages that are parameters to control methods */ /******************************************************************************* * * FUNCTION: acpi_ut_copy_epackage_to_ipackage * * PARAMETERS: *internal_object - Pointer to the object we are returning * *Buffer - Where the object is returned * *space_used - Where the length of the object is returned * PARAMETERS: external_object - The external object to be converted * internal_object - Where the internal object is returned * * RETURN: Status * * DESCRIPTION: This function is called to place a package object in a user * buffer. A package object by definition contains other objects. * * The buffer is assumed to have sufficient space for the object. * The caller must have verified the buffer length needed using the * acpi_ut_get_object_size function before calling this function. * DESCRIPTION: Copy an external package object to an internal package. * Handles nested packages. * ******************************************************************************/ static acpi_status acpi_ut_copy_epackage_to_ipackage(union acpi_operand_object *internal_object, u8 * buffer, u32 * space_used) acpi_ut_copy_epackage_to_ipackage(union acpi_object *external_object, union acpi_operand_object **internal_object) { u8 *free_space; union acpi_object *external_object; u32 length = 0; u32 this_index; u32 object_space = 0; union acpi_operand_object *this_internal_obj; union acpi_object *this_external_obj; acpi_status status = AE_OK; union acpi_operand_object *package_object; union acpi_operand_object **package_elements; acpi_native_uint i; ACPI_FUNCTION_TRACE(ut_copy_epackage_to_ipackage); /* * First package at head of the buffer */ external_object = (union acpi_object *)buffer; /* Create the package object */ /* * Free space begins right after the first package */ free_space = buffer + sizeof(union acpi_object); package_object = acpi_ut_create_package_object(external_object->package.count); if (!package_object) { return_ACPI_STATUS(AE_NO_MEMORY); } external_object->type = ACPI_GET_OBJECT_TYPE(internal_object); external_object->package.count = internal_object->package.count; external_object->package.elements = (union acpi_object *)free_space; package_elements = package_object->package.elements; /* * Build an array of ACPI_OBJECTS in the buffer * and move the free space past it * Recursive implementation. Probably ok, since nested external packages * as parameters should be very rare. */ free_space += external_object->package.count * sizeof(union acpi_object); for (i = 0; i < external_object->package.count; i++) { status = acpi_ut_copy_eobject_to_iobject(&external_object->package. elements[i], &package_elements[i]); if (ACPI_FAILURE(status)) { /* Call walk_package */ /* Truncate package and delete it */ package_object->package.count = i; package_elements[i] = NULL; acpi_ut_remove_reference(package_object); return_ACPI_STATUS(status); } } #endif /* Future implementation */ *internal_object = package_object; return_ACPI_STATUS(status); } /******************************************************************************* * * FUNCTION: acpi_ut_copy_eobject_to_iobject * * PARAMETERS: *internal_object - The external object to be converted * *buffer_ptr - Where the internal object is returned * PARAMETERS: external_object - The external object to be converted * internal_object - Where the internal object is returned * * RETURN: Status - the status of the call * Loading @@ -603,16 +603,10 @@ acpi_ut_copy_eobject_to_iobject(union acpi_object *external_object, ACPI_FUNCTION_TRACE(ut_copy_eobject_to_iobject); if (external_object->type == ACPI_TYPE_PACKAGE) { /* * Packages as external input to control methods are not supported, */ ACPI_ERROR((AE_INFO, "Packages as parameters not implemented!")); return_ACPI_STATUS(AE_NOT_IMPLEMENTED); } else { status = acpi_ut_copy_epackage_to_ipackage(external_object, internal_object); } else { /* * Build a simple object (no nested objects) */ Loading Loading @@ -803,33 +797,19 @@ acpi_ut_copy_ielement_to_ielement(u8 object_type, * Create and build the package object */ target_object = acpi_ut_create_internal_object(ACPI_TYPE_PACKAGE); acpi_ut_create_package_object(source_object->package.count); if (!target_object) { return (AE_NO_MEMORY); } target_object->package.count = source_object->package.count; target_object->common.flags = source_object->common.flags; /* * Create the object array */ target_object->package.elements = ACPI_ALLOCATE_ZEROED(((acpi_size) source_object->package. count + 1) * sizeof(void *)); if (!target_object->package.elements) { status = AE_NO_MEMORY; goto error_exit; } /* Pass the new package object back to the package walk routine */ /* * Pass the new package object back to the package walk routine */ state->pkg.this_target_obj = target_object; /* * Store the object pointer in the parent package object */ /* Store the object pointer in the parent package object */ *this_target_ptr = target_object; break; Loading Loading
Documentation/thinkpad-acpi.txt +11 −14 Original line number Diff line number Diff line Loading @@ -138,7 +138,7 @@ Hot keys -------- procfs: /proc/acpi/ibm/hotkey sysfs device attribute: hotkey/* sysfs device attribute: hotkey_* Without this driver, only the Fn-F4 key (sleep button) generates an ACPI event. With the driver loaded, the hotkey feature enabled and the Loading Loading @@ -196,10 +196,7 @@ The following commands can be written to the /proc/acpi/ibm/hotkey file: sysfs notes: The hot keys attributes are in a hotkey/ subdirectory off the thinkpad device. bios_enabled: hotkey_bios_enabled: Returns the status of the hot keys feature when thinkpad-acpi was loaded. Upon module unload, the hot key feature status will be restored to this value. Loading @@ -207,19 +204,19 @@ sysfs notes: 0: hot keys were disabled 1: hot keys were enabled bios_mask: hotkey_bios_mask: Returns the hot keys mask when thinkpad-acpi was loaded. Upon module unload, the hot keys mask will be restored to this value. enable: hotkey_enable: Enables/disables the hot keys feature, and reports current status of the hot keys feature. 0: disables the hot keys feature / feature disabled 1: enables the hot keys feature / feature enabled mask: hotkey_mask: bit mask to enable ACPI event generation for each hot key (see above). Returns the current status of the hot keys mask, and allows one to modify it. Loading @@ -229,7 +226,7 @@ Bluetooth --------- procfs: /proc/acpi/ibm/bluetooth sysfs device attribute: bluetooth/enable sysfs device attribute: bluetooth_enable This feature shows the presence and current state of a ThinkPad Bluetooth device in the internal ThinkPad CDC slot. Loading @@ -244,7 +241,7 @@ If Bluetooth is installed, the following commands can be used: Sysfs notes: If the Bluetooth CDC card is installed, it can be enabled / disabled through the "bluetooth/enable" thinkpad-acpi device disabled through the "bluetooth_enable" thinkpad-acpi device attribute, and its current status can also be queried. enable: Loading @@ -252,7 +249,7 @@ Sysfs notes: 1: enables Bluetooth / Bluetooth is enabled. Note: this interface will be probably be superseeded by the generic rfkill class. generic rfkill class, so it is NOT to be considered stable yet. Video output control -- /proc/acpi/ibm/video -------------------------------------------- Loading Loading @@ -898,7 +895,7 @@ EXPERIMENTAL: WAN ----------------- procfs: /proc/acpi/ibm/wan sysfs device attribute: wwan/enable sysfs device attribute: wwan_enable This feature is marked EXPERIMENTAL because the implementation directly accesses hardware registers and may not work as expected. USE Loading @@ -921,7 +918,7 @@ If the W-WAN card is installed, the following commands can be used: Sysfs notes: If the W-WAN card is installed, it can be enabled / disabled through the "wwan/enable" thinkpad-acpi device disabled through the "wwan_enable" thinkpad-acpi device attribute, and its current status can also be queried. enable: Loading @@ -929,7 +926,7 @@ Sysfs notes: 1: enables WWAN card / WWAN card is enabled. Note: this interface will be probably be superseeded by the generic rfkill class. generic rfkill class, so it is NOT to be considered stable yet. Multiple Commands, Module Parameters ------------------------------------ Loading
drivers/acpi/numa.c +1 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ int node_to_pxm(int node) return node_to_pxm_map[node]; } int __cpuinit acpi_map_pxm_to_node(int pxm) int acpi_map_pxm_to_node(int pxm) { int node = pxm_to_node_map[pxm]; Loading
drivers/acpi/tables/tbinstal.c +4 −4 Original line number Diff line number Diff line Loading @@ -123,14 +123,14 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, } } /* The table must be either an SSDT or a PSDT */ /* The table must be either an SSDT or a PSDT or an OEMx */ if ((!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_PSDT)) && (!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT))) { (!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT)) && (strncmp(table_desc->pointer->signature, "OEM", 3))) { ACPI_ERROR((AE_INFO, "Table has invalid signature [%4.4s], must be SSDT or PSDT", "Table has invalid signature [%4.4s], must be SSDT, PSDT or OEMx", table_desc->pointer->signature)); return_ACPI_STATUS(AE_BAD_SIGNATURE); } Loading
drivers/acpi/thermal.c +7 −6 Original line number Diff line number Diff line Loading @@ -827,6 +827,7 @@ static int acpi_thermal_temp_open_fs(struct inode *inode, struct file *file) static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset) { struct acpi_thermal *tz = seq->private; struct acpi_device *device; int i = 0; int j = 0; Loading @@ -849,9 +850,8 @@ static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset) tz->trips.passive.tc1, tz->trips.passive.tc2, tz->trips.passive.tsp); for (j = 0; j < tz->trips.passive.devices.count; j++) { seq_printf(seq, "0x%p ", tz->trips.passive.devices.handles[j]); acpi_bus_get_device(tz->trips.passive.devices.handles[j], &device); seq_printf(seq, "%4.4s ", acpi_device_bid(device)); } seq_puts(seq, "\n"); } Loading @@ -862,9 +862,10 @@ static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset) seq_printf(seq, "active[%d]: %ld C: devices=", i, KELVIN_TO_CELSIUS(tz->trips.active[i].temperature)); for (j = 0; j < tz->trips.active[i].devices.count; j++) seq_printf(seq, "0x%p ", tz->trips.active[i].devices.handles[j]); for (j = 0; j < tz->trips.active[i].devices.count; j++){ acpi_bus_get_device(tz->trips.active[i].devices.handles[j], &device); seq_printf(seq, "%4.4s ", acpi_device_bid(device)); } seq_puts(seq, "\n"); } Loading
drivers/acpi/utilities/utcopy.c +50 −70 Original line number Diff line number Diff line Loading @@ -67,6 +67,10 @@ static acpi_status acpi_ut_copy_esimple_to_isimple(union acpi_object *user_obj, union acpi_operand_object **return_obj); static acpi_status acpi_ut_copy_epackage_to_ipackage(union acpi_object *external_object, union acpi_operand_object **internal_object); static acpi_status acpi_ut_copy_simple_object(union acpi_operand_object *source_desc, union acpi_operand_object *dest_desc); Loading Loading @@ -518,75 +522,71 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object, return_ACPI_STATUS(AE_NO_MEMORY); } #ifdef ACPI_FUTURE_IMPLEMENTATION /* Code to convert packages that are parameters to control methods */ /******************************************************************************* * * FUNCTION: acpi_ut_copy_epackage_to_ipackage * * PARAMETERS: *internal_object - Pointer to the object we are returning * *Buffer - Where the object is returned * *space_used - Where the length of the object is returned * PARAMETERS: external_object - The external object to be converted * internal_object - Where the internal object is returned * * RETURN: Status * * DESCRIPTION: This function is called to place a package object in a user * buffer. A package object by definition contains other objects. * * The buffer is assumed to have sufficient space for the object. * The caller must have verified the buffer length needed using the * acpi_ut_get_object_size function before calling this function. * DESCRIPTION: Copy an external package object to an internal package. * Handles nested packages. * ******************************************************************************/ static acpi_status acpi_ut_copy_epackage_to_ipackage(union acpi_operand_object *internal_object, u8 * buffer, u32 * space_used) acpi_ut_copy_epackage_to_ipackage(union acpi_object *external_object, union acpi_operand_object **internal_object) { u8 *free_space; union acpi_object *external_object; u32 length = 0; u32 this_index; u32 object_space = 0; union acpi_operand_object *this_internal_obj; union acpi_object *this_external_obj; acpi_status status = AE_OK; union acpi_operand_object *package_object; union acpi_operand_object **package_elements; acpi_native_uint i; ACPI_FUNCTION_TRACE(ut_copy_epackage_to_ipackage); /* * First package at head of the buffer */ external_object = (union acpi_object *)buffer; /* Create the package object */ /* * Free space begins right after the first package */ free_space = buffer + sizeof(union acpi_object); package_object = acpi_ut_create_package_object(external_object->package.count); if (!package_object) { return_ACPI_STATUS(AE_NO_MEMORY); } external_object->type = ACPI_GET_OBJECT_TYPE(internal_object); external_object->package.count = internal_object->package.count; external_object->package.elements = (union acpi_object *)free_space; package_elements = package_object->package.elements; /* * Build an array of ACPI_OBJECTS in the buffer * and move the free space past it * Recursive implementation. Probably ok, since nested external packages * as parameters should be very rare. */ free_space += external_object->package.count * sizeof(union acpi_object); for (i = 0; i < external_object->package.count; i++) { status = acpi_ut_copy_eobject_to_iobject(&external_object->package. elements[i], &package_elements[i]); if (ACPI_FAILURE(status)) { /* Call walk_package */ /* Truncate package and delete it */ package_object->package.count = i; package_elements[i] = NULL; acpi_ut_remove_reference(package_object); return_ACPI_STATUS(status); } } #endif /* Future implementation */ *internal_object = package_object; return_ACPI_STATUS(status); } /******************************************************************************* * * FUNCTION: acpi_ut_copy_eobject_to_iobject * * PARAMETERS: *internal_object - The external object to be converted * *buffer_ptr - Where the internal object is returned * PARAMETERS: external_object - The external object to be converted * internal_object - Where the internal object is returned * * RETURN: Status - the status of the call * Loading @@ -603,16 +603,10 @@ acpi_ut_copy_eobject_to_iobject(union acpi_object *external_object, ACPI_FUNCTION_TRACE(ut_copy_eobject_to_iobject); if (external_object->type == ACPI_TYPE_PACKAGE) { /* * Packages as external input to control methods are not supported, */ ACPI_ERROR((AE_INFO, "Packages as parameters not implemented!")); return_ACPI_STATUS(AE_NOT_IMPLEMENTED); } else { status = acpi_ut_copy_epackage_to_ipackage(external_object, internal_object); } else { /* * Build a simple object (no nested objects) */ Loading Loading @@ -803,33 +797,19 @@ acpi_ut_copy_ielement_to_ielement(u8 object_type, * Create and build the package object */ target_object = acpi_ut_create_internal_object(ACPI_TYPE_PACKAGE); acpi_ut_create_package_object(source_object->package.count); if (!target_object) { return (AE_NO_MEMORY); } target_object->package.count = source_object->package.count; target_object->common.flags = source_object->common.flags; /* * Create the object array */ target_object->package.elements = ACPI_ALLOCATE_ZEROED(((acpi_size) source_object->package. count + 1) * sizeof(void *)); if (!target_object->package.elements) { status = AE_NO_MEMORY; goto error_exit; } /* Pass the new package object back to the package walk routine */ /* * Pass the new package object back to the package walk routine */ state->pkg.this_target_obj = target_object; /* * Store the object pointer in the parent package object */ /* Store the object pointer in the parent package object */ *this_target_ptr = target_object; break; Loading