Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
da9052-regulator.c File Reference
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/mfd/da9052/da9052.h>
#include <linux/mfd/da9052/reg.h>
#include <linux/mfd/da9052/pdata.h>

Go to the source code of this file.

Data Structures

struct  da9052_regulator_info
 
struct  da9052_regulator
 

Macros

#define DA9052_BUCK_PERI_3uV_STEP   100000
 
#define DA9052_BUCK_PERI_REG_MAP_UPTO_3uV   24
 
#define DA9052_CONST_3uV   3000000
 
#define DA9052_MIN_UA   0
 
#define DA9052_MAX_UA   3
 
#define DA9052_CURRENT_RANGE   4
 
#define DA9052_BUCK_ILIM_MASK_EVEN   0x0c
 
#define DA9052_BUCK_ILIM_MASK_ODD   0xc0
 
#define DA9052_ID_BUCK1   0
 
#define DA9052_ID_BUCK2   1
 
#define DA9052_ID_BUCK3   2
 
#define DA9052_ID_BUCK4   3
 
#define DA9052_ID_LDO1   4
 
#define DA9052_ID_LDO2   5
 
#define DA9052_ID_LDO3   6
 
#define DA9052_ID_LDO4   7
 
#define DA9052_ID_LDO5   8
 
#define DA9052_ID_LDO6   9
 
#define DA9052_ID_LDO7   10
 
#define DA9052_ID_LDO8   11
 
#define DA9052_ID_LDO9   12
 
#define DA9052_ID_LDO10   13
 
#define DA9052_LDO(_id, step, min, max, sbits, ebits, abits)
 
#define DA9052_DCDC(_id, step, min, max, sbits, ebits, abits)
 

Functions

 subsys_initcall (da9052_regulator_init)
 
 module_exit (da9052_regulator_exit)
 
 MODULE_AUTHOR ("David Dajun Chen <[email protected]>")
 
 MODULE_DESCRIPTION ("Power Regulator driver for Dialog DA9052 PMIC")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("platform:da9052-regulator")
 

Macro Definition Documentation

#define DA9052_BUCK_ILIM_MASK_EVEN   0x0c

Definition at line 41 of file da9052-regulator.c.

#define DA9052_BUCK_ILIM_MASK_ODD   0xc0

Definition at line 42 of file da9052-regulator.c.

#define DA9052_BUCK_PERI_3uV_STEP   100000

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

#define DA9052_BUCK_PERI_REG_MAP_UPTO_3uV   24

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

#define DA9052_CONST_3uV   3000000

Definition at line 34 of file da9052-regulator.c.

#define DA9052_CURRENT_RANGE   4

Definition at line 38 of file da9052-regulator.c.

#define DA9052_DCDC (   _id,
  step,
  min,
  max,
  sbits,
  ebits,
  abits 
)
Value:
{\
.reg_desc = {\
.name = #_id,\
.ops = &da9052_dcdc_ops,\
.id = DA9052_ID_##_id,\
.n_voltages = (max - min) / step + 1, \
.vsel_reg = DA9052_BUCKCORE_REG + DA9052_ID_##_id, \
.vsel_mask = (1 << (sbits)) - 1,\
.enable_reg = DA9052_BUCKCORE_REG + DA9052_ID_##_id, \
.enable_mask = 1 << (ebits),\
},\
.min_uV = (min) * 1000,\
.max_uV = (max) * 1000,\
.step_uV = (step) * 1000,\
.activate_bit = (abits),\
}

Definition at line 286 of file da9052-regulator.c.

#define DA9052_ID_BUCK1   0

Definition at line 45 of file da9052-regulator.c.

#define DA9052_ID_BUCK2   1

Definition at line 46 of file da9052-regulator.c.

#define DA9052_ID_BUCK3   2

Definition at line 47 of file da9052-regulator.c.

#define DA9052_ID_BUCK4   3

Definition at line 48 of file da9052-regulator.c.

#define DA9052_ID_LDO1   4

Definition at line 49 of file da9052-regulator.c.

#define DA9052_ID_LDO10   13

Definition at line 58 of file da9052-regulator.c.

#define DA9052_ID_LDO2   5

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

#define DA9052_ID_LDO3   6

Definition at line 51 of file da9052-regulator.c.

#define DA9052_ID_LDO4   7

Definition at line 52 of file da9052-regulator.c.

#define DA9052_ID_LDO5   8

Definition at line 53 of file da9052-regulator.c.

#define DA9052_ID_LDO6   9

Definition at line 54 of file da9052-regulator.c.

#define DA9052_ID_LDO7   10

Definition at line 55 of file da9052-regulator.c.

#define DA9052_ID_LDO8   11

Definition at line 56 of file da9052-regulator.c.

#define DA9052_ID_LDO9   12

Definition at line 57 of file da9052-regulator.c.

#define DA9052_LDO (   _id,
  step,
  min,
  max,
  sbits,
  ebits,
  abits 
)
Value:
{\
.reg_desc = {\
.name = #_id,\
.ops = &da9052_ldo_ops,\
.id = DA9052_ID_##_id,\
.n_voltages = (max - min) / step + 1, \
.vsel_reg = DA9052_BUCKCORE_REG + DA9052_ID_##_id, \
.vsel_mask = (1 << (sbits)) - 1,\
.enable_reg = DA9052_BUCKCORE_REG + DA9052_ID_##_id, \
.enable_mask = 1 << (ebits),\
},\
.min_uV = (min) * 1000,\
.max_uV = (max) * 1000,\
.step_uV = (step) * 1000,\
.activate_bit = (abits),\
}

Definition at line 266 of file da9052-regulator.c.

#define DA9052_MAX_UA   3

Definition at line 37 of file da9052-regulator.c.

#define DA9052_MIN_UA   0

Definition at line 36 of file da9052-regulator.c.

Function Documentation

MODULE_ALIAS ( "platform:da9052-regulator )
MODULE_AUTHOR ( "David Dajun Chen <[email protected]>"  )
MODULE_DESCRIPTION ( "Power Regulator driver for Dialog DA9052 PMIC"  )
module_exit ( da9052_regulator_exit  )
MODULE_LICENSE ( "GPL"  )
subsys_initcall ( da9052_regulator_init  )