Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
tps65023-regulator.c File Reference
#include <linux/kernel.h>
#include <linux/module.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/i2c.h>
#include <linux/slab.h>
#include <linux/regmap.h>

Go to the source code of this file.

Data Structures

struct  tps_info
 
struct  tps_pmic
 
struct  tps_driver_data
 

Macros

#define TPS65023_REG_VERSION   0
 
#define TPS65023_REG_PGOODZ   1
 
#define TPS65023_REG_MASK   2
 
#define TPS65023_REG_REG_CTRL   3
 
#define TPS65023_REG_CON_CTRL   4
 
#define TPS65023_REG_CON_CTRL2   5
 
#define TPS65023_REG_DEF_CORE   6
 
#define TPS65023_REG_DEFSLEW   7
 
#define TPS65023_REG_LDO_CTRL   8
 
#define TPS65023_PGOODZ_PWRFAILZ   BIT(7)
 
#define TPS65023_PGOODZ_LOWBATTZ   BIT(6)
 
#define TPS65023_PGOODZ_VDCDC1   BIT(5)
 
#define TPS65023_PGOODZ_VDCDC2   BIT(4)
 
#define TPS65023_PGOODZ_VDCDC3   BIT(3)
 
#define TPS65023_PGOODZ_LDO2   BIT(2)
 
#define TPS65023_PGOODZ_LDO1   BIT(1)
 
#define TPS65023_MASK_PWRFAILZ   BIT(7)
 
#define TPS65023_MASK_LOWBATTZ   BIT(6)
 
#define TPS65023_MASK_VDCDC1   BIT(5)
 
#define TPS65023_MASK_VDCDC2   BIT(4)
 
#define TPS65023_MASK_VDCDC3   BIT(3)
 
#define TPS65023_MASK_LDO2   BIT(2)
 
#define TPS65023_MASK_LDO1   BIT(1)
 
#define TPS65023_REG_CTRL_VDCDC1_EN   BIT(5)
 
#define TPS65023_REG_CTRL_VDCDC2_EN   BIT(4)
 
#define TPS65023_REG_CTRL_VDCDC3_EN   BIT(3)
 
#define TPS65023_REG_CTRL_LDO2_EN   BIT(2)
 
#define TPS65023_REG_CTRL_LDO1_EN   BIT(1)
 
#define TPS65023_REG_CTRL2_GO   BIT(7)
 
#define TPS65023_REG_CTRL2_CORE_ADJ   BIT(6)
 
#define TPS65023_REG_CTRL2_DCDC2   BIT(2)
 
#define TPS65023_REG_CTRL2_DCDC1   BIT(1)
 
#define TPS65023_REG_CTRL2_DCDC3   BIT(0)
 
#define TPS65023_NUM_DCDC   3
 
#define TPS65023_NUM_LDO   2
 
#define TPS65023_NUM_REGULATOR   (TPS65023_NUM_DCDC + TPS65023_NUM_LDO)
 
#define TPS65023_DCDC_1   0
 
#define TPS65023_DCDC_2   1
 
#define TPS65023_DCDC_3   2
 
#define TPS65023_LDO_1   3
 
#define TPS65023_LDO_2   4
 
#define TPS65023_MAX_REG_ID   TPS65023_LDO_2
 

Functions

 MODULE_DEVICE_TABLE (i2c, tps_65023_id)
 
 subsys_initcall (tps_65023_init)
 
 module_exit (tps_65023_cleanup)
 
 MODULE_AUTHOR ("Texas Instruments")
 
 MODULE_DESCRIPTION ("TPS65023 voltage regulator driver")
 
 MODULE_LICENSE ("GPL v2")
 

Macro Definition Documentation

#define TPS65023_DCDC_1   0

Definition at line 80 of file tps65023-regulator.c.

#define TPS65023_DCDC_2   1

Definition at line 81 of file tps65023-regulator.c.

#define TPS65023_DCDC_3   2

Definition at line 82 of file tps65023-regulator.c.

#define TPS65023_LDO_1   3

