Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
leds-lm3642.c File Reference
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/leds.h>
#include <linux/slab.h>
#include <linux/platform_device.h>
#include <linux/fs.h>
#include <linux/regmap.h>
#include <linux/workqueue.h>
#include <linux/platform_data/leds-lm3642.h>

Go to the source code of this file.

Data Structures

struct  lm3642_chip_data
 

Macros

#define REG_FILT_TIME   (0x0)
 
#define REG_IVFM_MODE   (0x1)
 
#define REG_TORCH_TIME   (0x6)
 
#define REG_FLASH   (0x8)
 
#define REG_I_CTRL   (0x9)
 
#define REG_ENABLE   (0xA)
 
#define REG_FLAG   (0xB)
 
#define REG_MAX   (0xB)
 
#define UVLO_EN_SHIFT   (7)
 
#define IVM_D_TH_SHIFT   (2)
 
#define TORCH_RAMP_UP_TIME_SHIFT   (3)
 
#define TORCH_RAMP_DN_TIME_SHIFT   (0)
 
#define INDUCTOR_I_LIMIT_SHIFT   (6)
 
#define FLASH_RAMP_TIME_SHIFT   (3)
 
#define FLASH_TOUT_TIME_SHIFT   (0)
 
#define TORCH_I_SHIFT   (4)
 
#define FLASH_I_SHIFT   (0)
 
#define IVFM_SHIFT   (7)
 
#define TX_PIN_EN_SHIFT   (6)
 
#define STROBE_PIN_EN_SHIFT   (5)
 
#define TORCH_PIN_EN_SHIFT   (4)
 
#define MODE_BITS_SHIFT   (0)
 
#define UVLO_EN_MASK   (0x1)
 
#define IVM_D_TH_MASK   (0x7)
 
#define TORCH_RAMP_UP_TIME_MASK   (0x7)
 
#define TORCH_RAMP_DN_TIME_MASK   (0x7)
 
#define INDUCTOR_I_LIMIT_MASK   (0x1)
 
#define FLASH_RAMP_TIME_MASK   (0x7)
 
#define FLASH_TOUT_TIME_MASK   (0x7)
 
#define TORCH_I_MASK   (0x7)
 
#define FLASH_I_MASK   (0xF)
 
#define IVFM_MASK   (0x1)
 
#define TX_PIN_EN_MASK   (0x1)
 
#define STROBE_PIN_EN_MASK   (0x1)
 
#define TORCH_PIN_EN_MASK   (0x1)
 
#define MODE_BITS_MASK   (0x73)
 
#define EX_PIN_CONTROL_MASK   (0x71)
 
#define EX_PIN_ENABLE_MASK   (0x70)
 

Enumerations

enum  lm3642_mode { MODES_STASNDBY = 0, MODES_INDIC, MODES_TORCH, MODES_FLASH }
 

Functions

 MODULE_DEVICE_TABLE (i2c, lm3642_id)
 
 module_i2c_driver (lm3642_i2c_driver)
 
 MODULE_DESCRIPTION ("Texas Instruments Flash Lighting driver for LM3642")
 
 MODULE_AUTHOR ("Daniel Jeong <[email protected]>")
 
 MODULE_AUTHOR ("G.Shark Jeong <[email protected]>")
 
 MODULE_LICENSE ("GPL v2")
 

Macro Definition Documentation

#define EX_PIN_CONTROL_MASK   (0x71)

Definition at line 59 of file leds-lm3642.c.

#define EX_PIN_ENABLE_MASK   (0x70)

Definition at line 60 of file leds-lm3642.c.

#define FLASH_I_MASK   (0xF)

Definition at line 53 of file leds-lm3642.c.

#define FLASH_I_SHIFT   (0)

Definition at line 38 of file leds-lm3642.c.

#define FLASH_RAMP_TIME_MASK   (0x7)

Definition at line 50 of file leds-lm3642.c.

#define FLASH_RAMP_TIME_SHIFT   (3)

Definition at line 35 of file leds-lm3642.c.

#define FLASH_TOUT_TIME_MASK   (0x7)

