Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
wm8350-core.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/bug.h>
#include <linux/device.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/regmap.h>
#include <linux/workqueue.h>
#include <linux/mfd/wm8350/core.h>
#include <linux/mfd/wm8350/audio.h>
#include <linux/mfd/wm8350/comparator.h>
#include <linux/mfd/wm8350/gpio.h>
#include <linux/mfd/wm8350/pmic.h>
#include <linux/mfd/wm8350/rtc.h>
#include <linux/mfd/wm8350/supply.h>
#include <linux/mfd/wm8350/wdt.h>

Go to the source code of this file.

Macros

#define WM8350_CLOCK_CONTROL_1   0x28
 
#define WM8350_AIF_TEST   0x74
 
#define WM8350_BUS_DEBUG   0
 
#define dump(bytes, src)
 
#define WM8350_LOCK_DEBUG   0
 
#define ldbg(format, arg...)
 

Functions

int wm8350_clear_bits (struct wm8350 *wm8350, u16 reg, u16 mask)
 
 EXPORT_SYMBOL_GPL (wm8350_clear_bits)
 
int wm8350_set_bits (struct wm8350 *wm8350, u16 reg, u16 mask)
 
 EXPORT_SYMBOL_GPL (wm8350_set_bits)
 
u16 wm8350_reg_read (struct wm8350 *wm8350, int reg)
 
 EXPORT_SYMBOL_GPL (wm8350_reg_read)
 
int wm8350_reg_write (struct wm8350 *wm8350, int reg, u16 val)
 
 EXPORT_SYMBOL_GPL (wm8350_reg_write)
 
int wm8350_block_read (struct wm8350 *wm8350, int start_reg, int regs, u16 *dest)
 
 EXPORT_SYMBOL_GPL (wm8350_block_read)
 
int wm8350_block_write (struct wm8350 *wm8350, int start_reg, int regs, u16 *src)
 
 EXPORT_SYMBOL_GPL (wm8350_block_write)
 
int wm8350_reg_lock (struct wm8350 *wm8350)
 
 EXPORT_SYMBOL_GPL (wm8350_reg_lock)
 
int wm8350_reg_unlock (struct wm8350 *wm8350)
 
 EXPORT_SYMBOL_GPL (wm8350_reg_unlock)
 
int wm8350_read_auxadc (struct wm8350 *wm8350, int channel, int scale, int vref)
 
 EXPORT_SYMBOL_GPL (wm8350_read_auxadc)
 
int wm8350_device_init (struct wm8350 *wm8350, int irq, struct wm8350_platform_data *pdata)
 
 EXPORT_SYMBOL_GPL (wm8350_device_init)
 
void wm8350_device_exit (struct wm8350 *wm8350)
 
 EXPORT_SYMBOL_GPL (wm8350_device_exit)
 
 MODULE_DESCRIPTION ("WM8350 AudioPlus PMIC core driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define dump (   bytes,
  src 
)

Definition at line 50 of file wm8350-core.c.

#define ldbg (   format,
  arg... 
)

Definition at line 57 of file wm8350-core.c.

#define WM8350_AIF_TEST   0x74

Definition at line 36 of file wm8350-core.c.

#define WM8350_BUS_DEBUG   0

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

#define WM8350_CLOCK_CONTROL_1   0x28

Definition at line 35 of file wm8350-core.c.

#define WM8350_LOCK_DEBUG   0

Definition at line 53 of file wm8350-core.c.

Function Documentation

EXPORT_SYMBOL_GPL ( wm8350_clear_bits  )
EXPORT_SYMBOL_GPL ( wm8350_set_bits  )
EXPORT_SYMBOL_GPL ( wm8350_reg_read  )
EXPORT_SYMBOL_GPL ( wm8350_reg_write  )
EXPORT_SYMBOL_GPL ( wm8350_block_read  )
EXPORT_SYMBOL_GPL ( wm8350_block_write  )
EXPORT_SYMBOL_GPL ( wm8350_reg_lock  )
EXPORT_SYMBOL_GPL ( wm8350_reg_unlock  )
EXPORT_SYMBOL_GPL ( wm8350_read_auxadc  )
EXPORT_SYMBOL_GPL ( wm8350_device_init  )
EXPORT_SYMBOL_GPL ( wm8350_device_exit  )
MODULE_DESCRIPTION ( "WM8350 AudioPlus PMIC core driver )
MODULE_LICENSE ( "GPL"  )
int wm8350_block_read ( struct wm8350 wm8350,
int  start_reg,
int  regs,
u16 dest 
)

Definition at line 105 of file wm8350-core.c.

int wm8350_block_write ( struct wm8350 wm8350,
int  start_reg,
int  regs,
u16 src 
)

Definition at line 119 of file wm8350-core.c.

int wm8350_clear_bits ( struct wm8350 wm8350,
u16  reg,
u16  mask 
)

Definition at line 68 of file wm8350-core.c.

void wm8350_device_exit ( struct wm8350 wm8350)

Definition at line 446 of file wm8350-core.c.

int wm8350_device_init ( struct wm8350 wm8350,
int  irq,
struct wm8350_platform_data pdata 
)

Definition at line 277 of file wm8350-core.c.

int wm8350_read_auxadc ( struct wm8350 wm8350,
int  channel,
int  scale,
int  vref 
)

Definition at line 189 of file wm8350-core.c.

int wm8350_reg_lock ( struct wm8350 wm8350)

wm8350_reg_lock()

The WM8350 has a hardware lock which can be used to prevent writes to some registers (generally those which can cause particularly serious problems if misused). This function enables that lock.

Definition at line 140 of file wm8350-core.c.

u16 wm8350_reg_read ( struct wm8350 wm8350,
int  reg 
)

Definition at line 80 of file wm8350-core.c.

int wm8350_reg_unlock ( struct wm8350 wm8350)

wm8350_reg_unlock()

The WM8350 has a hardware lock which can be used to prevent writes to some registers (generally those which can cause particularly serious problems if misused). This function disables that lock so updates can be performed. For maximum safety this should be done only when required.

Definition at line 169 of file wm8350-core.c.

int wm8350_reg_write ( struct wm8350 wm8350,
int  reg,
u16  val 
)

Definition at line 93 of file wm8350-core.c.

int wm8350_set_bits ( struct wm8350 wm8350,
u16  reg,
u16  mask 
)

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