Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 321380
b: refs/heads/master
c: a5ca734
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki authored and Len Brown committed Jul 26, 2012
1 parent 0f9702d commit 8c34ca5
Show file tree
Hide file tree
Showing 178 changed files with 2,462 additions and 4,239 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3f6f49c7854c9294119437a82c5b35be78f9cea6
refs/heads/master: a5ca7345c1e67cd12cf75a9ec034c7d34786ae79
14 changes: 0 additions & 14 deletions trunk/Documentation/devicetree/bindings/thermal/spear-thermal.txt

This file was deleted.

30 changes: 11 additions & 19 deletions trunk/Documentation/thermal/sysfs-api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,24 @@ temperature) and throttle appropriate devices.

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

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
thermal cooling devices registered at the same time.

name: the thermal zone name.
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
ops: thermal zone device call-backs.
.bind: bind 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_mode: get the current mode (enabled/disabled) of the thermal zone.
- "enabled" means the kernel thermal management is enabled.
- "disabled" will prevent kernel thermal driver action upon trip points
.get_mode: get the current mode (user/kernel) of the thermal zone.
- "kernel" means thermal management is done in kernel.
- "user" will prevent kernel thermal driver actions upon trip points
so that user applications can take charge of thermal management.
.set_mode: set the mode (enabled/disabled) of the thermal zone.
.set_mode: set the mode (user/kernel) of the thermal zone.
.get_trip_type: get the type of certain trip point.
.get_trip_temp: get the temperature above which the certain trip point
will be fired.
Expand Down Expand Up @@ -121,7 +119,6 @@ Thermal zone device sys I/F, created once it's registered:
|---mode: Working mode of the thermal zone
|---trip_point_[0-*]_temp: Trip point temperature
|---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:
/sys/class/thermal/cooling_device[0-*]:
Expand Down Expand Up @@ -170,14 +167,14 @@ temp
RO, Required

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

trip_point_[0-*]_temp
Expand All @@ -191,11 +188,6 @@ trip_point_[0-*]_type
thermal zone.
RO, Optional

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

cdev[0-*]
Sysfs link to the thermal cooling device node where the sys I/F
for cooling device throttling control represents.
Expand Down Expand Up @@ -256,7 +248,7 @@ method, the sys I/F structure will be built like this:
|thermal_zone1:
|---type: acpitz
|---temp: 37000
|---mode: enabled
|---mode: kernel
|---trip_point_0_temp: 100000
|---trip_point_0_type: critical
|---trip_point_1_temp: 80000
Expand Down
7 changes: 7 additions & 0 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,13 @@ W: http://www.lesswatts.org/projects/acpi/
S: Supported
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
M: Zhang Rui <rui.zhang@intel.com>
L: linux-acpi@vger.kernel.org
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/x86/kernel/acpi/sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ unsigned long acpi_realmode_flags;
static char temp_stack[4096];
#endif

asmlinkage void acpi_enter_s3(void)
{
acpi_enter_sleep_state(3, wake_sleep_flags);
}
/**
* acpi_suspend_lowlevel - save kernel state
*
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86/kernel/acpi/sleep.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Variables and functions used by the code in sleep.c
*/

#include <linux/linkage.h>
#include <asm/realmode.h>

extern unsigned long saved_video_mode;
Expand All @@ -10,6 +11,7 @@ extern long saved_magic;
extern int wakeup_pmode_return;

extern u8 wake_sleep_flags;
extern asmlinkage void acpi_enter_s3(void);

extern unsigned long acpi_copy_wakeup_routine(unsigned long);
extern void wakeup_long64(void);
Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/x86/kernel/acpi/wakeup_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ restore_registers:
ENTRY(do_suspend_lowlevel)
call save_processor_state
call save_registers
pushl $3
call acpi_enter_sleep_state
addl $4, %esp
call acpi_enter_s3

# In case of S3 failure, we'll emerge here. Jump
# to ret_point to recover
Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/x86/kernel/acpi/wakeup_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ ENTRY(do_suspend_lowlevel)
movq %rsi, saved_rsi

addq $8, %rsp
movl $3, %edi
xorl %eax, %eax
call acpi_enter_sleep_state
call acpi_enter_s3
/* in case something went wrong, restore the machine status and go on */
jmp resume_point

Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/acpi/ac.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,7 @@ static int acpi_ac_add(struct acpi_device *device)
ac->charger.properties = ac_props;
ac->charger.num_properties = ARRAY_SIZE(ac_props);
ac->charger.get_property = get_ac_property;
result = power_supply_register(&ac->device->dev, &ac->charger);
if (result)
goto end;
power_supply_register(&ac->device->dev, &ac->charger);

