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

Go to the source code of this file.

Data Structures

struct  da903x_regulator_info
 

Macros

#define DA9030_INVAL   (-1)
 
#define DA9030_LDO1011   (0x10)
 
#define DA9030_LDO15   (0x11)
 
#define DA9030_LDO1416   (0x12)
 
#define DA9030_LDO1819   (0x13)
 
#define DA9030_LDO17   (0x14)
 
#define DA9030_BUCK2DVM1   (0x15)
 
#define DA9030_BUCK2DVM2   (0x16)
 
#define DA9030_RCTL11   (0x17)
 
#define DA9030_RCTL21   (0x18)
 
#define DA9030_LDO1   (0x90)
 
#define DA9030_LDO23   (0x91)
 
#define DA9030_LDO45   (0x92)
 
#define DA9030_LDO6   (0x93)
 
#define DA9030_LDO78   (0x94)
 
#define DA9030_LDO912   (0x95)
 
#define DA9030_BUCK   (0x96)
 
#define DA9030_RCTL12   (0x97)
 
#define DA9030_RCTL22   (0x98)
 
#define DA9030_LDO_UNLOCK   (0xa0)
 
#define DA9030_LDO_UNLOCK_MASK   (0xe0)
 
#define DA9034_OVER1   (0x10)
 
#define DA9034_INVAL   (-1)
 
#define DA9034_OVER2   (0x11)
 
#define DA9034_OVER3   (0x12)
 
#define DA9034_LDO643   (0x13)
 
#define DA9034_LDO987   (0x14)
 
#define DA9034_LDO1110   (0x15)
 
#define DA9034_LDO1312   (0x16)
 
#define DA9034_LDO1514   (0x17)
 
#define DA9034_VCC1   (0x20)
 
#define DA9034_ADTV1   (0x23)
 
#define DA9034_ADTV2   (0x24)
 
#define DA9034_AVRC   (0x25)
 
#define DA9034_CDTV1   (0x26)
 
#define DA9034_CDTV2   (0x27)
 
#define DA9034_CVRC   (0x28)
 
#define DA9034_SDTV1   (0x29)
 
#define DA9034_SDTV2   (0x2a)
 
#define DA9034_SVRC   (0x2b)
 
#define DA9034_MDTV1   (0x32)
 
#define DA9034_MDTV2   (0x33)
 
#define DA9034_MVRC   (0x34)
 
#define DA9035_OVER3   (0x12)
 
#define DA9035_VCC2   (0x1f)
 
#define DA9035_3DTV1   (0x2c)
 
#define DA9035_3DTV2   (0x2d)
 
#define DA9035_3VRC   (0x2e)
 
#define DA9035_AUTOSKIP   (0x2f)
 
#define DA903x_LDO(_pmic, _id, min, max, step, vreg, shift, nbits, ereg, ebit)
 
#define DA903x_DVC(_pmic, _id, min, max, step, vreg, nbits, ureg, ubit, ereg, ebit)
 
#define DA9034_LDO(_id, min, max, step, vreg, shift, nbits, ereg, ebit)   DA903x_LDO(DA9034, _id, min, max, step, vreg, shift, nbits, ereg, ebit)
 
#define DA9030_LDO(_id, min, max, step, vreg, shift, nbits, ereg, ebit)   DA903x_LDO(DA9030, _id, min, max, step, vreg, shift, nbits, ereg, ebit)
 
#define DA9030_DVC(_id, min, max, step, vreg, nbits, ureg, ubit, ereg, ebit)
 
#define DA9034_DVC(_id, min, max, step, vreg, nbits, ureg, ubit, ereg, ebit)
 
#define DA9035_DVC(_id, min, max, step, vreg, nbits, ureg, ubit, ereg, ebit)
 

Functions

 subsys_initcall (da903x_regulator_init)
 
 module_exit (da903x_regulator_exit)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Eric Miao <[email protected]>""Mike Rapoport <[email protected]>")
 
 MODULE_DESCRIPTION ("Regulator Driver for Dialog Semiconductor DA903X PMIC")
 
 MODULE_ALIAS ("platform:da903x-regulator")
 

Macro Definition Documentation

