Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Dirk Opfer and committed by
Russell King
576b3ef2 a2025e7f

+5
+4
arch/arm/common/sharpsl_pm.c
··· 40 40 #define SHARPSL_CHARGE_FINISH_TIME (msecs_to_jiffies(10*60*1000)) /* 10 min */ 41 41 #define SHARPSL_BATCHK_TIME (msecs_to_jiffies(15*1000)) /* 15 sec */ 42 42 #define SHARPSL_BATCHK_TIME_SUSPEND (60*10) /* 10 min */ 43 + 43 44 #define SHARPSL_WAIT_CO_TIME 15 /* 15 sec */ 44 45 #define SHARPSL_WAIT_DISCHARGE_ON 100 /* 100 msec */ 45 46 #define SHARPSL_CHECK_BATTERY_WAIT_TIME_TEMP 10 /* 10 msec */ ··· 575 574 576 575 while (corgi_enter_suspend(alarm_time,alarm_status,state)) 577 576 {} 577 + 578 + if (sharpsl_pm.machinfo->earlyresume) 579 + sharpsl_pm.machinfo->earlyresume(); 578 580 579 581 dev_dbg(sharpsl_pm.dev, "SharpSL resuming...\n"); 580 582
+1
include/asm-arm/hardware/sharpsl_pm.h
··· 25 25 void (*measure_temp)(int); 26 26 void (*presuspend)(void); 27 27 void (*postsuspend)(void); 28 + void (*earlyresume)(void); 28 29 unsigned long (*read_devdata)(int); 29 30 #define SHARPSL_BATT_VOLT 1 30 31 #define SHARPSL_BATT_TEMP 2