aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk Opfer <dirk@opfer-online.de>2006-09-25 17:51:02 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-09-27 15:59:22 -0400
commit576b3ef2495c732a56509febd5de5144f3ebccf6 (patch)
treeba4fa9ef723972d4d3cff1881386a24ef4c6732c
parenta2025e7f73ae5eab0a25dad88c60aba67e3ae690 (diff)
[ARM] 3864/1: Refactore sharpsl_pm
This patch adds another hook into sharpsl_pm to notify the machine specific driver immediately after resume. This is needed to support the Sharp SL-6000 (Tosa). Signed-off-by: Dirk Opfer <Dirk@Opfer-Online.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/common/sharpsl_pm.c4
-rw-r--r--include/asm-arm/hardware/sharpsl_pm.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/common/sharpsl_pm.c b/arch/arm/common/sharpsl_pm.c
index 59b5ddec480f..f412dedda684 100644
--- a/arch/arm/common/sharpsl_pm.c
+++ b/arch/arm/common/sharpsl_pm.c
@@ -40,6 +40,7 @@
40#define SHARPSL_CHARGE_FINISH_TIME (msecs_to_jiffies(10*60*1000)) /* 10 min */ 40#define SHARPSL_CHARGE_FINISH_TIME (msecs_to_jiffies(10*60*1000)) /* 10 min */
41#define SHARPSL_BATCHK_TIME (msecs_to_jiffies(15*1000)) /* 15 sec */ 41#define SHARPSL_BATCHK_TIME (msecs_to_jiffies(15*1000)) /* 15 sec */
42#define SHARPSL_BATCHK_TIME_SUSPEND (60*10) /* 10 min */ 42#define SHARPSL_BATCHK_TIME_SUSPEND (60*10) /* 10 min */
43
43#define SHARPSL_WAIT_CO_TIME 15 /* 15 sec */ 44#define SHARPSL_WAIT_CO_TIME 15 /* 15 sec */
44#define SHARPSL_WAIT_DISCHARGE_ON 100 /* 100 msec */ 45#define SHARPSL_WAIT_DISCHARGE_ON 100 /* 100 msec */
45#define SHARPSL_CHECK_BATTERY_WAIT_TIME_TEMP 10 /* 10 msec */ 46#define SHARPSL_CHECK_BATTERY_WAIT_TIME_TEMP 10 /* 10 msec */
@@ -575,6 +576,9 @@ static int corgi_pxa_pm_enter(suspend_state_t state)
575 while (corgi_enter_suspend(alarm_time,alarm_status,state)) 576 while (corgi_enter_suspend(alarm_time,alarm_status,state))
576 {} 577 {}
577 578
579 if (sharpsl_pm.machinfo->earlyresume)
580 sharpsl_pm.machinfo->earlyresume();
581
578 dev_dbg(sharpsl_pm.dev, "SharpSL resuming...\n"); 582 dev_dbg(sharpsl_pm.dev, "SharpSL resuming...\n");
579 583
580 return 0; 584 return 0;
diff --git a/include/asm-arm/hardware/sharpsl_pm.h b/include/asm-arm/hardware/sharpsl_pm.h
index ecf15b83956f..a836e76a14f7 100644
--- a/include/asm-arm/hardware/sharpsl_pm.h
+++ b/include/asm-arm/hardware/sharpsl_pm.h
@@ -25,6 +25,7 @@ struct sharpsl_charger_machinfo {
25 void (*measure_temp)(int); 25 void (*measure_temp)(int);
26 void (*presuspend)(void); 26 void (*presuspend)(void);
27 void (*postsuspend)(void); 27 void (*postsuspend)(void);
28 void (*earlyresume)(void);
28 unsigned long (*read_devdata)(int); 29 unsigned long (*read_devdata)(int);
29#define SHARPSL_BATT_VOLT 1 30#define SHARPSL_BATT_VOLT 1
30#define SHARPSL_BATT_TEMP 2 31#define SHARPSL_BATT_TEMP 2