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

Go to the source code of this file.

Data Structures

struct  lp3944_led_data
 
struct  lp3944_data
 

Macros

#define LP3944_REG_INPUT1   0x00 /* LEDs 0-7 InputRegister (Read Only) */
 
#define LP3944_REG_REGISTER1   0x01 /* None (Read Only) */
 
#define LP3944_REG_PSC0   0x02 /* Frequency Prescaler 0 (R/W) */
 
#define LP3944_REG_PWM0   0x03 /* PWM Register 0 (R/W) */
 
#define LP3944_REG_PSC1   0x04 /* Frequency Prescaler 1 (R/W) */
 
#define LP3944_REG_PWM1   0x05 /* PWM Register 1 (R/W) */
 
#define LP3944_REG_LS0   0x06 /* LEDs 0-3 Selector (R/W) */
 
#define LP3944_REG_LS1   0x07 /* LEDs 4-7 Selector (R/W) */
 
#define LP3944_REG_REGISTER8   0x08
 
#define LP3944_REG_REGISTER9   0x09
 
#define LP3944_DIM0   0
 
#define LP3944_DIM1   1
 
#define LP3944_PERIOD_MIN   0
 
#define LP3944_PERIOD_MAX   1600
 
#define LP3944_DUTY_CYCLE_MIN   0
 
#define LP3944_DUTY_CYCLE_MAX   100
 
#define ldev_to_led(c)   container_of(c, struct lp3944_led_data, ldev)
 

Functions

 MODULE_DEVICE_TABLE (i2c, lp3944_id)
 
 module_i2c_driver (lp3944_driver)
 
 MODULE_AUTHOR ("Antonio Ospite <[email protected]>")
 
 MODULE_DESCRIPTION ("LP3944 Fun Light Chip")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define ldev_to_led (   c)    container_of(c, struct lp3944_led_data, ldev)

Definition at line 65 of file leds-lp3944.c.

#define LP3944_DIM0   0

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

#define LP3944_DIM1   1

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

#define LP3944_DUTY_CYCLE_MAX   100

Definition at line 63 of file leds-lp3944.c.

#define LP3944_DUTY_CYCLE_MIN   0

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

#define LP3944_PERIOD_MAX   1600

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

#define LP3944_PERIOD_MIN   0

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

#define LP3944_REG_INPUT1   0x00 /* LEDs 0-7 InputRegister (Read Only) */

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

#define LP3944_REG_LS0   0x06 /* LEDs 0-3 Selector (R/W) */

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

#define LP3944_REG_LS1   0x07 /* LEDs 4-7 Selector (R/W) */

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

#define LP3944_REG_PSC0   0x02 /* Frequency Prescaler 0 (R/W) */

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

#define LP3944_REG_PSC1   0x04 /* Frequency Prescaler 1 (R/W) */

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

#define LP3944_REG_PWM0   0x03 /* PWM Register 0 (R/W) */

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

#define LP3944_REG_PWM1   0x05 /* PWM Register 1 (R/W) */

Definition at line 44 of file leds-lp3944.c.

#define LP3944_REG_REGISTER1   0x01 /* None (Read Only) */

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

#define LP3944_REG_REGISTER8   0x08

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

#define LP3944_REG_REGISTER9   0x09

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

Function Documentation

MODULE_AUTHOR ( "Antonio Ospite <[email protected]>"  )
MODULE_DESCRIPTION ( "LP3944 Fun Light Chip"  )
MODULE_DEVICE_TABLE ( i2c  ,
lp3944_id   
)
module_i2c_driver ( lp3944_driver  )
MODULE_LICENSE ( "GPL"  )