Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
tps6105x.h File Reference
#include <linux/i2c.h>
#include <linux/regulator/machine.h>

Go to the source code of this file.

Data Structures

struct  tps6105x_platform_data
 
struct  tps6105x
 

Macros

#define TPS6105X_REG_0   0x00
 
#define TPS6105X_REG0_MODE_SHIFT   6
 
#define TPS6105X_REG0_MODE_MASK   (0x03<<6)
 
#define TPS6105X_REG0_MODE_SHUTDOWN   0x00
 
#define TPS6105X_REG0_MODE_TORCH   0x01
 
#define TPS6105X_REG0_MODE_TORCH_FLASH   0x02
 
#define TPS6105X_REG0_MODE_VOLTAGE   0x03
 
#define TPS6105X_REG0_VOLTAGE_SHIFT   4
 
#define TPS6105X_REG0_VOLTAGE_MASK   (3<<4)
 
#define TPS6105X_REG0_VOLTAGE_450   0
 
#define TPS6105X_REG0_VOLTAGE_500   1
 
#define TPS6105X_REG0_VOLTAGE_525   2
 
#define TPS6105X_REG0_VOLTAGE_500_2   3
 
#define TPS6105X_REG0_DIMMING_SHIFT   3
 
#define TPS6105X_REG0_TORCHC_SHIFT   0
 
#define TPS6105X_REG0_TORCHC_MASK   (7<<0)
 
#define TPS6105X_REG0_TORCHC_0   0x00
 
#define TPS6105X_REG0_TORCHC_50   0x01
 
#define TPS6105X_REG0_TORCHC_75   0x02
 
#define TPS6105X_REG0_TORCHC_100   0x03
 
#define TPS6105X_REG0_TORCHC_150   0x04
 
#define TPS6105X_REG0_TORCHC_200   0x05
 
#define TPS6105X_REG0_TORCHC_250_400   0x06
 
#define TPS6105X_REG0_TORCHC_250_500   0x07
 
#define TPS6105X_REG_1   0x01
 
#define TPS6105X_REG1_MODE_SHIFT   6
 
#define TPS6105X_REG1_MODE_MASK   (0x03<<6)
 
#define TPS6105X_REG1_MODE_SHUTDOWN   0x00
 
#define TPS6105X_REG1_MODE_TORCH   0x01
 
#define TPS6105X_REG1_MODE_TORCH_FLASH   0x02
 
#define TPS6105X_REG1_MODE_VOLTAGE   0x03
 
#define TPS6105X_REG_2   0x02
 
#define TPS6105X_REG_3   0x03
 

Enumerations

enum  tps6105x_mode { TPS6105X_MODE_SHUTDOWN, TPS6105X_MODE_TORCH, TPS6105X_MODE_TORCH_FLASH, TPS6105X_MODE_VOLTAGE }
 

Functions

int tps6105x_set (struct tps6105x *tps6105x, u8 reg, u8 value)
 
int tps6105x_get (struct tps6105x *tps6105x, u8 reg, u8 *buf)
 
int tps6105x_mask_and_set (struct tps6105x *tps6105x, u8 reg, u8 bitmask, u8 bitvalues)
 

Macro Definition Documentation

#define TPS6105X_REG0_DIMMING_SHIFT   3

Definition at line 32 of file tps6105x.h.

#define TPS6105X_REG0_MODE_MASK   (0x03<<6)

Definition at line 20 of file tps6105x.h.

#define TPS6105X_REG0_MODE_SHIFT   6

Definition at line 19 of file tps6105x.h.

#define TPS6105X_REG0_MODE_SHUTDOWN   0x00

Definition at line 22 of file tps6105x.h.

#define TPS6105X_REG0_MODE_TORCH   0x01

Definition at line 23 of file tps6105x.h.

#define TPS6105X_REG0_MODE_TORCH_FLASH   0x02

Definition at line 24 of file tps6105x.h.

#define TPS6105X_REG0_MODE_VOLTAGE   0x03

Definition at line 25 of file tps6105x.h.

