Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 47652500 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull ACPI & power management update from Len Brown:
 "Re-write of the turbostat tool.
     lower overhead was necessary for measuring very large system when
     they are very idle.

  IVB support in intel_idle
     It's what I run on my IVB, others should be able to also:-)

  ACPICA core update
     We have found some bugs due to divergence between Linux and the
     upstream ACPICA base.  Most of these patches are to reduce that
     divergence to reduce the risk of future bugs.

  Some cpuidle updates, mostly for non-Intel
     More will be coming, as they depend on this part.

  Some thermal management changes needed by non-ACPI systems.

  Some _OST (OS Status Indication) updates for hot ACPI hot-plug."

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (51 commits)
  Thermal: Documentation update
  Thermal: Add Hysteresis attributes
  Thermal: Make Thermal trip points writeable
  ACPI/AC: prevent OOPS on some boxes due to missing check power_supply_register() return value check
  tools/power: turbostat: fix large c1% issue
  tools/power: turbostat v2 - re-write for efficiency
  ACPICA: Update to version 20120711
  ACPICA: AcpiSrc: Fix some translation issues for Linux conversion
  ACPICA: Update header files copyrights to 2012
  ACPICA: Add new ACPI table load/unload external interfaces
  ACPICA: Split file: tbxface.c -> tbxfload.c
  ACPICA: Add PCC address space to space ID decode function
  ACPICA: Fix some comment fields
  ACPICA: Table manager: deploy new firmware error/warning interfaces
  ACPICA: Add new interfaces for BIOS(firmware) errors and warnings
  ACPICA: Split exception code utilities to a new file, utexcep.c
  ACPI: acpi_pad: tune round_robin_time
  ACPICA: Update to version 20120620
  ACPICA: Add support for implicit notify on multiple devices
  ACPICA: Update comments; no functional change
  ...
parents bd22dc17 ec033d0a
Loading
Loading
Loading
Loading
+14 −0
Original line number Original line Diff line number Diff line
* SPEAr Thermal

Required properties:
- compatible : "st,thermal-spear1340"
- reg : Address range of the thermal registers
- st,thermal-flags: flags used to enable thermal sensor

Example:

	thermal@fc000000 {
		compatible = "st,thermal-spear1340";
		reg = <0xfc000000 0x1000>;
		st,thermal-flags = <0x7000>;
	};
+19 −11
Original line number Original line Diff line number Diff line
@@ -32,7 +32,8 @@ temperature) and throttle appropriate devices.


1.1 thermal zone device interface
1.1 thermal zone device interface
1.1.1 struct thermal_zone_device *thermal_zone_device_register(char *name,
1.1.1 struct thermal_zone_device *thermal_zone_device_register(char *name,
		int trips, void *devdata, struct thermal_zone_device_ops *ops)
		int trips, int mask, void *devdata,
		struct thermal_zone_device_ops *ops)


    This interface function adds a new thermal zone device (sensor) to
    This interface function adds a new thermal zone device (sensor) to
    /sys/class/thermal folder as thermal_zone[0-*]. It tries to bind all the
    /sys/class/thermal folder as thermal_zone[0-*]. It tries to bind all the
@@ -40,16 +41,17 @@ temperature) and throttle appropriate devices.


    name: the thermal zone name.
    name: the thermal zone name.
    trips: the total number of trip points this thermal zone supports.
    trips: the total number of trip points this thermal zone supports.
    mask: Bit string: If 'n'th bit is set, then trip point 'n' is writeable.
    devdata: device private data
    devdata: device private data
    ops: thermal zone device call-backs.
    ops: thermal zone device call-backs.
	.bind: bind the thermal zone device with a thermal cooling device.
	.bind: bind the thermal zone device with a thermal cooling device.
	.unbind: unbind the thermal zone device with a thermal cooling device.
	.unbind: unbind the thermal zone device with a thermal cooling device.
	.get_temp: get the current temperature of the thermal zone.
	.get_temp: get the current temperature of the thermal zone.
	.get_mode: get the current mode (user/kernel) of the thermal zone.
	.get_mode: get the current mode (enabled/disabled) of the thermal zone.
	    - "kernel" means thermal management is done in kernel.
	    - "enabled" means the kernel thermal management is enabled.
	    - "user" will prevent kernel thermal driver actions upon trip points
	    - "disabled" will prevent kernel thermal driver action upon trip points
	      so that user applications can take charge of thermal management.
	      so that user applications can take charge of thermal management.
	.set_mode: set the mode (user/kernel) of the thermal zone.
	.set_mode: set the mode (enabled/disabled) of the thermal zone.
	.get_trip_type: get the type of certain trip point.
	.get_trip_type: get the type of certain trip point.
	.get_trip_temp: get the temperature above which the certain trip point
	.get_trip_temp: get the temperature above which the certain trip point
			will be fired.
			will be fired.