Definition at line 84 of file tps65023-regulator.c.

#define TPS65023_LDO_2   4

Definition at line 85 of file tps65023-regulator.c.

#define TPS65023_MASK_LDO1   BIT(1)

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

#define TPS65023_MASK_LDO2   BIT(2)

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

#define TPS65023_MASK_LOWBATTZ   BIT(6)

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

#define TPS65023_MASK_PWRFAILZ   BIT(7)

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

#define TPS65023_MASK_VDCDC1   BIT(5)

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

#define TPS65023_MASK_VDCDC2   BIT(4)

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

#define TPS65023_MASK_VDCDC3   BIT(3)

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

#define TPS65023_MAX_REG_ID   TPS65023_LDO_2

Definition at line 87 of file tps65023-regulator.c.

#define TPS65023_NUM_DCDC   3

Definition at line 73 of file tps65023-regulator.c.

#define TPS65023_NUM_LDO   2

Definition at line 75 of file tps65023-regulator.c.

#define TPS65023_NUM_REGULATOR   (TPS65023_NUM_DCDC + TPS65023_NUM_LDO)

Definition at line 77 of file tps65023-regulator.c.

#define TPS65023_PGOODZ_LDO1   BIT(1)

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

#define TPS65023_PGOODZ_LDO2   BIT(2)

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

#define TPS65023_PGOODZ_LOWBATTZ   BIT(6)

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

#define TPS65023_PGOODZ_PWRFAILZ   BIT(7)

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

#define TPS65023_PGOODZ_VDCDC1   BIT(5)

Definition at line 43 of file tps65023-regulator.c.

#define TPS65023_PGOODZ_VDCDC2   BIT(4)

Definition at line 44 of file tps65023-regulator.c.

#define TPS65023_PGOODZ_VDCDC3   BIT(3)

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

#define TPS65023_REG_CON_CTRL   4

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

#define TPS65023_REG_CON_CTRL2   5

Definition at line 35 of file tps65023-regulator.c.

#define TPS65023_REG_CTRL2_CORE_ADJ   BIT(6)

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

#define TPS65023_REG_CTRL2_DCDC1   BIT(1)

Definition at line 69 of file tps65023-regulator.c.

#define TPS65023_REG_CTRL2_DCDC2   BIT(2)

Definition at line 68 of file tps65023-regulator.c.

#define TPS65023_REG_CTRL2_DCDC3   BIT(0)

Definition at line 70 of file tps65023-regulator.c.

#define TPS65023_REG_CTRL2_GO   BIT(7)

Definition at line 66 of file tps65023-regulator.c.

#define TPS65023_REG_CTRL_LDO1_EN   BIT(1)

Definition at line 63 of file tps65023-regulator.c.

#define TPS65023_REG_CTRL_LDO2_EN   BIT(2)

Definition at line 62 of file tps65023-regulator.c.

#define TPS65023_REG_CTRL_VDCDC1_EN   BIT(5)

Definition at line 59 of file tps65023-regulator.c.

#define TPS65023_REG_CTRL_VDCDC2_EN   BIT(4)

Definition at line 60 of file tps65023-regulator.c.

#define TPS65023_REG_CTRL_VDCDC3_EN   BIT(3)

Definition at line 61 of file tps65023-regulator.c.

#define TPS65023_REG_DEF_CORE   6

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

#define TPS65023_REG_DEFSLEW   7

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

#define TPS65023_REG_LDO_CTRL   8

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

#define TPS65023_REG_MASK   2

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

#define TPS65023_REG_PGOODZ   1

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

#define TPS65023_REG_REG_CTRL   3

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

#define TPS65023_REG_VERSION   0

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

Function Documentation

MODULE_AUTHOR ( "Texas Instruments"  )
MODULE_DESCRIPTION ( "TPS65023 voltage regulator driver )
MODULE_DEVICE_TABLE ( i2c  ,
tps_65023_id   
)
module_exit ( tps_65023_cleanup  )
MODULE_LICENSE ( "GPL v2 )
subsys_initcall ( tps_65023_init  )