#define TPS6105X_REG0_TORCHC_0   0x00

Definition at line 35 of file tps6105x.h.

#define TPS6105X_REG0_TORCHC_100   0x03

Definition at line 38 of file tps6105x.h.

#define TPS6105X_REG0_TORCHC_150   0x04

Definition at line 39 of file tps6105x.h.

#define TPS6105X_REG0_TORCHC_200   0x05

Definition at line 40 of file tps6105x.h.

#define TPS6105X_REG0_TORCHC_250_400   0x06

Definition at line 41 of file tps6105x.h.

#define TPS6105X_REG0_TORCHC_250_500   0x07

Definition at line 42 of file tps6105x.h.

#define TPS6105X_REG0_TORCHC_50   0x01

Definition at line 36 of file tps6105x.h.

#define TPS6105X_REG0_TORCHC_75   0x02

Definition at line 37 of file tps6105x.h.

#define TPS6105X_REG0_TORCHC_MASK   (7<<0)

Definition at line 34 of file tps6105x.h.

#define TPS6105X_REG0_TORCHC_SHIFT   0

Definition at line 33 of file tps6105x.h.

#define TPS6105X_REG0_VOLTAGE_450   0

Definition at line 28 of file tps6105x.h.

#define TPS6105X_REG0_VOLTAGE_500   1

Definition at line 29 of file tps6105x.h.

#define TPS6105X_REG0_VOLTAGE_500_2   3

Definition at line 31 of file tps6105x.h.

#define TPS6105X_REG0_VOLTAGE_525   2

Definition at line 30 of file tps6105x.h.

#define TPS6105X_REG0_VOLTAGE_MASK   (3<<4)

Definition at line 27 of file tps6105x.h.

#define TPS6105X_REG0_VOLTAGE_SHIFT   4

Definition at line 26 of file tps6105x.h.

#define TPS6105X_REG1_MODE_MASK   (0x03<<6)

Definition at line 45 of file tps6105x.h.

#define TPS6105X_REG1_MODE_SHIFT   6

Definition at line 44 of file tps6105x.h.

#define TPS6105X_REG1_MODE_SHUTDOWN   0x00

Definition at line 46 of file tps6105x.h.

#define TPS6105X_REG1_MODE_TORCH   0x01

Definition at line 47 of file tps6105x.h.

#define TPS6105X_REG1_MODE_TORCH_FLASH   0x02

Definition at line 48 of file tps6105x.h.

#define TPS6105X_REG1_MODE_VOLTAGE   0x03

Definition at line 49 of file tps6105x.h.

#define TPS6105X_REG_0   0x00

Definition at line 18 of file tps6105x.h.

#define TPS6105X_REG_1   0x01

Definition at line 43 of file tps6105x.h.

#define TPS6105X_REG_2   0x02

Definition at line 50 of file tps6105x.h.

#define TPS6105X_REG_3   0x03

Definition at line 51 of file tps6105x.h.

Enumeration Type Documentation

enum tps6105x_mode - desired mode for the TPS6105x : this instance is inactive, not used for anything : this instance is used as a LED, usually a while LED, for example as backlight or flashlight. If this is set, the TPS6105X will register to the LED framework : this instance is used as a flashgun, usually in a camera : this instance is used as a voltage regulator and will register to the regulator framework

Enumerator:
TPS6105X_MODE_SHUTDOWN 
TPS6105X_MODE_TORCH 
TPS6105X_MODE_TORCH_FLASH 
TPS6105X_MODE_VOLTAGE 

Definition at line 64 of file tps6105x.h.

Function Documentation

int tps6105x_get ( struct tps6105x tps6105x,
u8  reg,
u8 buf 
)

Definition at line 44 of file tps6105x.c.

int tps6105x_mask_and_set ( struct tps6105x tps6105x,
u8  reg,
u8  bitmask,
u8  bitvalues 
)

Definition at line 65 of file tps6105x.c.

int tps6105x_set ( struct tps6105x tps6105x,
u8  reg,
u8  value 
)

Definition at line 28 of file tps6105x.c.