#define DA9030_BUCK   (0x96)

Definition at line 38 of file da903x.c.

#define DA9030_BUCK2DVM1   (0x15)

Definition at line 28 of file da903x.c.

#define DA9030_BUCK2DVM2   (0x16)

Definition at line 29 of file da903x.c.

#define DA9030_DVC (   _id,
  min,
  max,
  step,
  vreg,
  nbits,
  ureg,
  ubit,
  ereg,
  ebit 
)
Value:
DA903x_DVC(DA9030, _id, min, max, step, vreg, nbits, ureg, ubit, \
ereg, ebit)

Definition at line 390 of file da903x.c.

#define DA9030_INVAL   (-1)

Definition at line 22 of file da903x.c.

#define DA9030_LDO (   _id,
  min,
  max,
  step,
  vreg,
  shift,
  nbits,
  ereg,
  ebit 
)    DA903x_LDO(DA9030, _id, min, max, step, vreg, shift, nbits, ereg, ebit)

Definition at line 387 of file da903x.c.

#define DA9030_LDO1   (0x90)

Definition at line 32 of file da903x.c.

#define DA9030_LDO1011   (0x10)

Definition at line 23 of file da903x.c.

#define DA9030_LDO1416   (0x12)

Definition at line 25 of file da903x.c.

#define DA9030_LDO15   (0x11)

Definition at line 24 of file da903x.c.

#define DA9030_LDO17   (0x14)

Definition at line 27 of file da903x.c.

#define DA9030_LDO1819   (0x13)

Definition at line 26 of file da903x.c.

#define DA9030_LDO23   (0x91)

Definition at line 33 of file da903x.c.

#define DA9030_LDO45   (0x92)

Definition at line 34 of file da903x.c.

#define DA9030_LDO6   (0x93)

Definition at line 35 of file da903x.c.

#define DA9030_LDO78   (0x94)

Definition at line 36 of file da903x.c.

#define DA9030_LDO912   (0x95)

Definition at line 37 of file da903x.c.

#define DA9030_LDO_UNLOCK   (0xa0)

Definition at line 41 of file da903x.c.

#define DA9030_LDO_UNLOCK_MASK   (0xe0)

Definition at line 42 of file da903x.c.

#define DA9030_RCTL11   (0x17)

Definition at line 30 of file da903x.c.

#define DA9030_RCTL12   (0x97)

Definition at line 39 of file da903x.c.

#define DA9030_RCTL21   (0x18)

Definition at line 31 of file da903x.c.

#define DA9030_RCTL22   (0x98)

Definition at line 40 of file da903x.c.

#define DA9034_ADTV1   (0x23)

Definition at line 55 of file da903x.c.

#define DA9034_ADTV2   (0x24)

Definition at line 56 of file da903x.c.

#define DA9034_AVRC   (0x25)

Definition at line 57 of file da903x.c.

#define DA9034_CDTV1   (0x26)

Definition at line 58 of file da903x.c.

#define DA9034_CDTV2   (0x27)

Definition at line 59 of file da903x.c.

#define DA9034_CVRC   (0x28)

Definition at line 60 of file da903x.c.

#define DA9034_DVC (   _id,
  min,
  max,
  step,
  vreg,
  nbits,
  ureg,
  ubit,
  ereg,
  ebit 
)
Value:
DA903x_DVC(DA9034, _id, min, max, step, vreg, nbits, ureg, ubit, \
ereg, ebit)

Definition at line 394 of file da903x.c.

#define DA9034_INVAL   (-1)

Definition at line 46 of file da903x.c.

#define DA9034_LDO (   _id,
  min,
  max,
  step,
  vreg,
  shift,
  nbits,
  ereg,
  ebit 
)    DA903x_LDO(DA9034, _id, min, max, step, vreg, shift, nbits, ereg, ebit)

Definition at line 384 of file da903x.c.

#define DA9034_LDO1110   (0x15)

Definition at line 51 of file da903x.c.

#define DA9034_LDO1312   (0x16)

Definition at line 52 of file da903x.c.

#define DA9034_LDO1514   (0x17)

Definition at line 53 of file da903x.c.

#define DA9034_LDO643   (0x13)

