staging: ti dspbridge: Rename words with camel case
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / staging / tidspbridge / include / dspbridge / pwr.h
blob63ccf8ca8f42bac708d192c4afcfc8ed62e369f0
1 /*
2 * pwr.h
4 * DSP-BIOS Bridge driver support functions for TI OMAP processors.
6 * Copyright (C) 2005-2006 Texas Instruments, Inc.
8 * This package is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
12 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 #ifndef PWR_
18 #define PWR_
20 #include <dspbridge/dbdefs.h>
21 #include <dspbridge/pwr_sh.h>
24 * ======== pwr_sleep_dsp ========
25 * Signal the DSP to go to sleep.
27 * Parameters:
28 * sleepCode: New sleep state for DSP. (Initially, valid codes
29 * are PWR_DEEPSLEEP or PWR_EMERGENCYDEEPSLEEP; both of
30 * these codes will simply put the DSP in deep sleep.)
32 * timeout: Maximum time (msec) that PWR should wait for
33 * confirmation that the DSP sleep state has been
34 * reached. If PWR should simply send the command to
35 * the DSP to go to sleep and then return (i.e.,
36 * asynchrounous sleep), the timeout should be
37 * specified as zero.
39 * Returns:
40 * 0: Success.
41 * 0: Success, but the DSP was already asleep.
42 * -EINVAL: The specified sleepCode is not supported.
43 * -ETIME: A timeout occured while waiting for DSP sleep
44 * confirmation.
45 * -EPERM: General failure, unable to send sleep command to
46 * the DSP.
48 extern int pwr_sleep_dsp(IN CONST u32 sleepCode, IN CONST u32 timeout);
51 * ======== pwr_wake_dsp ========
52 * Signal the DSP to wake from sleep.
54 * Parameters:
55 * timeout: Maximum time (msec) that PWR should wait for
56 * confirmation that the DSP is awake. If PWR should
57 * simply send a command to the DSP to wake and then
58 * return (i.e., asynchrounous wake), timeout should
59 * be specified as zero.
61 * Returns:
62 * 0: Success.
63 * 0: Success, but the DSP was already awake.
64 * -ETIME: A timeout occured while waiting for wake
65 * confirmation.
66 * -EPERM: General failure, unable to send wake command to
67 * the DSP.
69 extern int pwr_wake_dsp(IN CONST u32 timeout);
72 * ======== pwr_pm_pre_scale ========
73 * Prescale notification to DSP.
75 * Parameters:
76 * voltage_domain: The voltage domain for which notification is sent
77 * level: The level of voltage domain
79 * Returns:
80 * 0: Success.
81 * 0: Success, but the DSP was already awake.
82 * -ETIME: A timeout occured while waiting for wake
83 * confirmation.
84 * -EPERM: General failure, unable to send wake command to
85 * the DSP.
87 extern int pwr_pm_pre_scale(IN u16 voltage_domain, u32 level);
90 * ======== pwr_pm_post_scale ========
91 * PostScale notification to DSP.
93 * Parameters:
94 * voltage_domain: The voltage domain for which notification is sent
95 * level: The level of voltage domain
97 * Returns:
98 * 0: Success.
99 * 0: Success, but the DSP was already awake.
100 * -ETIME: A timeout occured while waiting for wake
101 * confirmation.
102 * -EPERM: General failure, unable to send wake command to
103 * the DSP.
105 extern int pwr_pm_post_scale(IN u16 voltage_domain, u32 level);
107 #endif /* PWR_ */