aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/sharpsl_pm.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/sharpsl_pm.c')
-rw-r--r--arch/arm/mach-pxa/sharpsl_pm.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c
index cb4767251f3c..8fed027b12dc 100644
--- a/arch/arm/mach-pxa/sharpsl_pm.c
+++ b/arch/arm/mach-pxa/sharpsl_pm.c
@@ -29,11 +29,8 @@
29#include <mach/pm.h> 29#include <mach/pm.h>
30#include <mach/pxa2xx-regs.h> 30#include <mach/pxa2xx-regs.h>
31#include <mach/regs-rtc.h> 31#include <mach/regs-rtc.h>
32#include <mach/sharpsl.h>
33#include <mach/sharpsl_pm.h> 32#include <mach/sharpsl_pm.h>
34 33
35#include "sharpsl.h"
36
37/* 34/*
38 * Constants 35 * Constants
39 */ 36 */
@@ -180,17 +177,12 @@ int sharpsl_pm_pxa_read_max1111(int channel)
180 if (machine_is_tosa()) 177 if (machine_is_tosa())
181 return 0; 178 return 0;
182 179
183#ifdef CONFIG_CORGI_SSP_DEPRECATED
184 return corgi_ssp_max1111_get((channel << MAXCTRL_SEL_SH) | MAXCTRL_PD0 | MAXCTRL_PD1
185 | MAXCTRL_SGL | MAXCTRL_UNI | MAXCTRL_STR);
186#else
187 extern int max1111_read_channel(int); 180 extern int max1111_read_channel(int);
188 181
189 /* max1111 accepts channels from 0-3, however, 182 /* max1111 accepts channels from 0-3, however,
190 * it is encoded from 0-7 here in the code. 183 * it is encoded from 0-7 here in the code.
191 */ 184 */
192 return max1111_read_channel(channel >> 1); 185 return max1111_read_channel(channel >> 1);
193#endif
194} 186}
195 187
196static int get_percentage(int voltage) 188static int get_percentage(int voltage)
@@ -277,21 +269,6 @@ static void sharpsl_battery_thread(struct work_struct *private_)
277 dev_dbg(sharpsl_pm.dev, "Battery: voltage: %d, status: %d, percentage: %d, time: %ld\n", voltage, 269 dev_dbg(sharpsl_pm.dev, "Battery: voltage: %d, status: %d, percentage: %d, time: %ld\n", voltage,
278 sharpsl_pm.battstat.mainbat_status, sharpsl_pm.battstat.mainbat_percent, jiffies); 270 sharpsl_pm.battstat.mainbat_status, sharpsl_pm.battstat.mainbat_percent, jiffies);
279 271
280#ifdef CONFIG_BACKLIGHT_CORGI
281 /* If battery is low. limit backlight intensity to save power. */
282 if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE)
283 && ((sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_LOW)
284 || (sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_CRITICAL))) {
285 if (!(sharpsl_pm.flags & SHARPSL_BL_LIMIT)) {
286 sharpsl_pm.machinfo->backlight_limit(1);
287 sharpsl_pm.flags |= SHARPSL_BL_LIMIT;
288 }
289 } else if (sharpsl_pm.flags & SHARPSL_BL_LIMIT) {
290 sharpsl_pm.machinfo->backlight_limit(0);
291 sharpsl_pm.flags &= ~SHARPSL_BL_LIMIT;
292 }
293#endif
294
295 /* Suspend if critical battery level */ 272 /* Suspend if critical battery level */
296 if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE) 273 if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE)
297 && (sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_CRITICAL) 274 && (sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_CRITICAL)