Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
isl29003.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/mutex.h>
#include <linux/delay.h>

Go to the source code of this file.

Data Structures

struct  isl29003_data
 

Macros

#define ISL29003_DRV_NAME   "isl29003"
 
#define DRIVER_VERSION   "1.0"
 
#define ISL29003_REG_COMMAND   0x00
 
#define ISL29003_ADC_ENABLED   (1 << 7)
 
#define ISL29003_ADC_PD   (1 << 6)
 
#define ISL29003_TIMING_INT   (1 << 5)
 
#define ISL29003_MODE_SHIFT   (2)
 
#define ISL29003_MODE_MASK   (0x3 << ISL29003_MODE_SHIFT)
 
#define ISL29003_RES_SHIFT   (0)
 
#define ISL29003_RES_MASK   (0x3 << ISL29003_RES_SHIFT)
 
#define ISL29003_REG_CONTROL   0x01
 
#define ISL29003_INT_FLG   (1 << 5)
 
#define ISL29003_RANGE_SHIFT   (2)
 
#define ISL29003_RANGE_MASK   (0x3 << ISL29003_RANGE_SHIFT)
 
#define ISL29003_INT_PERSISTS_SHIFT   (0)
 
#define ISL29003_INT_PERSISTS_MASK   (0xf << ISL29003_INT_PERSISTS_SHIFT)
 
#define ISL29003_REG_IRQ_THRESH_HI   0x02
 
#define ISL29003_REG_IRQ_THRESH_LO   0x03
 
#define ISL29003_REG_LSB_SENSOR   0x04
 
#define ISL29003_REG_MSB_SENSOR   0x05
 
#define ISL29003_REG_LSB_TIMER   0x06
 
#define ISL29003_REG_MSB_TIMER   0x07
 
#define ISL29003_NUM_CACHABLE_REGS   4
 
#define isl29003_suspend   NULL
 
#define isl29003_resume   NULL
 

Functions

 MODULE_DEVICE_TABLE (i2c, isl29003_id)
 
 module_i2c_driver (isl29003_driver)
 
 MODULE_AUTHOR ("Daniel Mack <[email protected]>")
 
 MODULE_DESCRIPTION ("ISL29003 ambient light sensor driver")
 
 MODULE_LICENSE ("GPL v2")
 
 MODULE_VERSION (DRIVER_VERSION)
 

Macro Definition Documentation

#define DRIVER_VERSION   "1.0"

Definition at line 36 of file isl29003.c.

#define ISL29003_ADC_ENABLED   (1 << 7)

Definition at line 39 of file isl29003.c.

#define ISL29003_ADC_PD   (1 << 6)

Definition at line 40 of file isl29003.c.

#define ISL29003_DRV_NAME   "isl29003"

Definition at line 35 of file isl29003.c.

#define ISL29003_INT_FLG   (1 << 5)

Definition at line 48 of file isl29003.c.

#define ISL29003_INT_PERSISTS_MASK   (0xf << ISL29003_INT_PERSISTS_SHIFT)

Definition at line 52 of file isl29003.c.

#define ISL29003_INT_PERSISTS_SHIFT   (0)

Definition at line 51 of file isl29003.c.

#define ISL29003_MODE_MASK   (0x3 << ISL29003_MODE_SHIFT)

Definition at line 43 of file isl29003.c.

#define ISL29003_MODE_SHIFT   (2)

Definition at line 42 of file isl29003.c.

#define ISL29003_NUM_CACHABLE_REGS   4

Definition at line 61 of file isl29003.c.

#define ISL29003_RANGE_MASK   (0x3 << ISL29003_RANGE_SHIFT)

Definition at line 50 of file isl29003.c.

#define ISL29003_RANGE_SHIFT   (2)

Definition at line 49 of file isl29003.c.

#define ISL29003_REG_COMMAND   0x00

Definition at line 38 of file isl29003.c.

#define ISL29003_REG_CONTROL   0x01

Definition at line 47 of file isl29003.c.

#define ISL29003_REG_IRQ_THRESH_HI   0x02

Definition at line 54 of file isl29003.c.

#define ISL29003_REG_IRQ_THRESH_LO   0x03

Definition at line 55 of file isl29003.c.

#define ISL29003_REG_LSB_SENSOR   0x04

Definition at line 56 of file isl29003.c.

#define ISL29003_REG_LSB_TIMER   0x06

Definition at line 58 of file isl29003.c.

#define ISL29003_REG_MSB_SENSOR   0x05

Definition at line 57 of file isl29003.c.

#define ISL29003_REG_MSB_TIMER   0x07

Definition at line 59 of file isl29003.c.

#define ISL29003_RES_MASK   (0x3 << ISL29003_RES_SHIFT)

Definition at line 45 of file isl29003.c.

#define ISL29003_RES_SHIFT   (0)

Definition at line 44 of file isl29003.c.

#define isl29003_resume   NULL

Definition at line 437 of file isl29003.c.

#define isl29003_suspend   NULL

Definition at line 436 of file isl29003.c.

#define ISL29003_TIMING_INT   (1 << 5)

Definition at line 41 of file isl29003.c.

Function Documentation

MODULE_AUTHOR ( "Daniel Mack <[email protected]>"  )
MODULE_DESCRIPTION ( "ISL29003 ambient light sensor driver )
MODULE_DEVICE_TABLE ( i2c  ,
isl29003_id   
)
module_i2c_driver ( isl29003_driver  )
MODULE_LICENSE ( "GPL v2 )
MODULE_VERSION ( DRIVER_VERSION  )