Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
sharpsl_pm.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/apm-emulation.h>
#include <linux/timer.h>
#include <linux/delay.h>
#include <linux/leds.h>
#include <linux/suspend.h>
#include <linux/gpio.h>
#include <linux/io.h>
#include <asm/mach-types.h>
#include <mach/pm.h>
#include <mach/pxa2xx-regs.h>
#include <mach/regs-rtc.h>
#include <mach/sharpsl_pm.h>

Go to the source code of this file.

Macros

#define SHARPSL_CHARGE_ON_TIME_INTERVAL   (msecs_to_jiffies(1*60*1000)) /* 1 min */
 
#define SHARPSL_CHARGE_FINISH_TIME   (msecs_to_jiffies(10*60*1000)) /* 10 min */
 
#define SHARPSL_BATCHK_TIME   (msecs_to_jiffies(15*1000)) /* 15 sec */
 
#define SHARPSL_BATCHK_TIME_SUSPEND   (60*10) /* 10 min */
 
#define SHARPSL_WAIT_CO_TIME   15 /* 15 sec */
 
#define SHARPSL_WAIT_DISCHARGE_ON   100 /* 100 msec */
 
#define SHARPSL_CHECK_BATTERY_WAIT_TIME_TEMP   10 /* 10 msec */
 
#define SHARPSL_CHECK_BATTERY_WAIT_TIME_VOLT   10 /* 10 msec */
 
#define SHARPSL_CHECK_BATTERY_WAIT_TIME_ACIN   10 /* 10 msec */
 
#define SHARPSL_CHARGE_WAIT_TIME   15 /* 15 msec */
 
#define SHARPSL_CHARGE_CO_CHECK_TIME   5 /* 5 msec */
 
#define SHARPSL_CHARGE_RETRY_CNT   1 /* eqv. 10 min */
 
#define MAXCTRL_PD0   (1u << 0)
 
#define MAXCTRL_PD1   (1u << 1)
 
#define MAXCTRL_SGL   (1u << 2)
 
#define MAXCTRL_UNI   (1u << 3)
 
#define MAXCTRL_SEL_SH   4
 
#define MAXCTRL_STR   (1u << 7)
 
#define SHARPSL_CNV_VALUE_NUM   10
 
#define sharpsl_pm_suspend   NULL
 
#define sharpsl_pm_resume   NULL
 

Functions

 DEFINE_LED_TRIGGER (sharpsl_charge_led_trigger)
 
int max1111_read_channel (int)
 
int sharpsl_pm_pxa_read_max1111 (int channel)
 
void sharpsl_battery_kick (void)
 
 EXPORT_SYMBOL (sharpsl_battery_kick)
 
void sharpsl_pm_led (int val)
 
 late_initcall (sharpsl_pm_init)
 
 module_exit (sharpsl_pm_exit)
 

Variables

struct sharpsl_pm_status sharpsl_pm
 
struct battery_thresh sharpsl_battery_levels_acin []
 
struct battery_thresh sharpsl_battery_levels_noac []
 
void(* apm_get_power_status )(struct apm_power_info *)
 

Macro Definition Documentation

#define MAXCTRL_PD0   (1u << 0)

Definition at line 164 of file sharpsl_pm.c.

#define MAXCTRL_PD1   (1u << 1)

Definition at line 165 of file sharpsl_pm.c.

#define MAXCTRL_SEL_SH   4

Definition at line 168 of file sharpsl_pm.c.

#define MAXCTRL_SGL   (1u << 2)

Definition at line 166 of file sharpsl_pm.c.

#define MAXCTRL_STR   (1u << 7)

Definition at line 169 of file sharpsl_pm.c.

#define MAXCTRL_UNI   (1u << 3)

Definition at line 167 of file sharpsl_pm.c.

#define SHARPSL_BATCHK_TIME   (msecs_to_jiffies(15*1000)) /* 15 sec */

Definition at line 40 of file sharpsl_pm.c.

#define SHARPSL_BATCHK_TIME_SUSPEND   (60*10) /* 10 min */

Definition at line 41 of file sharpsl_pm.c.

#define SHARPSL_CHARGE_CO_CHECK_TIME   5 /* 5 msec */

Definition at line 49 of file sharpsl_pm.c.

#define SHARPSL_CHARGE_FINISH_TIME   (msecs_to_jiffies(10*60*1000)) /* 10 min */

Definition at line 39 of file sharpsl_pm.c.

#define SHARPSL_CHARGE_ON_TIME_INTERVAL   (msecs_to_jiffies(1*60*1000)) /* 1 min */

Definition at line 38 of file sharpsl_pm.c.

#define SHARPSL_CHARGE_RETRY_CNT   1 /* eqv. 10 min */

Definition at line 50 of file sharpsl_pm.c.

#define SHARPSL_CHARGE_WAIT_TIME   15 /* 15 msec */

Definition at line 48 of file sharpsl_pm.c.

#define SHARPSL_CHECK_BATTERY_WAIT_TIME_ACIN   10 /* 10 msec */

Definition at line 47 of file sharpsl_pm.c.

#define SHARPSL_CHECK_BATTERY_WAIT_TIME_TEMP   10 /* 10 msec */

Definition at line 45 of file sharpsl_pm.c.

#define SHARPSL_CHECK_BATTERY_WAIT_TIME_VOLT   10 /* 10 msec */

Definition at line 46 of file sharpsl_pm.c.

#define SHARPSL_CNV_VALUE_NUM   10

Definition at line 431 of file sharpsl_pm.c.

#define sharpsl_pm_resume   NULL

Definition at line 792 of file sharpsl_pm.c.

#define sharpsl_pm_suspend   NULL

Definition at line 791 of file sharpsl_pm.c.

#define SHARPSL_WAIT_CO_TIME   15 /* 15 sec */

Definition at line 43 of file sharpsl_pm.c.

#define SHARPSL_WAIT_DISCHARGE_ON   100 /* 100 msec */

Definition at line 44 of file sharpsl_pm.c.

Function Documentation

DEFINE_LED_TRIGGER ( sharpsl_charge_led_trigger  )
EXPORT_SYMBOL ( sharpsl_battery_kick  )
late_initcall ( sharpsl_pm_init  )
int max1111_read_channel ( int  )
module_exit ( sharpsl_pm_exit  )
void sharpsl_battery_kick ( void  )

Definition at line 223 of file sharpsl_pm.c.

void sharpsl_pm_led ( int  val)

Definition at line 283 of file sharpsl_pm.c.

int sharpsl_pm_pxa_read_max1111 ( int  channel)

Definition at line 175 of file sharpsl_pm.c.

Variable Documentation

void(* apm_get_power_status)(struct apm_power_info *)

Definition at line 165 of file apm-emulation.c.

struct battery_thresh sharpsl_battery_levels_acin[]

Definition at line 77 of file sharpsl_pm.c.

struct battery_thresh sharpsl_battery_levels_noac[]

Definition at line 120 of file sharpsl_pm.c.

Definition at line 70 of file sharpsl_pm.c.