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/module.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/i2c.h>
#include <linux/mfd/da903x.h>
#include <linux/slab.h>

Go to the source code of this file.

Data Structures

struct  da903x_chip_ops
 
struct  da903x_chip
 

Macros

#define DA9030_CHIP_ID   0x00
 
#define DA9030_EVENT_A   0x01
 
#define DA9030_EVENT_B   0x02
 
#define DA9030_EVENT_C   0x03
 
#define DA9030_STATUS   0x04
 
#define DA9030_IRQ_MASK_A   0x05
 
#define DA9030_IRQ_MASK_B   0x06
 
#define DA9030_IRQ_MASK_C   0x07
 
#define DA9030_SYS_CTRL_A   0x08
 
#define DA9030_SYS_CTRL_B   0x09
 
#define DA9030_FAULT_LOG   0x0a
 
#define DA9034_CHIP_ID   0x00
 
#define DA9034_EVENT_A   0x01
 
#define DA9034_EVENT_B   0x02
 
#define DA9034_EVENT_C   0x03
 
#define DA9034_EVENT_D   0x04
 
#define DA9034_STATUS_A   0x05
 
#define DA9034_STATUS_B   0x06
 
#define DA9034_IRQ_MASK_A   0x07
 
#define DA9034_IRQ_MASK_B   0x08
 
#define DA9034_IRQ_MASK_C   0x09
 
#define DA9034_IRQ_MASK_D   0x0a
 
#define DA9034_SYS_CTRL_A   0x0b
 
#define DA9034_SYS_CTRL_B   0x0c
 
#define DA9034_FAULT_LOG   0x0d
 

Functions

int da903x_register_notifier (struct device *dev, struct notifier_block *nb, unsigned int events)
 
 EXPORT_SYMBOL_GPL (da903x_register_notifier)
 
int da903x_unregister_notifier (struct device *dev, struct notifier_block *nb, unsigned int events)
 
 EXPORT_SYMBOL_GPL (da903x_unregister_notifier)
 
int da903x_write (struct device *dev, int reg, uint8_t val)
 
 EXPORT_SYMBOL_GPL (da903x_write)
 
int da903x_writes (struct device *dev, int reg, int len, uint8_t *val)
 
 EXPORT_SYMBOL_GPL (da903x_writes)
 
int da903x_read (struct device *dev, int reg, uint8_t *val)
 
 EXPORT_SYMBOL_GPL (da903x_read)
 
int da903x_reads (struct device *dev, int reg, int len, uint8_t *val)
 
 EXPORT_SYMBOL_GPL (da903x_reads)
 
int da903x_set_bits (struct device *dev, int reg, uint8_t bit_mask)
 
 EXPORT_SYMBOL_GPL (da903x_set_bits)
 
int da903x_clr_bits (struct device *dev, int reg, uint8_t bit_mask)
 
 EXPORT_SYMBOL_GPL (da903x_clr_bits)
 
int da903x_update (struct device *dev, int reg, uint8_t val, uint8_t mask)
 
 EXPORT_SYMBOL_GPL (da903x_update)
 