Definition at line 49 of file da903x.c.

#define DA9034_LDO987   (0x14)

Definition at line 50 of file da903x.c.

#define DA9034_MDTV1   (0x32)

Definition at line 64 of file da903x.c.

#define DA9034_MDTV2   (0x33)

Definition at line 65 of file da903x.c.

#define DA9034_MVRC   (0x34)

Definition at line 66 of file da903x.c.

#define DA9034_OVER1   (0x10)

Definition at line 43 of file da903x.c.

#define DA9034_OVER2   (0x11)

Definition at line 47 of file da903x.c.

#define DA9034_OVER3   (0x12)

Definition at line 48 of file da903x.c.

#define DA9034_SDTV1   (0x29)

Definition at line 61 of file da903x.c.

#define DA9034_SDTV2   (0x2a)

Definition at line 62 of file da903x.c.

#define DA9034_SVRC   (0x2b)

Definition at line 63 of file da903x.c.

#define DA9034_VCC1   (0x20)

Definition at line 54 of file da903x.c.

#define DA9035_3DTV1   (0x2c)

Definition at line 71 of file da903x.c.

#define DA9035_3DTV2   (0x2d)

Definition at line 72 of file da903x.c.

#define DA9035_3VRC   (0x2e)

Definition at line 73 of file da903x.c.

#define DA9035_AUTOSKIP   (0x2f)

Definition at line 74 of file da903x.c.

#define DA9035_DVC (   _id,
  min,
  max,
  step,
  vreg,
  nbits,
  ureg,
  ubit,
  ereg,
  ebit 
)
Value:
DA903x_DVC(DA9035, _id, min, max, step, vreg, nbits, ureg, ubit, \
ereg, ebit)

Definition at line 398 of file da903x.c.

#define DA9035_OVER3   (0x12)

Definition at line 69 of file da903x.c.

#define DA9035_VCC2   (0x1f)

Definition at line 70 of file da903x.c.

#define DA903x_DVC (   _pmic,
  _id,
  min,
  max,
  step,
  vreg,
  nbits,
  ureg,
  ubit,
  ereg,
  ebit 
)
Value:
{ \
.desc = { \
.name = #_id, \
.ops = &da9034_regulator_dvc_ops, \
.type = REGULATOR_VOLTAGE, \
.id = _pmic##_ID_##_id, \
.n_voltages = (step) ? ((max - min) / step + 1) : 1, \
.min_uV = (min) * 1000, \
.uV_step = (step) * 1000, \
}, \
.max_uV = (max) * 1000, \
.vol_reg = _pmic##_##vreg, \
.vol_shift = (0), \
.vol_nbits = (nbits), \
.update_reg = _pmic##_##ureg, \
.update_bit = (ubit), \
.enable_reg = _pmic##_##ereg, \
.enable_bit = (ebit), \
}

Definition at line 362 of file da903x.c.

#define DA903x_LDO (   _pmic,
  _id,
  min,
  max,
  step,
  vreg,
  shift,
  nbits,
  ereg,
  ebit 
)
Value:
{ \
.desc = { \
.name = "LDO" #_id, \
.ops = &da903x_regulator_ldo_ops, \
.type = REGULATOR_VOLTAGE, \
.id = _pmic##_ID_LDO##_id, \
.n_voltages = (step) ? ((max - min) / step + 1) : 1, \
.min_uV = (min) * 1000, \
.uV_step = (step) * 1000, \
}, \
.max_uV = (max) * 1000, \
.vol_reg = _pmic##_##vreg, \
.vol_shift = (shift), \
.vol_nbits = (nbits), \
.enable_reg = _pmic##_##ereg, \
.enable_bit = (ebit), \
}

Definition at line 342 of file da903x.c.

Function Documentation

MODULE_ALIAS ( "platform:da903x-regulator )
MODULE_AUTHOR ( "Eric Miao <[email protected]>""Mike Rapoport <[email protected]>"  )
MODULE_DESCRIPTION ( "Regulator Driver for Dialog Semiconductor DA903X PMIC"  )
module_exit ( da903x_regulator_exit  )
MODULE_LICENSE ( "GPL"  )
subsys_initcall ( da903x_regulator_init  )