Definition at line 51 of file leds-lm3642.c.

#define FLASH_TOUT_TIME_SHIFT   (0)

Definition at line 36 of file leds-lm3642.c.

#define INDUCTOR_I_LIMIT_MASK   (0x1)

Definition at line 49 of file leds-lm3642.c.

#define INDUCTOR_I_LIMIT_SHIFT   (6)

Definition at line 34 of file leds-lm3642.c.

#define IVFM_MASK   (0x1)

Definition at line 54 of file leds-lm3642.c.

#define IVFM_SHIFT   (7)

Definition at line 39 of file leds-lm3642.c.

#define IVM_D_TH_MASK   (0x7)

Definition at line 46 of file leds-lm3642.c.

#define IVM_D_TH_SHIFT   (2)

Definition at line 31 of file leds-lm3642.c.

#define MODE_BITS_MASK   (0x73)

Definition at line 58 of file leds-lm3642.c.

#define MODE_BITS_SHIFT   (0)

Definition at line 43 of file leds-lm3642.c.

#define REG_ENABLE   (0xA)

Definition at line 26 of file leds-lm3642.c.

#define REG_FILT_TIME   (0x0)

Definition at line 21 of file leds-lm3642.c.

#define REG_FLAG   (0xB)

Definition at line 27 of file leds-lm3642.c.

#define REG_FLASH   (0x8)

Definition at line 24 of file leds-lm3642.c.

#define REG_I_CTRL   (0x9)

Definition at line 25 of file leds-lm3642.c.

#define REG_IVFM_MODE   (0x1)

Definition at line 22 of file leds-lm3642.c.

#define REG_MAX   (0xB)

Definition at line 28 of file leds-lm3642.c.

#define REG_TORCH_TIME   (0x6)

Definition at line 23 of file leds-lm3642.c.

#define STROBE_PIN_EN_MASK   (0x1)

Definition at line 56 of file leds-lm3642.c.

#define STROBE_PIN_EN_SHIFT   (5)

Definition at line 41 of file leds-lm3642.c.

#define TORCH_I_MASK   (0x7)

Definition at line 52 of file leds-lm3642.c.

#define TORCH_I_SHIFT   (4)

Definition at line 37 of file leds-lm3642.c.

#define TORCH_PIN_EN_MASK   (0x1)

Definition at line 57 of file leds-lm3642.c.

#define TORCH_PIN_EN_SHIFT   (4)

Definition at line 42 of file leds-lm3642.c.

#define TORCH_RAMP_DN_TIME_MASK   (0x7)

Definition at line 48 of file leds-lm3642.c.

#define TORCH_RAMP_DN_TIME_SHIFT   (0)

Definition at line 33 of file leds-lm3642.c.

#define TORCH_RAMP_UP_TIME_MASK   (0x7)

Definition at line 47 of file leds-lm3642.c.

#define TORCH_RAMP_UP_TIME_SHIFT   (3)

Definition at line 32 of file leds-lm3642.c.

#define TX_PIN_EN_MASK   (0x1)

Definition at line 55 of file leds-lm3642.c.

#define TX_PIN_EN_SHIFT   (6)

Definition at line 40 of file leds-lm3642.c.

#define UVLO_EN_MASK   (0x1)

Definition at line 45 of file leds-lm3642.c.

#define UVLO_EN_SHIFT   (7)

Definition at line 30 of file leds-lm3642.c.

Enumeration Type Documentation

Enumerator:
MODES_STASNDBY 
MODES_INDIC 
MODES_TORCH 
MODES_FLASH 

Definition at line 62 of file leds-lm3642.c.

Function Documentation

MODULE_AUTHOR ( "Daniel Jeong <[email protected]>"  )
MODULE_AUTHOR ( "G.Shark Jeong <[email protected]>"  )
MODULE_DESCRIPTION ( "Texas Instruments Flash Lighting driver for LM3642"  )
MODULE_DEVICE_TABLE ( i2c  ,
lm3642_id   
)
module_i2c_driver ( lm3642_i2c_driver  )
MODULE_LICENSE ( "GPL v2 )