@@ -119,6 +121,7 @@ Thermal zone device sys I/F, created once it's registered:
    |---mode:			Working mode of the thermal zone
    |---mode:			Working mode of the thermal zone
    |---trip_point_[0-*]_temp:	Trip point temperature
    |---trip_point_[0-*]_temp:	Trip point temperature
    |---trip_point_[0-*]_type:	Trip point type
    |---trip_point_[0-*]_type:	Trip point type
    |---trip_point_[0-*]_hyst:	Hysteresis value for this trip point


Thermal cooling device sys I/F, created once it's registered:
Thermal cooling device sys I/F, created once it's registered:
/sys/class/thermal/cooling_device[0-*]:
/sys/class/thermal/cooling_device[0-*]:
@@ -167,12 +170,12 @@ temp
	RO, Required
	RO, Required


mode
mode
	One of the predefined values in [kernel, user].
	One of the predefined values in [enabled, disabled].
	This file gives information about the algorithm that is currently
	This file gives information about the algorithm that is currently
	managing the thermal zone. It can be either default kernel based
	managing the thermal zone. It can be either default kernel based
	algorithm or user space application.
	algorithm or user space application.
	kernel	= Thermal management in kernel thermal zone driver.
	enabled		= enable Kernel Thermal management.
	user	= Preventing kernel thermal zone driver actions upon
	disabled	= Preventing kernel thermal zone driver actions upon
			  trip points so that user application can take full
			  trip points so that user application can take full
			  charge of the thermal management.
			  charge of the thermal management.
	RW, Optional
	RW, Optional
@@ -188,6 +191,11 @@ trip_point_[0-*]_type
	thermal zone.
	thermal zone.
	RO, Optional
	RO, Optional


trip_point_[0-*]_hyst
	The hysteresis value for a trip point, represented as an integer
	Unit: Celsius
	RW, Optional

cdev[0-*]
cdev[0-*]
	Sysfs link to the thermal cooling device node where the sys I/F
	Sysfs link to the thermal cooling device node where the sys I/F
	for cooling device throttling control represents.
	for cooling device throttling control represents.
@@ -248,7 +256,7 @@ method, the sys I/F structure will be built like this:
|thermal_zone1:
|thermal_zone1:
    |---type:			acpitz
    |---type:			acpitz
    |---temp:			37000
    |---temp:			37000
    |---mode:			kernel
    |---mode:			enabled
    |---trip_point_0_temp:	100000
    |---trip_point_0_temp:	100000
    |---trip_point_0_type:	critical
    |---trip_point_0_type:	critical
    |---trip_point_1_temp:	80000
    |---trip_point_1_temp:	80000
+0 −7
Original line number Original line Diff line number Diff line
@@ -242,13 +242,6 @@ W: http://www.lesswatts.org/projects/acpi/
S:	Supported
S:	Supported
F:	drivers/acpi/fan.c
F:	drivers/acpi/fan.c


ACPI PROCESSOR AGGREGATOR DRIVER
M:	Shaohua Li <shaohua.li@intel.com>
L:	linux-acpi@vger.kernel.org
W:	http://www.lesswatts.org/projects/acpi/
S:	Supported
F:	drivers/acpi/acpi_pad.c