int da903x_query_status (struct device *dev, unsigned int sbits)
 
 EXPORT_SYMBOL (da903x_query_status)
 
 MODULE_DEVICE_TABLE (i2c, da903x_id_table)
 
 subsys_initcall (da903x_init)
 
 module_exit (da903x_exit)
 
 MODULE_DESCRIPTION ("PMIC Driver for Dialog Semiconductor DA9034")
 
 MODULE_AUTHOR ("Eric Miao <[email protected]>""Mike Rapoport <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define DA9030_CHIP_ID   0x00

Definition at line 23 of file da903x.c.

#define DA9030_EVENT_A   0x01

Definition at line 24 of file da903x.c.

#define DA9030_EVENT_B   0x02

Definition at line 25 of file da903x.c.

#define DA9030_EVENT_C   0x03

Definition at line 26 of file da903x.c.

#define DA9030_FAULT_LOG   0x0a

Definition at line 33 of file da903x.c.

#define DA9030_IRQ_MASK_A   0x05

Definition at line 28 of file da903x.c.

#define DA9030_IRQ_MASK_B   0x06

Definition at line 29 of file da903x.c.

#define DA9030_IRQ_MASK_C   0x07

Definition at line 30 of file da903x.c.

#define DA9030_STATUS   0x04

Definition at line 27 of file da903x.c.

#define DA9030_SYS_CTRL_A   0x08

Definition at line 31 of file da903x.c.

#define DA9030_SYS_CTRL_B   0x09

Definition at line 32 of file da903x.c.

#define DA9034_CHIP_ID   0x00

Definition at line 35 of file da903x.c.

#define DA9034_EVENT_A   0x01

Definition at line 36 of file da903x.c.

#define DA9034_EVENT_B   0x02

Definition at line 37 of file da903x.c.

#define DA9034_EVENT_C   0x03

Definition at line 38 of file da903x.c.

#define DA9034_EVENT_D   0x04

Definition at line 39 of file da903x.c.

#define DA9034_FAULT_LOG   0x0d

Definition at line 48 of file da903x.c.

#define DA9034_IRQ_MASK_A   0x07

Definition at line 42 of file da903x.c.

#define DA9034_IRQ_MASK_B   0x08

Definition at line 43 of file da903x.c.

#define DA9034_IRQ_MASK_C   0x09

Definition at line 44 of file da903x.c.

#define DA9034_IRQ_MASK_D   0x0a

Definition at line 45 of file da903x.c.

#define DA9034_STATUS_A   0x05

Definition at line 40 of file da903x.c.

#define DA9034_STATUS_B   0x06

Definition at line 41 of file da903x.c.

#define DA9034_SYS_CTRL_A   0x0b

Definition at line 46 of file da903x.c.

#define DA9034_SYS_CTRL_B   0x0c

Definition at line 47 of file da903x.c.

Function Documentation

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

Definition at line 195 of file da903x.c.

int da903x_query_status ( struct device dev,
unsigned int  sbits 
)

Definition at line 239 of file da903x.c.

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

Definition at line 161 of file da903x.c.

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

Definition at line 167 of file da903x.c.

int da903x_register_notifier ( struct device dev,
struct notifier_block nb,
unsigned int  events 
)

Definition at line 129 of file da903x.c.

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

Definition at line 173 of file da903x.c.

int da903x_unregister_notifier ( struct device dev,
struct notifier_block nb,
unsigned int  events 
)

Definition at line 139 of file da903x.c.

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

Definition at line 217 of file da903x.c.

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

Definition at line 149 of file da903x.c.

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

Definition at line 155 of file da903x.c.

EXPORT_SYMBOL ( da903x_query_status  )
EXPORT_SYMBOL_GPL ( da903x_register_notifier  )
EXPORT_SYMBOL_GPL ( da903x_unregister_notifier  )
EXPORT_SYMBOL_GPL ( da903x_write  )
EXPORT_SYMBOL_GPL ( da903x_writes  )
EXPORT_SYMBOL_GPL ( da903x_read  )
EXPORT_SYMBOL_GPL ( da903x_reads  )
EXPORT_SYMBOL_GPL ( da903x_set_bits  )
EXPORT_SYMBOL_GPL ( da903x_clr_bits  )
EXPORT_SYMBOL_GPL ( da903x_update  )
MODULE_AUTHOR ( "Eric Miao <[email protected]>""Mike Rapoport <[email protected]>"  )
MODULE_DESCRIPTION ( "PMIC Driver for Dialog Semiconductor DA9034"  )
MODULE_DEVICE_TABLE ( i2c  ,
da903x_id_table   
)
module_exit ( da903x_exit  )
MODULE_LICENSE ( "GPL"  )
subsys_initcall ( da903x_init  )