printk(KERN_INFO PREFIX "%s [%s] (%s)\n",
acpi_device_name(device), acpi_device_bid(device),
Expand Down
43 changes: 11 additions & 32 deletions trunk/drivers/acpi/acpi_memhotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_device *device;
u32 ost_code = ACPI_OST_SC_NON_SPECIFIC_FAILURE; /* default */


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

if (acpi_memory_check_device(mem_device))
break;

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

ost_code = ACPI_OST_SC_SUCCESS;
break;

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

break;
}

if (acpi_memory_disable_device(mem_device))
printk(KERN_ERR PREFIX
"Disable memory device\n");
/*
* TBD: Invoke acpi_bus_remove to cleanup data structures
*/

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

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

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

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

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/acpi/acpi_pad.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static void exit_round_robin(unsigned int tsk_index)
}

static unsigned int idle_pct = 5; /* percentage */
static unsigned int round_robin_time = 1; /* second */
static unsigned int round_robin_time = 10; /* second */
static int power_saving_thread(void *data)
{
struct sched_param param = {.sched_priority = 1};
Expand Down Expand Up @@ -235,7 +235,7 @@ static int create_power_saving_task(void)

ps_tsks[ps_tsk_num] = kthread_run(power_saving_thread,
(void *)(unsigned long)ps_tsk_num,
"acpi_pad/%d", ps_tsk_num);
"power_saving/%d", ps_tsk_num);
rc = IS_ERR(ps_tsks[ps_tsk_num]) ? PTR_ERR(ps_tsks[ps_tsk_num]) : 0;
if (!rc)
ps_tsk_num++;
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/acpi/acpica/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,12 @@ acpi-y += \
tbinstal.o \
tbutils.o \
tbxface.o \
tbxfload.o \
tbxfroot.o

acpi-y += \
utaddress.o \
utalloc.o \
utcopy.o \
utexcep.o \
utdebug.o \
utdecode.o \
utdelete.o \
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/acpica/acevents.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ u32 acpi_ev_install_sci_handler(void);

acpi_status acpi_ev_remove_sci_handler(void);

u32 acpi_ev_initialize_SCI(u32 program_SCI);
u32 acpi_ev_initialize_sCI(u32 program_sCI);

ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_ev_terminate(void))
#endif /* __ACEVENTS_H__ */
19 changes: 10 additions & 9 deletions trunk/drivers/acpi/acpica/acglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ ACPI_EXTERN acpi_cache_t *acpi_gbl_operand_cache;

/* Global handlers */

ACPI_EXTERN struct acpi_global_notify_handler acpi_gbl_global_notify[2];
ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_device_notify;
ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_system_notify;
ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler;
ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler;
ACPI_EXTERN acpi_tbl_handler acpi_gbl_table_handler;
Expand Down Expand Up @@ -326,6 +327,14 @@ extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS];

#endif

/* Exception codes */

extern char const *acpi_gbl_exception_names_env[];
extern char const *acpi_gbl_exception_names_pgm[];
extern char const *acpi_gbl_exception_names_tbl[];
extern char const *acpi_gbl_exception_names_aml[];
extern char const *acpi_gbl_exception_names_ctrl[];

/*****************************************************************************
*
* Namespace globals
Expand Down Expand Up @@ -454,12 +463,4 @@ ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects;

#endif /* ACPI_DEBUGGER */

/*****************************************************************************
*
* Info/help support
*
****************************************************************************/

extern const struct ah_predefined_name asl_predefined_info[];

#endif /* __ACGLOBAL_H__ */
12 changes: 6 additions & 6 deletions trunk/drivers/acpi/acpica/achware.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,22 +83,22 @@ acpi_status acpi_hw_clear_acpi_status(void);
/*
* hwsleep - sleep/wake support (Legacy sleep registers)
*/
acpi_status acpi_hw_legacy_sleep(u8 sleep_state);
acpi_status acpi_hw_legacy_sleep(u8 sleep_state, u8 flags);

acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state);
acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state, u8 flags);

acpi_status acpi_hw_legacy_wake(u8 sleep_state);
acpi_status acpi_hw_legacy_wake(u8 sleep_state, u8 flags);

/*
* hwesleep - sleep/wake support (Extended FADT-V5 sleep registers)
*/
void acpi_hw_execute_sleep_method(char *method_name, u32 integer_argument);

acpi_status acpi_hw_extended_sleep(u8 sleep_state);
acpi_status acpi_hw_extended_sleep(u8 sleep_state, u8 flags);

acpi_status acpi_hw_extended_wake_prep(u8 sleep_state);
acpi_status acpi_hw_extended_wake_prep(u8 sleep_state, u8 flags);

acpi_status acpi_hw_extended_wake(u8 sleep_state);
acpi_status acpi_hw_extended_wake(u8 sleep_state, u8 flags);

/*
* hwvalid - Port I/O with validation
Expand Down
Loading

0 comments on commit 8c34ca5

Please sign in to comment.