diff options
author | Milo(Woogyom) Kim <milo.kim@ti.com> | 2013-02-05 05:25:26 -0500 |
---|---|---|
committer | Bryan Wu <cooloney@gmail.com> | 2013-02-06 18:59:30 -0500 |
commit | 12f022d27bcdd606527ae1b3c9ad20cc8c90ce98 (patch) | |
tree | bf8e6c143ef735f3339a84102fd53e3e4346eea4 /drivers/leds/leds-lp5521.c | |
parent | 93ca4093adb757d5140071e72b2e9bfbb519b6c1 (diff) |
leds-lp55xx: clean up definitions
Remove unused definitions and change hex values to capital letters
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'drivers/leds/leds-lp5521.c')
-rw-r--r-- | drivers/leds/leds-lp5521.c | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c index f05eb6e31d58..b2a0d877cdc1 100644 --- a/drivers/leds/leds-lp5521.c +++ b/drivers/leds/leds-lp5521.c | |||
@@ -39,18 +39,9 @@ | |||
39 | 39 | ||
40 | #include "leds-lp55xx-common.h" | 40 | #include "leds-lp55xx-common.h" |
41 | 41 | ||
42 | #define LP5521_PROGRAM_LENGTH 32 /* in bytes */ | 42 | #define LP5521_PROGRAM_LENGTH 32 |
43 | 43 | #define LP5521_MAX_LEDS 3 | |
44 | #define LP5521_MAX_LEDS 3 /* Maximum number of LEDs */ | 44 | #define LP5521_CMD_DIRECT 0x3F |
45 | #define LP5521_MAX_ENGINES 3 /* Maximum number of engines */ | ||
46 | |||
47 | #define LP5521_ENG_MASK_BASE 0x30 /* 00110000 */ | ||
48 | #define LP5521_ENG_STATUS_MASK 0x07 /* 00000111 */ | ||
49 | |||
50 | #define LP5521_CMD_LOAD 0x15 /* 00010101 */ | ||
51 | #define LP5521_CMD_RUN 0x2a /* 00101010 */ | ||
52 | #define LP5521_CMD_DIRECT 0x3f /* 00111111 */ | ||
53 | #define LP5521_CMD_DISABLED 0x00 /* 00000000 */ | ||
54 | 45 | ||
55 | /* Registers */ | 46 | /* Registers */ |
56 | #define LP5521_REG_ENABLE 0x00 | 47 | #define LP5521_REG_ENABLE 0x00 |
@@ -62,22 +53,14 @@ | |||
62 | #define LP5521_REG_G_CURRENT 0x06 | 53 | #define LP5521_REG_G_CURRENT 0x06 |
63 | #define LP5521_REG_B_CURRENT 0x07 | 54 | #define LP5521_REG_B_CURRENT 0x07 |
64 | #define LP5521_REG_CONFIG 0x08 | 55 | #define LP5521_REG_CONFIG 0x08 |
65 | #define LP5521_REG_R_CHANNEL_PC 0x09 | ||
66 | #define LP5521_REG_G_CHANNEL_PC 0x0A | ||
67 | #define LP5521_REG_B_CHANNEL_PC 0x0B | ||
68 | #define LP5521_REG_STATUS 0x0C | 56 | #define LP5521_REG_STATUS 0x0C |
69 | #define LP5521_REG_RESET 0x0D | 57 | #define LP5521_REG_RESET 0x0D |
70 | #define LP5521_REG_GPO 0x0E | ||
71 | #define LP5521_REG_R_PROG_MEM 0x10 | 58 | #define LP5521_REG_R_PROG_MEM 0x10 |
72 | #define LP5521_REG_G_PROG_MEM 0x30 | 59 | #define LP5521_REG_G_PROG_MEM 0x30 |
73 | #define LP5521_REG_B_PROG_MEM 0x50 | 60 | #define LP5521_REG_B_PROG_MEM 0x50 |
74 | 61 | ||
75 | #define LP5521_PROG_MEM_BASE LP5521_REG_R_PROG_MEM | ||
76 | #define LP5521_PROG_MEM_SIZE 0x20 | ||
77 | |||
78 | /* Base register to set LED current */ | 62 | /* Base register to set LED current */ |
79 | #define LP5521_REG_LED_CURRENT_BASE LP5521_REG_R_CURRENT | 63 | #define LP5521_REG_LED_CURRENT_BASE LP5521_REG_R_CURRENT |
80 | |||
81 | /* Base register to set the brightness */ | 64 | /* Base register to set the brightness */ |
82 | #define LP5521_REG_LED_PWM_BASE LP5521_REG_R_PWM | 65 | #define LP5521_REG_LED_PWM_BASE LP5521_REG_R_PWM |
83 | 66 | ||
@@ -96,9 +79,6 @@ | |||
96 | /* default R channel current register value */ | 79 | /* default R channel current register value */ |
97 | #define LP5521_REG_R_CURR_DEFAULT 0xAF | 80 | #define LP5521_REG_R_CURR_DEFAULT 0xAF |
98 | 81 | ||
99 | /* Pattern Mode */ | ||
100 | #define PATTERN_OFF 0 | ||
101 | |||
102 | /* Reset register value */ | 82 | /* Reset register value */ |
103 | #define LP5521_RESET 0xFF | 83 | #define LP5521_RESET 0xFF |
104 | 84 | ||