Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
wm8350-regulator.c File Reference
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/bitops.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/mfd/wm8350/core.h>
#include <linux/mfd/wm8350/pmic.h>
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>

Go to the source code of this file.

Data Structures

struct  wm8350_dcdc_efficiency
 

Macros

#define WM8350_DCDC_MAX_VSEL   0x66
 

Functions

int wm8350_isink_set_flash (struct wm8350 *wm8350, int isink, u16 mode, u16 trigger, u16 duration, u16 on_ramp, u16 off_ramp, u16 drive)
 
 EXPORT_SYMBOL_GPL (wm8350_isink_set_flash)
 
int wm8350_dcdc_set_slot (struct wm8350 *wm8350, int dcdc, u16 start, u16 stop, u16 fault)
 
 EXPORT_SYMBOL_GPL (wm8350_dcdc_set_slot)
 
int wm8350_ldo_set_slot (struct wm8350 *wm8350, int ldo, u16 start, u16 stop)
 
 EXPORT_SYMBOL_GPL (wm8350_ldo_set_slot)
 
int wm8350_dcdc25_set_mode (struct wm8350 *wm8350, int dcdc, u16 mode, u16 ilim, u16 ramp, u16 feedback)
 
 EXPORT_SYMBOL_GPL (wm8350_dcdc25_set_mode)
 
int wm8350_register_regulator (struct wm8350 *wm8350, int reg, struct regulator_init_data *initdata)
 
 EXPORT_SYMBOL_GPL (wm8350_register_regulator)
 
int wm8350_register_led (struct wm8350 *wm8350, int lednum, int dcdc, int isink, struct wm8350_led_platform_data *pdata)
 
 EXPORT_SYMBOL_GPL (wm8350_register_led)
 
 subsys_initcall (wm8350_regulator_init)
 
 module_exit (wm8350_regulator_exit)
 
 MODULE_AUTHOR ("Liam Girdwood")
 
 MODULE_DESCRIPTION ("WM8350 voltage and current regulator driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("platform:wm8350-regulator")
 

Macro Definition Documentation

#define WM8350_DCDC_MAX_VSEL   0x66

Definition at line 28 of file wm8350-regulator.c.

Function Documentation

EXPORT_SYMBOL_GPL ( wm8350_isink_set_flash  )
EXPORT_SYMBOL_GPL ( wm8350_dcdc_set_slot  )
EXPORT_SYMBOL_GPL ( wm8350_ldo_set_slot  )
EXPORT_SYMBOL_GPL ( wm8350_dcdc25_set_mode  )
EXPORT_SYMBOL_GPL ( wm8350_register_regulator  )
EXPORT_SYMBOL_GPL ( wm8350_register_led  )
MODULE_ALIAS ( "platform:wm8350-regulator )
MODULE_AUTHOR ( "Liam Girdwood"  )
MODULE_DESCRIPTION ( "WM8350 voltage and current regulator driver )
module_exit ( wm8350_regulator_exit  )
MODULE_LICENSE ( "GPL"  )
subsys_initcall ( wm8350_regulator_init  )
int wm8350_dcdc25_set_mode ( struct wm8350 wm8350,
int  dcdc,
u16  mode,
u16  ilim,
u16  ramp,
u16  feedback 
)

Definition at line 757 of file wm8350-regulator.c.

int wm8350_dcdc_set_slot ( struct wm8350 wm8350,
int  dcdc,
u16  start,
u16  stop,
u16  fault 
)

Definition at line 674 of file wm8350-regulator.c.

int wm8350_isink_set_flash ( struct wm8350 wm8350,
int  isink,
u16  mode,
u16  trigger,
u16  duration,
u16  on_ramp,
u16  off_ramp,
u16  drive 
)

Definition at line 311 of file wm8350-regulator.c.

int wm8350_ldo_set_slot ( struct wm8350 wm8350,
int  ldo,
u16  start,
u16  stop 
)

Definition at line 722 of file wm8350-regulator.c.

int wm8350_register_led ( struct wm8350 wm8350,
int  lednum,
int  dcdc,
int  isink,
struct wm8350_led_platform_data pdata 
)

wm8350_register_led - Register a WM8350 LED output

Parameters
wm8350The WM8350 device to configure.
lednumLED device index to create.
dcdcThe DCDC to use for the LED.
isinkThe ISINK to use for the LED.
pdataConfiguration for the LED.

The WM8350 supports the use of an ISINK together with a DCDC to provide a power-efficient LED driver. This function registers the regulators and instantiates the platform device for a LED. The operating modes for the LED regulators must be configured using wm8350_isink_set_flash(), wm8350_dcdc25_set_mode() and wm8350_dcdc_set_slot() prior to calling this function.

Definition at line 1321 of file wm8350-regulator.c.

int wm8350_register_regulator ( struct wm8350 wm8350,
int  reg,
struct regulator_init_data initdata 
)

Definition at line 1262 of file wm8350-regulator.c.