aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pnx4008/pm.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pnx4008/pm.c')
-rw-r--r--arch/arm/mach-pnx4008/pm.c39
1 files changed, 4 insertions, 35 deletions
diff --git a/arch/arm/mach-pnx4008/pm.c b/arch/arm/mach-pnx4008/pm.c
index 3649cd3dfc9a..2a137f33f752 100644
--- a/arch/arm/mach-pnx4008/pm.c
+++ b/arch/arm/mach-pnx4008/pm.c
@@ -107,50 +107,19 @@ static int pnx4008_pm_enter(suspend_state_t state)
107 case PM_SUSPEND_MEM: 107 case PM_SUSPEND_MEM:
108 pnx4008_suspend(); 108 pnx4008_suspend();
109 break; 109 break;
110 case PM_SUSPEND_DISK:
111 return -ENOTSUPP;
112 default:
113 return -EINVAL;
114 } 110 }
115 return 0; 111 return 0;
116} 112}
117 113
118/* 114static int pnx4008_pm_valid(suspend_state_t state)
119 * Called after processes are frozen, but before we shut down devices.
120 */
121static int pnx4008_pm_prepare(suspend_state_t state)
122{
123 switch (state) {
124 case PM_SUSPEND_STANDBY:
125 case PM_SUSPEND_MEM:
126 break;
127
128 case PM_SUSPEND_DISK:
129 return -ENOTSUPP;
130 break;
131
132 default:
133 return -EINVAL;
134 break;
135 }
136 return 0;
137}
138
139/*
140 * Called after devices are re-setup, but before processes are thawed.
141 */
142static int pnx4008_pm_finish(suspend_state_t state)
143{ 115{
144 return 0; 116 return (state == PM_SUSPEND_STANDBY) ||
117 (state == PM_SUSPEND_MEM);
145} 118}
146 119
147/*
148 * Set to PM_DISK_FIRMWARE so we can quickly veto suspend-to-disk.
149 */
150static struct pm_ops pnx4008_pm_ops = { 120static struct pm_ops pnx4008_pm_ops = {
151 .prepare = pnx4008_pm_prepare,
152 .enter = pnx4008_pm_enter, 121 .enter = pnx4008_pm_enter,
153 .finish = pnx4008_pm_finish, 122 .valid = pnx4008_pm_valid,
154}; 123};
155 124
156static int __init pnx4008_pm_init(void) 125static int __init pnx4008_pm_init(void)