ACPI THERMAL DRIVER
ACPI THERMAL DRIVER
M:	Zhang Rui <rui.zhang@intel.com>
M:	Zhang Rui <rui.zhang@intel.com>
L:	linux-acpi@vger.kernel.org
L:	linux-acpi@vger.kernel.org
+3 −1
Original line number Original line Diff line number Diff line
@@ -294,7 +294,9 @@ static int acpi_ac_add(struct acpi_device *device)
	ac->charger.properties = ac_props;
	ac->charger.properties = ac_props;
	ac->charger.num_properties = ARRAY_SIZE(ac_props);
	ac->charger.num_properties = ARRAY_SIZE(ac_props);
	ac->charger.get_property = get_ac_property;
	ac->charger.get_property = get_ac_property;
	power_supply_register(&ac->device->dev, &ac->charger);
	result = power_supply_register(&ac->device->dev, &ac->charger);
	if (result)
		goto end;


	printk(KERN_INFO PREFIX "%s [%s] (%s)\n",
	printk(KERN_INFO PREFIX "%s [%s] (%s)\n",
	       acpi_device_name(device), acpi_device_bid(device),
	       acpi_device_name(device), acpi_device_bid(device),
+32 −11
Original line number Original line Diff line number Diff line
@@ -341,7 +341,7 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)
{
{
	struct acpi_memory_device *mem_device;
	struct acpi_memory_device *mem_device;
	struct acpi_device *device;
	struct acpi_device *device;

	u32 ost_code = ACPI_OST_SC_NON_SPECIFIC_FAILURE; /* default */


	switch (event) {
	switch (event) {
	case ACPI_NOTIFY_BUS_CHECK:
	case ACPI_NOTIFY_BUS_CHECK:
@@ -354,15 +354,20 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)
					  "\nReceived DEVICE CHECK notification for device\n"));
					  "\nReceived DEVICE CHECK notification for device\n"));
		if (acpi_memory_get_device(handle, &mem_device)) {
		if (acpi_memory_get_device(handle, &mem_device)) {
			printk(KERN_ERR PREFIX "Cannot find driver data\n");
			printk(KERN_ERR PREFIX "Cannot find driver data\n");
			return;
			break;
		}
		}


		if (!acpi_memory_check_device(mem_device)) {
		if (acpi_memory_check_device(mem_device))
			if (acpi_memory_enable_device(mem_device))
			break;
				printk(KERN_ERR PREFIX

					    "Cannot enable memory device\n");
		if (acpi_memory_enable_device(mem_device)) {
			printk(KERN_ERR PREFIX "Cannot enable memory device\n");
			break;
		}
		}

		ost_code = ACPI_OST_SC_SUCCESS;
		break;
		break;

	case ACPI_NOTIFY_EJECT_REQUEST:
	case ACPI_NOTIFY_EJECT_REQUEST:
		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
				  "\nReceived EJECT REQUEST notification for device\n"));
				  "\nReceived EJECT REQUEST notification for device\n"));
@@ -383,19 +388,35 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)
		 * TBD: Can also be disabled by Callback registration
		 * TBD: Can also be disabled by Callback registration
		 *      with generic sysfs driver
		 *      with generic sysfs driver
		 */
		 */
		if (acpi_memory_disable_device(mem_device))
		if (acpi_memory_disable_device(mem_device)) {
			printk(KERN_ERR PREFIX
			printk(KERN_ERR PREFIX "Disable memory device\n");
				    "Disable memory device\n");
			/*
			/*
		 * TBD: Invoke acpi_bus_remove to cleanup data structures
			 * If _EJ0 was called but failed, _OST is not
			 * necessary.
			 */
			 */
			if (mem_device->state == MEMORY_INVALID_STATE)
				return;

			break;
			break;
		}

		/*
		 * TBD: Invoke acpi_bus_remove to cleanup data structures
		 */

		/* _EJ0 succeeded; _OST is not necessary */
		return;

	default:
	default:
		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
				  "Unsupported event [0x%x]\n", event));
				  "Unsupported event [0x%x]\n", event));
		break;

		/* non-hotplug event; possibly handled by other handler */
		return;
	}
	}


	/* Inform firmware that the hotplug operation has completed */
	(void) acpi_evaluate_hotplug_ost(handle, event, ost_code, NULL);
	return;
	return;
}
}


Loading