Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
twl4030-power.c File Reference
#include <linux/module.h>
#include <linux/pm.h>
#include <linux/i2c/twl.h>
#include <linux/platform_device.h>
#include <asm/mach-types.h>

Go to the source code of this file.

Macros

#define PWR_P1_SW_EVENTS   0x10
 
#define PWR_DEVOFF   (1 << 0)
 
#define SEQ_OFFSYNC   (1 << 0)
 
#define PHY_TO_OFF_PM_MASTER(p)   (p - 0x36)
 
#define PHY_TO_OFF_PM_RECEIVER(p)   (p - 0x5b)
 
#define R_HFCLKOUT_DEV_GRP   PHY_TO_OFF_PM_RECEIVER(0xe6)
 
#define R_P1_SW_EVENTS   PHY_TO_OFF_PM_MASTER(0x46)
 
#define R_P2_SW_EVENTS   PHY_TO_OFF_PM_MASTER(0x47)
 
#define R_P3_SW_EVENTS   PHY_TO_OFF_PM_MASTER(0x48)
 
#define R_CFG_P1_TRANSITION   PHY_TO_OFF_PM_MASTER(0x36)
 
#define R_CFG_P2_TRANSITION   PHY_TO_OFF_PM_MASTER(0x37)
 
#define R_CFG_P3_TRANSITION   PHY_TO_OFF_PM_MASTER(0x38)
 
#define LVL_WAKEUP   0x08
 
#define ENABLE_WARMRESET   (1<<4)
 
#define END_OF_SCRIPT   0x3f
 
#define R_SEQ_ADD_A2S   PHY_TO_OFF_PM_MASTER(0x55)
 
#define R_SEQ_ADD_S2A12   PHY_TO_OFF_PM_MASTER(0x56)
 
#define R_SEQ_ADD_S2A3   PHY_TO_OFF_PM_MASTER(0x57)
 
#define R_SEQ_ADD_WARM   PHY_TO_OFF_PM_MASTER(0x58)
 
#define R_MEMORY_ADDRESS   PHY_TO_OFF_PM_MASTER(0x59)
 
#define R_MEMORY_DATA   PHY_TO_OFF_PM_MASTER(0x5a)
 
#define DEV_GRP_OFFSET   0
 
#define TYPE_OFFSET   1
 
#define REMAP_OFFSET   2
 
#define DEDICATED_OFFSET   3
 
#define DEV_GRP_SHIFT   5
 
#define DEV_GRP_MASK   (7 << DEV_GRP_SHIFT)
 
#define TYPE_SHIFT   0
 
#define TYPE_MASK   (7 << TYPE_SHIFT)
 
#define TYPE2_SHIFT   3
 
#define TYPE2_MASK   (3 << TYPE2_SHIFT)
 
#define SLEEP_STATE_SHIFT   0
 
#define SLEEP_STATE_MASK   (0xf << SLEEP_STATE_SHIFT)
 
#define OFF_STATE_SHIFT   4
 
#define OFF_STATE_MASK   (0xf << OFF_STATE_SHIFT)
 

Functions

int twl4030_remove_script (u8 flags)
 
void twl4030_power_off (void)
 
void __devinit twl4030_power_init (struct twl4030_power_data *twl4030_scripts)
 

Macro Definition Documentation

#define DEDICATED_OFFSET   3

Definition at line 76 of file twl4030-power.c.

#define DEV_GRP_MASK   (7 << DEV_GRP_SHIFT)

Definition at line 82 of file twl4030-power.c.

#define DEV_GRP_OFFSET   0

Definition at line 73 of file twl4030-power.c.

#define DEV_GRP_SHIFT   5

Definition at line 81 of file twl4030-power.c.

#define ENABLE_WARMRESET   (1<<4)

Definition at line 56 of file twl4030-power.c.

#define END_OF_SCRIPT   0x3f

Definition at line 58 of file twl4030-power.c.

#define LVL_WAKEUP   0x08

Definition at line 54 of file twl4030-power.c.

