Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
max8907-regulator.c File Reference
#include <linux/err.h>
#include <linux/init.h>
#include <linux/mfd/core.h>
#include <linux/mfd/max8907.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/of_regulator.h>
#include <linux/regmap.h>
#include <linux/slab.h>

Go to the source code of this file.

Data Structures

struct  max8907_regulator
 

Macros

#define MAX8907_II2RR_VERSION_MASK   0xF0
 
#define MAX8907_II2RR_VERSION_REV_A   0x00
 
#define MAX8907_II2RR_VERSION_REV_B   0x10
 
#define MAX8907_II2RR_VERSION_REV_C   0x30
 
#define REG_MBATT()
 
#define REG_LDO(ids, supply, base, min, max, step)
 
#define REG_FIXED(ids, supply, voltage)
 
#define REG_OUT5V(ids, supply, base, voltage)
 
#define REG_BBAT(ids, supply, base, min, max, step)
 
#define LDO_750_50(id, supply, base)
 
#define LDO_650_25(id, supply, base)
 

Functions

 subsys_initcall (max8907_regulator_init)
 
 module_exit (max8907_reg_exit)
 
 MODULE_DESCRIPTION ("MAX8907 regulator driver")
 
 MODULE_AUTHOR ("Gyungoh Yoo <[email protected]>")
 
 MODULE_LICENSE ("GPL v2")
 
 MODULE_ALIAS ("platform:max8907-regulator")
 

Macro Definition Documentation

#define LDO_650_25 (   id,
  supply,
  base 
)
Value:
REG_LDO(id, supply, (base), \
650000, 2225000, 25000)

Definition at line 110 of file max8907-regulator.c.

#define LDO_750_50 (   id,
  supply,
  base 
)
Value:
REG_LDO(id, supply, (base), \
750000, 3900000, 50000)

Definition at line 108 of file max8907-regulator.c.

#define MAX8907_II2RR_VERSION_MASK   0xF0

Definition at line 30 of file max8907-regulator.c.

#define MAX8907_II2RR_VERSION_REV_A   0x00

Definition at line 31 of file max8907-regulator.c.

#define MAX8907_II2RR_VERSION_REV_B   0x10

Definition at line 32 of file max8907-regulator.c.

#define MAX8907_II2RR_VERSION_REV_C   0x30

Definition at line 33 of file max8907-regulator.c.

#define REG_BBAT (   ids,
  supply,
  base,
  min,
  max,
  step 
)
Value:
[MAX8907_##ids] = { \
.name = #ids, \
.supply_name = supply, \
.id = MAX8907_##ids, \
.n_voltages = ((max) - (min)) / (step) + 1, \
.ops = &max8907_bbat_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
.min_uV = (min), \
.uV_step = (step), \
.vsel_reg = (base), \
.vsel_mask = MAX8907_MASK_VBBATTCV, \
}

Definition at line 93 of file max8907-regulator.c.

#define REG_FIXED (   ids,
  supply,
  voltage 
)
Value:
[MAX8907_##ids] = { \
.name = #ids, \
.supply_name = supply, \
.id = MAX8907_##ids, \
.n_voltages = 1, \
.ops = &max8907_fixed_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
.min_uV = (voltage), \
}

Definition at line 67 of file max8907-regulator.c.

#define REG_LDO (   ids,
  supply,
  base,
  min,
  max,
  step 
)
Value:
[MAX8907_##ids] = { \
.name = #ids, \
.supply_name = supply, \
.id = MAX8907_##ids, \
.n_voltages = ((max) - (min)) / (step) + 1, \
.ops = &max8907_ldo_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
.min_uV = (min), \
.uV_step = (step), \
.vsel_reg = (base) + MAX8907_VOUT, \
.vsel_mask = 0x3f, \
.enable_reg = (base) + MAX8907_CTL, \
.enable_mask = MAX8907_MASK_LDO_EN, \
}

Definition at line 50 of file max8907-regulator.c.

#define REG_MBATT ( )
Value:
.name = "MBATT", \
.supply_name = "mbatt", \
.id = MAX8907_MBATT, \
.ops = &max8907_mbatt_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
}

Definition at line 40 of file max8907-regulator.c.

#define REG_OUT5V (   ids,
  supply,
  base,
  voltage 
)
Value:
[MAX8907_##ids] = { \
.name = #ids, \
.supply_name = supply, \
.id = MAX8907_##ids, \
.n_voltages = 1, \
.ops = &max8907_out5v_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
.min_uV = (voltage), \
.enable_reg = (base), \
.enable_mask = MAX8907_MASK_OUT5V_EN, \
}

Definition at line 79 of file max8907-regulator.c.

Function Documentation

MODULE_ALIAS ( "platform:max8907-regulator )
MODULE_AUTHOR ( "Gyungoh Yoo <[email protected]>"  )
MODULE_DESCRIPTION ( "MAX8907 regulator driver )
module_exit ( max8907_reg_exit  )
MODULE_LICENSE ( "GPL v2 )
subsys_initcall ( max8907_regulator_init  )