Linux Kernel
3.7.1
|
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/gpio.h>
#include <linux/delay.h>
#include <linux/leds.h>
#include <linux/leds-bd2802.h>
#include <linux/slab.h>
#include <linux/pm.h>
Go to the source code of this file.
Data Structures | |
struct | led_state |
struct | bd2802_led |
Macros | |
#define | LED_CTL(rgb2en, rgb1en) ((rgb2en) << 4 | ((rgb1en) << 0)) |
#define | BD2802_LED_OFFSET 0xa |
#define | BD2802_COLOR_OFFSET 0x3 |
#define | BD2802_REG_CLKSETUP 0x00 |
#define | BD2802_REG_CONTROL 0x01 |
#define | BD2802_REG_HOURSETUP 0x02 |
#define | BD2802_REG_CURRENT1SETUP 0x03 |
#define | BD2802_REG_CURRENT2SETUP 0x04 |
#define | BD2802_REG_WAVEPATTERN 0x05 |
#define | BD2802_CURRENT_032 0x10 /* 3.2mA */ |
#define | BD2802_CURRENT_000 0x00 /* 0.0mA */ |
#define | BD2802_PATTERN_FULL 0x07 |
#define | BD2802_PATTERN_HALF 0x03 |
#define | BD2802_SET_REGISTER(reg_addr, reg_name) |
#define | BD2802_CONTROL_ATTR(attr_name, name_str) |
#define | BD2802_CONTROL_RGBS(name, id, clr) |
#define | BD2802_PM NULL |
Enumerations | |
enum | led_ids { LED1, LED2, LED_NUM } |
enum | led_colors { RED, GREEN, BLUE } |
enum | led_bits { BD2802_OFF, BD2802_BLINK, BD2802_ON } |
#define BD2802_COLOR_OFFSET 0x3 |
Definition at line 27 of file leds-bd2802.c.
#define BD2802_CONTROL_ATTR | ( | attr_name, | |
name_str | |||
) |
Definition at line 476 of file leds-bd2802.c.
Definition at line 531 of file leds-bd2802.c.
#define BD2802_CURRENT_000 0x00 /* 0.0mA */ |
Definition at line 37 of file leds-bd2802.c.
#define BD2802_CURRENT_032 0x10 /* 3.2mA */ |
Definition at line 36 of file leds-bd2802.c.
#define BD2802_LED_OFFSET 0xa |
Definition at line 26 of file leds-bd2802.c.
#define BD2802_PATTERN_FULL 0x07 |
Definition at line 39 of file leds-bd2802.c.
#define BD2802_PATTERN_HALF 0x03 |
Definition at line 40 of file leds-bd2802.c.
#define BD2802_PM NULL |
Definition at line 792 of file leds-bd2802.c.
#define BD2802_REG_CLKSETUP 0x00 |
Definition at line 29 of file leds-bd2802.c.
#define BD2802_REG_CONTROL 0x01 |
Definition at line 30 of file leds-bd2802.c.
#define BD2802_REG_CURRENT1SETUP 0x03 |
Definition at line 32 of file leds-bd2802.c.
#define BD2802_REG_CURRENT2SETUP 0x04 |
Definition at line 33 of file leds-bd2802.c.
#define BD2802_REG_HOURSETUP 0x02 |
Definition at line 31 of file leds-bd2802.c.
#define BD2802_REG_WAVEPATTERN 0x05 |
Definition at line 34 of file leds-bd2802.c.
Definition at line 322 of file leds-bd2802.c.
#define LED_CTL | ( | rgb2en, | |
rgb1en | |||
) | ((rgb2en) << 4 | ((rgb1en) << 0)) |
Definition at line 24 of file leds-bd2802.c.
enum led_bits |
Definition at line 54 of file leds-bd2802.c.
enum led_colors |
Definition at line 48 of file leds-bd2802.c.
enum led_ids |
Definition at line 42 of file leds-bd2802.c.
BD2802_CONTROL_ATTR | ( | wave_pattern | , |
"wave_pattern" | |||
) |
BD2802_CONTROL_ATTR | ( | rgb_current | , |
"rgb_current" | |||
) |
BD2802_SET_REGISTER | ( | 0x00 | , |
"0x00" | |||
) |
BD2802_SET_REGISTER | ( | 0x01 | , |
"0x01" | |||
) |
BD2802_SET_REGISTER | ( | 0x02 | , |
"0x02" | |||
) |
BD2802_SET_REGISTER | ( | 0x03 | , |
"0x03" | |||
) |
BD2802_SET_REGISTER | ( | 0x04 | , |
"0x04" | |||
) |
BD2802_SET_REGISTER | ( | 0x05 | , |
"0x05" | |||
) |
BD2802_SET_REGISTER | ( | 0x06 | , |
"0x06" | |||
) |
BD2802_SET_REGISTER | ( | 0x07 | , |
"0x07" | |||
) |
BD2802_SET_REGISTER | ( | 0x08 | , |
"0x08" | |||
) |
BD2802_SET_REGISTER | ( | 0x09 | , |
"0x09" | |||
) |
BD2802_SET_REGISTER | ( | 0x0a | , |
"0x0a" | |||
) |
BD2802_SET_REGISTER | ( | 0x0b | , |
"0x0b" | |||
) |
BD2802_SET_REGISTER | ( | 0x0c | , |
"0x0c" | |||
) |
BD2802_SET_REGISTER | ( | 0x0d | , |
"0x0d" | |||
) |
BD2802_SET_REGISTER | ( | 0x0e | , |
"0x0e" | |||
) |
BD2802_SET_REGISTER | ( | 0x0f | , |
"0x0f" | |||
) |
BD2802_SET_REGISTER | ( | 0x10 | , |
"0x10" | |||
) |
BD2802_SET_REGISTER | ( | 0x11 | , |
"0x11" | |||
) |
BD2802_SET_REGISTER | ( | 0x12 | , |
"0x12" | |||
) |
BD2802_SET_REGISTER | ( | 0x13 | , |
"0x13" | |||
) |
BD2802_SET_REGISTER | ( | 0x14 | , |
"0x14" | |||
) |
BD2802_SET_REGISTER | ( | 0x15 | , |
"0x15" | |||
) |
MODULE_AUTHOR | ( | "Kim Kyuwon <[email protected]>" | ) |
MODULE_DEVICE_TABLE | ( | i2c | , |
bd2802_id | |||
) |
module_i2c_driver | ( | bd2802_i2c_driver | ) |
MODULE_LICENSE | ( | "GPL v2" | ) |