Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
wm831x-core.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/bcd.h>
#include <linux/delay.h>
#include <linux/mfd/core.h>
#include <linux/slab.h>
#include <linux/err.h>
#include <linux/mfd/wm831x/core.h>
#include <linux/mfd/wm831x/pdata.h>
#include <linux/mfd/wm831x/irq.h>
#include <linux/mfd/wm831x/auxadc.h>
#include <linux/mfd/wm831x/otp.h>
#include <linux/mfd/wm831x/pmu.h>
#include <linux/mfd/wm831x/regulator.h>

Go to the source code of this file.

Functions

 EXPORT_SYMBOL_GPL (wm831x_isinkv_values)
 
void wm831x_reg_lock (struct wm831x *wm831x)
 
 EXPORT_SYMBOL_GPL (wm831x_reg_lock)
 
int wm831x_reg_unlock (struct wm831x *wm831x)
 
 EXPORT_SYMBOL_GPL (wm831x_reg_unlock)
 
int wm831x_reg_read (struct wm831x *wm831x, unsigned short reg)
 
 EXPORT_SYMBOL_GPL (wm831x_reg_read)
 
int wm831x_bulk_read (struct wm831x *wm831x, unsigned short reg, int count, u16 *buf)
 
 EXPORT_SYMBOL_GPL (wm831x_bulk_read)
 
int wm831x_reg_write (struct wm831x *wm831x, unsigned short reg, unsigned short val)
 
 EXPORT_SYMBOL_GPL (wm831x_reg_write)
 
int wm831x_set_bits (struct wm831x *wm831x, unsigned short reg, unsigned short mask, unsigned short val)
 
 EXPORT_SYMBOL_GPL (wm831x_set_bits)
 
 EXPORT_SYMBOL_GPL (wm831x_regmap_config)
 
int wm831x_device_init (struct wm831x *wm831x, unsigned long id, int irq)
 
void wm831x_device_exit (struct wm831x *wm831x)
 
int wm831x_device_suspend (struct wm831x *wm831x)
 
void wm831x_device_shutdown (struct wm831x *wm831x)
 
 EXPORT_SYMBOL_GPL (wm831x_device_shutdown)
 
 MODULE_DESCRIPTION ("Core support for the WM831X AudioPlus PMIC")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Mark Brown")
 

Variables

int wm831x_isinkv_values [WM831X_ISINK_MAX_ISEL+1]
 
struct regmap_config wm831x_regmap_config
 

Function Documentation

EXPORT_SYMBOL_GPL ( wm831x_isinkv_values  )
EXPORT_SYMBOL_GPL ( wm831x_reg_lock  )
EXPORT_SYMBOL_GPL ( wm831x_reg_unlock  )
EXPORT_SYMBOL_GPL ( wm831x_reg_read  )
EXPORT_SYMBOL_GPL ( wm831x_bulk_read  )
EXPORT_SYMBOL_GPL ( wm831x_reg_write  )
EXPORT_SYMBOL_GPL ( wm831x_set_bits  )
EXPORT_SYMBOL_GPL ( wm831x_regmap_config  )
EXPORT_SYMBOL_GPL ( wm831x_device_shutdown  )
MODULE_AUTHOR ( "Mark Brown"  )
MODULE_DESCRIPTION ( "Core support for the WM831X AudioPlus PMIC"  )
MODULE_LICENSE ( "GPL"  )
int wm831x_bulk_read ( struct wm831x wm831x,
unsigned short  reg,
int  count,
u16 buf 
)

wm831x_bulk_read: Read multiple WM831x registers

: Device to read from : First register : Number of registers : Buffer to fill.

Definition at line 539 of file wm831x-core.c.

void wm831x_device_exit ( struct wm831x wm831x)

Definition at line 1882 of file wm831x-core.c.

int wm831x_device_init ( struct wm831x wm831x,
unsigned long  id,
int  irq 
)

Definition at line 1619 of file wm831x-core.c.

void wm831x_device_shutdown ( struct wm831x wm831x)

Definition at line 1926 of file wm831x-core.c.

int wm831x_device_suspend ( struct wm831x wm831x)

Definition at line 1890 of file wm831x-core.c.

void wm831x_reg_lock ( struct wm831x wm831x)

wm831x_reg_unlock: Unlock user keyed registers

The WM831x has a user key preventing writes to particularly critical registers. This function locks those registers, allowing writes to them.

Definition at line 120 of file wm831x-core.c.

int wm831x_reg_read ( struct wm831x wm831x,
unsigned short  reg 
)

wm831x_reg_read: Read a single WM831x register.

: Device to read from. : Register to read.

Definition at line 517 of file wm831x-core.c.

int wm831x_reg_unlock ( struct wm831x wm831x)

wm831x_reg_unlock: Unlock user keyed registers

The WM831x has a user key preventing writes to particularly critical registers. This function locks those registers, preventing spurious writes.

Definition at line 146 of file wm831x-core.c.

int wm831x_reg_write ( struct wm831x wm831x,
unsigned short  reg,
unsigned short  val 
)

wm831x_reg_write: Write a single WM831x register.

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

Definition at line 576 of file wm831x-core.c.

int wm831x_set_bits ( struct wm831x wm831x,
unsigned short  reg,
unsigned short  mask,
unsigned short  val 
)

wm831x_set_bits: Set the value of a bitfield in a WM831x register

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

Definition at line 599 of file wm831x-core.c.

Variable Documentation

int wm831x_isinkv_values[WM831X_ISINK_MAX_ISEL+1]

Definition at line 34 of file wm831x-core.c.

struct regmap_config wm831x_regmap_config
Initial value:
= {
.reg_bits = 16,
.val_bits = 16,
.cache_type = REGCACHE_RBTREE,
.max_register = WM831X_DBE_CHECK_DATA,
.readable_reg = wm831x_reg_readable,
.writeable_reg = wm831x_reg_writeable,
.volatile_reg = wm831x_reg_volatile,
}

Definition at line 1603 of file wm831x-core.c.