Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
adp1653.h File Reference
#include <linux/i2c.h>
#include <linux/mutex.h>
#include <linux/videodev2.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-subdev.h>

Go to the source code of this file.

Data Structures

struct  adp1653_platform_data
 
struct  adp1653_flash
 

Macros

#define ADP1653_NAME   "adp1653"
 
#define ADP1653_I2C_ADDR   (0x60 >> 1)
 
#define ADP1653_REG_OUT_SEL   0x00
 
#define ADP1653_REG_OUT_SEL_HPLED_TORCH_MIN   0x01
 
#define ADP1653_REG_OUT_SEL_HPLED_TORCH_MAX   0x0b
 
#define ADP1653_REG_OUT_SEL_HPLED_FLASH_MIN   0x0c
 
#define ADP1653_REG_OUT_SEL_HPLED_FLASH_MAX   0x1f
 
#define ADP1653_REG_OUT_SEL_HPLED_SHIFT   3
 
#define ADP1653_REG_OUT_SEL_ILED_MAX   0x07
 
#define ADP1653_REG_OUT_SEL_ILED_SHIFT   0
 
#define ADP1653_REG_CONFIG   0x01
 
#define ADP1653_REG_CONFIG_TMR_CFG   (1 << 4)
 
#define ADP1653_REG_CONFIG_TMR_SET_MAX   0x0f
 
#define ADP1653_REG_CONFIG_TMR_SET_SHIFT   0
 
#define ADP1653_REG_SW_STROBE   0x02
 
#define ADP1653_REG_SW_STROBE_SW_STROBE   (1 << 0)
 
#define ADP1653_REG_FAULT   0x03
 
#define ADP1653_REG_FAULT_FLT_SCP   (1 << 3)
 
#define ADP1653_REG_FAULT_FLT_OT   (1 << 2)
 
#define ADP1653_REG_FAULT_FLT_TMR   (1 << 1)
 
#define ADP1653_REG_FAULT_FLT_OV   (1 << 0)
 
#define ADP1653_INDICATOR_INTENSITY_MIN   0
 
#define ADP1653_INDICATOR_INTENSITY_STEP   2500
 
#define ADP1653_INDICATOR_INTENSITY_MAX   (ADP1653_REG_OUT_SEL_ILED_MAX * ADP1653_INDICATOR_INTENSITY_STEP)
 
#define ADP1653_INDICATOR_INTENSITY_uA_TO_REG(a)   ((a) / ADP1653_INDICATOR_INTENSITY_STEP)
 
#define ADP1653_INDICATOR_INTENSITY_REG_TO_uA(a)   ((a) * ADP1653_INDICATOR_INTENSITY_STEP)
 
#define ADP1653_FLASH_INTENSITY_BASE   35
 
#define ADP1653_FLASH_INTENSITY_STEP   15
 
#define ADP1653_FLASH_INTENSITY_MIN
 
#define ADP1653_FLASH_INTENSITY_MAX
 
#define ADP1653_FLASH_INTENSITY_mA_TO_REG(a)
 
#define ADP1653_FLASH_INTENSITY_REG_TO_mA(a)   ((a) * ADP1653_FLASH_INTENSITY_STEP + ADP1653_FLASH_INTENSITY_BASE)
 
#define ADP1653_TORCH_INTENSITY_MIN
 
#define ADP1653_TORCH_INTENSITY_MAX
 
#define to_adp1653_flash(sd)   container_of(sd, struct adp1653_flash, subdev)
 

Macro Definition Documentation

#define ADP1653_FLASH_INTENSITY_BASE   35

Definition at line 73 of file adp1653.h.

#define ADP1653_FLASH_INTENSITY_mA_TO_REG (   a)
Value:

Definition at line 84 of file adp1653.h.

#define ADP1653_FLASH_INTENSITY_MAX
Value:

Definition at line 78 of file adp1653.h.

#define ADP1653_FLASH_INTENSITY_MIN
#define ADP1653_FLASH_INTENSITY_REG_TO_mA (   a)    ((a) * ADP1653_FLASH_INTENSITY_STEP + ADP1653_FLASH_INTENSITY_BASE)

