Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
core.h File Reference
#include <linux/mutex.h>
#include <linux/interrupt.h>
#include <linux/regmap.h>

Go to the source code of this file.

Data Structures

struct  wm8994
 

Macros

#define WM8994_NUM_GPIO_REGS   11
 
#define WM8994_NUM_LDO_REGS   2
 
#define WM8994_NUM_IRQ_REGS   2
 
#define WM8994_IRQ_TEMP_SHUT   0
 
#define WM8994_IRQ_MIC1_DET   1
 
#define WM8994_IRQ_MIC1_SHRT   2
 
#define WM8994_IRQ_MIC2_DET   3
 
#define WM8994_IRQ_MIC2_SHRT   4
 
#define WM8994_IRQ_FLL1_LOCK   5
 
#define WM8994_IRQ_FLL2_LOCK   6
 
#define WM8994_IRQ_SRC1_LOCK   7
 
#define WM8994_IRQ_SRC2_LOCK   8
 
#define WM8994_IRQ_AIF1DRC1_SIG_DET   9
 
#define WM8994_IRQ_AIF1DRC2_SIG_DET   10
 
#define WM8994_IRQ_AIF2DRC_SIG_DET   11
 
#define WM8994_IRQ_FIFOS_ERR   12
 
#define WM8994_IRQ_WSEQ_DONE   13
 
#define WM8994_IRQ_DCS_DONE   14
 
#define WM8994_IRQ_TEMP_WARN   15
 
#define WM8994_IRQ_GPIO(x)   (x + WM8994_IRQ_TEMP_WARN)
 

Enumerations

enum  wm8994_type { WM8994 = 0, WM8958 = 1, WM1811 = 2 }
 

Functions

int wm8994_reg_read (struct wm8994 *wm8994, unsigned short reg)
 
int wm8994_reg_write (struct wm8994 *wm8994, unsigned short reg, unsigned short val)
 
int wm8994_set_bits (struct wm8994 *wm8994, unsigned short reg, unsigned short mask, unsigned short val)
 
int wm8994_bulk_read (struct wm8994 *wm8994, unsigned short reg, int count, u16 *buf)
 
int wm8994_bulk_write (struct wm8994 *wm8994, unsigned short reg, int count, const u16 *buf)
 
int wm8994_irq_init (struct wm8994 *wm8994)
 
void wm8994_irq_exit (struct wm8994 *wm8994)
 

Macro Definition Documentation

#define WM8994_IRQ_AIF1DRC1_SIG_DET   9

Definition at line 44 of file core.h.

#define WM8994_IRQ_AIF1DRC2_SIG_DET   10

Definition at line 45 of file core.h.

#define WM8994_IRQ_AIF2DRC_SIG_DET   11

Definition at line 46 of file core.h.

#define WM8994_IRQ_DCS_DONE   14

Definition at line 49 of file core.h.

#define WM8994_IRQ_FIFOS_ERR   12

Definition at line 47 of file core.h.

#define WM8994_IRQ_FLL1_LOCK   5

Definition at line 40 of file core.h.

#define WM8994_IRQ_FLL2_LOCK   6

Definition at line 41 of file core.h.

#define WM8994_IRQ_GPIO (   x)    (x + WM8994_IRQ_TEMP_WARN)

Definition at line 53 of file core.h.

#define WM8994_IRQ_MIC1_DET   1

Definition at line 36 of file core.h.

#define WM8994_IRQ_MIC1_SHRT   2

Definition at line 37 of file core.h.

#define WM8994_IRQ_MIC2_DET   3

Definition at line 38 of file core.h.

#define WM8994_IRQ_MIC2_SHRT   4

Definition at line 39 of file core.h.

#define WM8994_IRQ_SRC1_LOCK   7

Definition at line 42 of file core.h.

#define WM8994_IRQ_SRC2_LOCK   8

Definition at line 43 of file core.h.

#define WM8994_IRQ_TEMP_SHUT   0

Definition at line 35 of file core.h.

#define WM8994_IRQ_TEMP_WARN   15

Definition at line 50 of file core.h.

#define WM8994_IRQ_WSEQ_DONE   13

Definition at line 48 of file core.h.

#define WM8994_NUM_GPIO_REGS   11

Definition at line 31 of file core.h.

#define WM8994_NUM_IRQ_REGS   2

Definition at line 33 of file core.h.

#define WM8994_NUM_LDO_REGS   2

Definition at line 32 of file core.h.

Enumeration Type Documentation

Enumerator:
WM8994 
WM8958 
WM1811 

Definition at line 22 of file core.h.

Function Documentation

int wm8994_bulk_read ( struct wm8994 wm8994,
unsigned short  reg,
int  count,
u16 buf 
)

wm8994_bulk_read: Read multiple WM8994 registers

: Device to read from : First register : Number of registers : Buffer to fill. The data will be returned big endian.

Definition at line 61 of file wm8994-core.c.

int wm8994_bulk_write ( struct wm8994 wm8994,
unsigned short  reg,
int  count,
const u16 buf 
)

wm8994_bulk_write: Write multiple WM8994 registers

: Device to write to : First register : Number of registers : Buffer to write from. Data must be big-endian formatted.

Definition at line 89 of file wm8994-core.c.

void wm8994_irq_exit ( struct wm8994 wm8994)

Definition at line 174 of file wm8994-irq.c.

int wm8994_irq_init ( struct wm8994 wm8994)

Definition at line 141 of file wm8994-irq.c.

int wm8994_reg_read ( struct wm8994 wm8994,
unsigned short  reg 
)

wm8994_reg_read: Read a single WM8994 register.

: Device to read from. : Register to read.

Definition at line 39 of file wm8994-core.c.

int wm8994_reg_write ( struct wm8994 wm8994,
unsigned short  reg,
unsigned short  val 
)

wm8994_reg_write: Write a single WM8994 register.

: Device to write to. : Register to write to. : Value to write.

Definition at line 74 of file wm8994-core.c.

int wm8994_set_bits ( struct wm8994 wm8994,
unsigned short  reg,
unsigned short  mask,
unsigned short  val 
)

wm8994_set_bits: Set the value of a bitfield in a WM8994 register

: Device to write to. : Register to write to. : Mask of bits to set. : Value to set (unshifted)

Definition at line 104 of file wm8994-core.c.