Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
leds-blinkm.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/jiffies.h>
#include <linux/i2c.h>
#include <linux/err.h>
#include <linux/mutex.h>
#include <linux/sysfs.h>
#include <linux/printk.h>
#include <linux/pm_runtime.h>
#include <linux/leds.h>
#include <linux/delay.h>

Go to the source code of this file.

Data Structures

struct  blinkm_led
 
struct  blinkm_work
 
struct  blinkm_data
 

Macros

#define cdev_to_blmled(c)   container_of(c, struct blinkm_led, led_cdev)
 
#define work_to_blmwork(c)   container_of(c, struct blinkm_work, work)
 
#define RED   0
 
#define GREEN   1
 
#define BLUE   2
 
#define BLM_GO_RGB   0
 
#define BLM_FADE_RGB   1
 
#define BLM_FADE_HSB   2
 
#define BLM_FADE_RAND_RGB   3
 
#define BLM_FADE_RAND_HSB   4
 
#define BLM_PLAY_SCRIPT   5
 
#define BLM_STOP_SCRIPT   6
 
#define BLM_SET_FADE_SPEED   7
 
#define BLM_SET_TIME_ADJ   8
 
#define BLM_GET_CUR_RGB   9
 
#define BLM_WRITE_SCRIPT_LINE   10
 
#define BLM_READ_SCRIPT_LINE   11
 
#define BLM_SET_SCRIPT_LR   12 /* Length & Repeats */
 
#define BLM_SET_ADDR   13
 
#define BLM_GET_ADDR   14
 
#define BLM_GET_FW_VER   15
 
#define BLM_SET_STARTUP_PARAM   16
 

Functions

 MODULE_DEVICE_TABLE (i2c, blinkm_id)
 
 module_i2c_driver (blinkm_driver)
 
 MODULE_AUTHOR ("Jan-Simon Moeller <[email protected]>")
 
 MODULE_DESCRIPTION ("BlinkM RGB LED driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define BLM_FADE_HSB   2

Definition at line 96 of file leds-blinkm.c.

#define BLM_FADE_RAND_HSB   4

Definition at line 98 of file leds-blinkm.c.

#define BLM_FADE_RAND_RGB   3

Definition at line 97 of file leds-blinkm.c.

#define BLM_FADE_RGB   1

Definition at line 95 of file leds-blinkm.c.

#define BLM_GET_ADDR   14

Definition at line 108 of file leds-blinkm.c.

#define BLM_GET_CUR_RGB   9

Definition at line 103 of file leds-blinkm.c.

#define BLM_GET_FW_VER   15

Definition at line 109 of file leds-blinkm.c.

#define BLM_GO_RGB   0

Definition at line 94 of file leds-blinkm.c.

#define BLM_PLAY_SCRIPT   5

Definition at line 99 of file leds-blinkm.c.

#define BLM_READ_SCRIPT_LINE   11

Definition at line 105 of file leds-blinkm.c.

#define BLM_SET_ADDR   13

Definition at line 107 of file leds-blinkm.c.

#define BLM_SET_FADE_SPEED   7

Definition at line 101 of file leds-blinkm.c.

#define BLM_SET_SCRIPT_LR   12 /* Length & Repeats */

Definition at line 106 of file leds-blinkm.c.

#define BLM_SET_STARTUP_PARAM   16

Definition at line 110 of file leds-blinkm.c.

#define BLM_SET_TIME_ADJ   8

Definition at line 102 of file leds-blinkm.c.

#define BLM_STOP_SCRIPT   6

Definition at line 100 of file leds-blinkm.c.

#define BLM_WRITE_SCRIPT_LINE   10

Definition at line 104 of file leds-blinkm.c.

#define BLUE   2

Definition at line 91 of file leds-blinkm.c.

#define cdev_to_blmled (   c)    container_of(c, struct blinkm_led, led_cdev)

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

#define GREEN   1

Definition at line 90 of file leds-blinkm.c.

#define RED   0

Definition at line 89 of file leds-blinkm.c.

#define work_to_blmwork (   c)    container_of(c, struct blinkm_work, work)

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

Function Documentation

MODULE_AUTHOR ( "Jan-Simon Moeller <[email protected]>"  )
MODULE_DESCRIPTION ( "BlinkM RGB LED driver )
MODULE_DEVICE_TABLE ( i2c  ,
blinkm_id   
)
module_i2c_driver ( blinkm_driver  )
MODULE_LICENSE ( "GPL"  )

Variable Documentation

u8 cmdbyte

Definition at line 124 of file leds-blinkm.c.

char cmdchar

Definition at line 123 of file leds-blinkm.c.

u8 dir

Definition at line 127 of file leds-blinkm.c.

u8 nr_args

Definition at line 125 of file leds-blinkm.c.

u8 nr_ret

Definition at line 126 of file leds-blinkm.c.