Definition at line 87 of file adp1653.h.

#define ADP1653_FLASH_INTENSITY_STEP   15

Definition at line 74 of file adp1653.h.

#define ADP1653_I2C_ADDR   (0x60 >> 1)

Definition at line 38 of file adp1653.h.

#define ADP1653_INDICATOR_INTENSITY_MAX   (ADP1653_REG_OUT_SEL_ILED_MAX * ADP1653_INDICATOR_INTENSITY_STEP)

Definition at line 66 of file adp1653.h.

#define ADP1653_INDICATOR_INTENSITY_MIN   0

Definition at line 64 of file adp1653.h.

#define ADP1653_INDICATOR_INTENSITY_REG_TO_uA (   a)    ((a) * ADP1653_INDICATOR_INTENSITY_STEP)

Definition at line 70 of file adp1653.h.

#define ADP1653_INDICATOR_INTENSITY_STEP   2500

Definition at line 65 of file adp1653.h.

#define ADP1653_INDICATOR_INTENSITY_uA_TO_REG (   a)    ((a) / ADP1653_INDICATOR_INTENSITY_STEP)

Definition at line 68 of file adp1653.h.

#define ADP1653_NAME   "adp1653"

Definition at line 37 of file adp1653.h.

#define ADP1653_REG_CONFIG   0x01

Definition at line 50 of file adp1653.h.

#define ADP1653_REG_CONFIG_TMR_CFG   (1 << 4)

Definition at line 51 of file adp1653.h.

#define ADP1653_REG_CONFIG_TMR_SET_MAX   0x0f

Definition at line 52 of file adp1653.h.

#define ADP1653_REG_CONFIG_TMR_SET_SHIFT   0

Definition at line 53 of file adp1653.h.

#define ADP1653_REG_FAULT   0x03

Definition at line 58 of file adp1653.h.

#define ADP1653_REG_FAULT_FLT_OT   (1 << 2)

Definition at line 60 of file adp1653.h.

#define ADP1653_REG_FAULT_FLT_OV   (1 << 0)

Definition at line 62 of file adp1653.h.

#define ADP1653_REG_FAULT_FLT_SCP   (1 << 3)

Definition at line 59 of file adp1653.h.

#define ADP1653_REG_FAULT_FLT_TMR   (1 << 1)

Definition at line 61 of file adp1653.h.

#define ADP1653_REG_OUT_SEL   0x00

Definition at line 41 of file adp1653.h.

#define ADP1653_REG_OUT_SEL_HPLED_FLASH_MAX   0x1f

Definition at line 45 of file adp1653.h.

#define ADP1653_REG_OUT_SEL_HPLED_FLASH_MIN   0x0c

Definition at line 44 of file adp1653.h.

#define ADP1653_REG_OUT_SEL_HPLED_SHIFT   3

Definition at line 46 of file adp1653.h.

#define ADP1653_REG_OUT_SEL_HPLED_TORCH_MAX   0x0b

Definition at line 43 of file adp1653.h.

#define ADP1653_REG_OUT_SEL_HPLED_TORCH_MIN   0x01

Definition at line 42 of file adp1653.h.

#define ADP1653_REG_OUT_SEL_ILED_MAX   0x07

Definition at line 47 of file adp1653.h.

#define ADP1653_REG_OUT_SEL_ILED_SHIFT   0

Definition at line 48 of file adp1653.h.

#define ADP1653_REG_SW_STROBE   0x02

Definition at line 55 of file adp1653.h.

#define ADP1653_REG_SW_STROBE_SW_STROBE   (1 << 0)

Definition at line 56 of file adp1653.h.

#define ADP1653_TORCH_INTENSITY_MAX
Value:

Definition at line 93 of file adp1653.h.

#define ADP1653_TORCH_INTENSITY_MIN
#define to_adp1653_flash (   sd)    container_of(sd, struct adp1653_flash, subdev)

Definition at line 108 of file adp1653.h.