#define OFF_STATE_MASK   (0xf << OFF_STATE_SHIFT)

Definition at line 94 of file twl4030-power.c.

#define OFF_STATE_SHIFT   4

Definition at line 93 of file twl4030-power.c.

#define PHY_TO_OFF_PM_MASTER (   p)    (p - 0x36)

Definition at line 40 of file twl4030-power.c.

#define PHY_TO_OFF_PM_RECEIVER (   p)    (p - 0x5b)

Definition at line 41 of file twl4030-power.c.

#define PWR_DEVOFF   (1 << 0)

Definition at line 37 of file twl4030-power.c.

#define PWR_P1_SW_EVENTS   0x10

Definition at line 36 of file twl4030-power.c.

#define R_CFG_P1_TRANSITION   PHY_TO_OFF_PM_MASTER(0x36)

Definition at line 50 of file twl4030-power.c.

#define R_CFG_P2_TRANSITION   PHY_TO_OFF_PM_MASTER(0x37)

Definition at line 51 of file twl4030-power.c.

#define R_CFG_P3_TRANSITION   PHY_TO_OFF_PM_MASTER(0x38)

Definition at line 52 of file twl4030-power.c.

#define R_HFCLKOUT_DEV_GRP   PHY_TO_OFF_PM_RECEIVER(0xe6)

Definition at line 44 of file twl4030-power.c.

#define R_MEMORY_ADDRESS   PHY_TO_OFF_PM_MASTER(0x59)

Definition at line 64 of file twl4030-power.c.

#define R_MEMORY_DATA   PHY_TO_OFF_PM_MASTER(0x5a)

Definition at line 65 of file twl4030-power.c.

#define R_P1_SW_EVENTS   PHY_TO_OFF_PM_MASTER(0x46)

Definition at line 47 of file twl4030-power.c.

#define R_P2_SW_EVENTS   PHY_TO_OFF_PM_MASTER(0x47)

Definition at line 48 of file twl4030-power.c.

#define R_P3_SW_EVENTS   PHY_TO_OFF_PM_MASTER(0x48)

Definition at line 49 of file twl4030-power.c.

#define R_SEQ_ADD_A2S   PHY_TO_OFF_PM_MASTER(0x55)

Definition at line 60 of file twl4030-power.c.

#define R_SEQ_ADD_S2A12   PHY_TO_OFF_PM_MASTER(0x56)

Definition at line 61 of file twl4030-power.c.

#define R_SEQ_ADD_S2A3   PHY_TO_OFF_PM_MASTER(0x57)

Definition at line 62 of file twl4030-power.c.

#define R_SEQ_ADD_WARM   PHY_TO_OFF_PM_MASTER(0x58)

Definition at line 63 of file twl4030-power.c.

#define REMAP_OFFSET   2

Definition at line 75 of file twl4030-power.c.

#define SEQ_OFFSYNC   (1 << 0)

Definition at line 38 of file twl4030-power.c.

#define SLEEP_STATE_MASK   (0xf << SLEEP_STATE_SHIFT)

Definition at line 92 of file twl4030-power.c.

#define SLEEP_STATE_SHIFT   0

Definition at line 91 of file twl4030-power.c.

#define TYPE2_MASK   (3 << TYPE2_SHIFT)

Definition at line 88 of file twl4030-power.c.

#define TYPE2_SHIFT   3

Definition at line 87 of file twl4030-power.c.

#define TYPE_MASK   (7 << TYPE_SHIFT)

Definition at line 86 of file twl4030-power.c.

#define TYPE_OFFSET   1

Definition at line 74 of file twl4030-power.c.

#define TYPE_SHIFT   0

Definition at line 85 of file twl4030-power.c.

Function Documentation

void __devinit twl4030_power_init ( struct twl4030_power_data twl4030_scripts)

Definition at line 530 of file twl4030-power.c.

void twl4030_power_off ( void  )

Definition at line 520 of file twl4030-power.c.

int twl4030_remove_script ( u8  flags)

Definition at line 462 of file twl4030-power.c.