Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
machine.h File Reference
#include <linux/regulator/consumer.h>
#include <linux/suspend.h>

Go to the source code of this file.

Data Structures

struct  regulator_state
 
struct  regulation_constraints
 
struct  regulator_consumer_supply
 
struct  regulator_init_data
 

Macros

#define REGULATOR_CHANGE_VOLTAGE   0x1
 
#define REGULATOR_CHANGE_CURRENT   0x2
 
#define REGULATOR_CHANGE_MODE   0x4
 
#define REGULATOR_CHANGE_STATUS   0x8
 
#define REGULATOR_CHANGE_DRMS   0x10
 
#define REGULATOR_CHANGE_BYPASS   0x20
 

: Descriptive name for the constraints, used for display purposes.

struct regulation_constraints - regulator operating constraints.

This struct describes regulator and board/machine specific constraints.

: Smallest voltage consumers may set. : Largest voltage consumers may set. : Offset applied to voltages from consumer to compensate for voltage drops.

: Smallest current consumers may set. : Largest current consumers may set.

: Mask of modes which may be configured by consumers. : Operations which may be performed by consumers.

: Set if the regulator should never be disabled. : Set if the regulator is enabled when the system is initially started. If the regulator is not enabled by the hardware or bootloader then it will be enabled when the constraints are applied. : Apply the voltage constraint when initialising.

: Input voltage for regulator when supplied by another regulator.

: State for regulator when system is suspended in disk mode. : State for regulator when system is suspended in mem mode. : State for regulator when system is suspended in standby mode. : Suspend state to set by default. : Mode to set at startup. : Time to settle down after voltage change (unit: uV/us)

#define REGULATOR_SUPPLY(_name, _dev_name)
 
int regulator_suspend_prepare (suspend_state_t state)
 
int regulator_suspend_finish (void)
 

Macro Definition Documentation

#define REGULATOR_CHANGE_BYPASS   0x20

Definition at line 43 of file machine.h.

#define REGULATOR_CHANGE_CURRENT   0x2

Definition at line 39 of file machine.h.

#define REGULATOR_CHANGE_DRMS   0x10

Definition at line 42 of file machine.h.

#define REGULATOR_CHANGE_MODE   0x4

Definition at line 40 of file machine.h.

#define REGULATOR_CHANGE_STATUS   0x8

Definition at line 41 of file machine.h.

#define REGULATOR_CHANGE_VOLTAGE   0x1

Definition at line 38 of file machine.h.

#define REGULATOR_SUPPLY (   _name,
  _dev_name 
)
Value:
{ \
.supply = _name, \
.dev_name = _dev_name, \
}

Definition at line 154 of file machine.h.

Function Documentation

int regulator_suspend_finish ( void  )

regulator_suspend_finish - resume regulators from system wide suspend

Turn on regulators that might be turned off by regulator_suspend_prepare and that should be turned on according to the regulators properties.

Definition at line 3538 of file core.c.

int regulator_suspend_prepare ( suspend_state_t  state)

regulator_suspend_prepare - prepare regulators for system wide suspend : system suspend state

Configure each regulator with it's suspend operating parameters for state. This will usually be called by machine suspend code prior to supending.

Definition at line 3505 of file core.c.