Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
tps6586x.c File Reference
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/regmap.h>
#include <linux/regulator/of_regulator.h>
#include <linux/regulator/machine.h>
#include <linux/mfd/core.h>
#include <linux/mfd/tps6586x.h>

Go to the source code of this file.

Data Structures

struct  tps6586x_irq_data
 
struct  tps6586x
 

Macros

#define TPS6586X_SUPPLYENE   0x14
 
#define EXITSLREQ_BIT   BIT(1)
 
#define SLEEP_MODE_BIT   BIT(3)
 
#define TPS6586X_INT_ACK1   0xb5
 
#define TPS6586X_INT_ACK2   0xb6
 
#define TPS6586X_INT_ACK3   0xb7
 
#define TPS6586X_INT_ACK4   0xb8
 
#define TPS6586X_INT_MASK1   0xb0
 
#define TPS6586X_INT_MASK2   0xb1
 
#define TPS6586X_INT_MASK3   0xb2
 
#define TPS6586X_INT_MASK4   0xb3
 
#define TPS6586X_INT_MASK5   0xb4
 
#define TPS6586X_VERSIONCRC   0xcd
 
#define TPS6586X_MAX_REGISTER   (TPS6586X_VERSIONCRC + 1)
 
#define TPS6586X_IRQ(_reg, _mask)
 

Functions

int tps6586x_write (struct device *dev, int reg, uint8_t val)
 
 EXPORT_SYMBOL_GPL (tps6586x_write)
 
int tps6586x_writes (struct device *dev, int reg, int len, uint8_t *val)
 
 EXPORT_SYMBOL_GPL (tps6586x_writes)
 
int tps6586x_read (struct device *dev, int reg, uint8_t *val)
 
 EXPORT_SYMBOL_GPL (tps6586x_read)
 
int tps6586x_reads (struct device *dev, int reg, int len, uint8_t *val)
 
 EXPORT_SYMBOL_GPL (tps6586x_reads)
 
int tps6586x_set_bits (struct device *dev, int reg, uint8_t bit_mask)
 
 EXPORT_SYMBOL_GPL (tps6586x_set_bits)
 
int tps6586x_clr_bits (struct device *dev, int reg, uint8_t bit_mask)
 
 EXPORT_SYMBOL_GPL (tps6586x_clr_bits)
 
int tps6586x_update (struct device *dev, int reg, uint8_t val, uint8_t mask)
 
 EXPORT_SYMBOL_GPL (tps6586x_update)
 
 MODULE_DEVICE_TABLE (i2c, tps6586x_id_table)
 
 subsys_initcall (tps6586x_init)
 
 module_exit (tps6586x_exit)
 
 MODULE_DESCRIPTION ("TPS6586X core driver")
 
 MODULE_AUTHOR ("Mike Rapoport <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define EXITSLREQ_BIT   BIT(1)

Definition at line 34 of file tps6586x.c.

#define SLEEP_MODE_BIT   BIT(3)

Definition at line 35 of file tps6586x.c.

#define TPS6586X_INT_ACK1   0xb5

Definition at line 38 of file tps6586x.c.

#define TPS6586X_INT_ACK2   0xb6

Definition at line 39 of file tps6586x.c.

#define TPS6586X_INT_ACK3   0xb7

Definition at line 40 of file tps6586x.c.

#define TPS6586X_INT_ACK4   0xb8

Definition at line 41 of file tps6586x.c.

#define TPS6586X_INT_MASK1   0xb0

Definition at line 44 of file tps6586x.c.

#define TPS6586X_INT_MASK2   0xb1

Definition at line 45 of file tps6586x.c.

#define TPS6586X_INT_MASK3   0xb2

Definition at line 46 of file tps6586x.c.

#define TPS6586X_INT_MASK4   0xb3

Definition at line 47 of file tps6586x.c.

#define TPS6586X_INT_MASK5   0xb4

Definition at line 48 of file tps6586x.c.

#define TPS6586X_IRQ (   _reg,
  _mask 
)
Value:
{ \
.mask_reg = (_reg) - TPS6586X_INT_MASK1, \
.mask_mask = (_mask), \
}

Definition at line 61 of file tps6586x.c.

#define TPS6586X_MAX_REGISTER   (TPS6586X_VERSIONCRC + 1)

Definition at line 54 of file tps6586x.c.

#define TPS6586X_SUPPLYENE   0x14

Definition at line 33 of file tps6586x.c.

#define TPS6586X_VERSIONCRC   0xcd

Definition at line 51 of file tps6586x.c.

Function Documentation

EXPORT_SYMBOL_GPL ( tps6586x_write  )
EXPORT_SYMBOL_GPL ( tps6586x_writes  )
EXPORT_SYMBOL_GPL ( tps6586x_read  )
EXPORT_SYMBOL_GPL ( tps6586x_reads  )
EXPORT_SYMBOL_GPL ( tps6586x_set_bits  )
EXPORT_SYMBOL_GPL ( tps6586x_clr_bits  )
EXPORT_SYMBOL_GPL ( tps6586x_update  )
MODULE_AUTHOR ( "Mike Rapoport <[email protected]>"  )
MODULE_DESCRIPTION ( "TPS6586X core driver )
MODULE_DEVICE_TABLE ( i2c  ,
tps6586x_id_table   
)
module_exit ( tps6586x_exit  )
MODULE_LICENSE ( "GPL"  )
subsys_initcall ( tps6586x_init  )
int tps6586x_clr_bits ( struct device dev,
int  reg,
uint8_t  bit_mask 
)

Definition at line 171 of file tps6586x.c.

int tps6586x_read ( struct device dev,
int  reg,
uint8_t val 
)

Definition at line 142 of file tps6586x.c.

int tps6586x_reads ( struct device dev,
int  reg,
int  len,
uint8_t val 
)

Definition at line 155 of file tps6586x.c.

int tps6586x_set_bits ( struct device dev,
int  reg,
uint8_t  bit_mask 
)

Definition at line 163 of file tps6586x.c.

int tps6586x_update ( struct device dev,
int  reg,
uint8_t  val,
uint8_t  mask 
)

Definition at line 179 of file tps6586x.c.

int tps6586x_write ( struct device dev,
int  reg,
uint8_t  val 
)

Definition at line 126 of file tps6586x.c.

int tps6586x_writes ( struct device dev,
int  reg,
int  len,
uint8_t val 
)

Definition at line 134 of file tps6586x.c.