leds-lp55xx: clean up definitions
authorMilo(Woogyom) Kim <milo.kim@ti.com>
Tue, 5 Feb 2013 10:25:26 +0000 (19:25 +0900)
committerBryan Wu <cooloney@gmail.com>
Wed, 6 Feb 2013 23:59:30 +0000 (15:59 -0800)
 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>
drivers/leds/leds-lp5521.c
drivers/leds/leds-lp5523.c

index f05eb6e31d58473b7f452d4588f59567fdf4e2e3..b2a0d877cdc1fef37f45424f943298ad5c1de67a 100644 (file)
 
 #include "leds-lp55xx-common.h"
 
-#define LP5521_PROGRAM_LENGTH          32      /* in bytes */
-
-#define LP5521_MAX_LEDS                        3       /* Maximum number of LEDs */
-#define LP5521_MAX_ENGINES             3       /* Maximum number of engines */
-
-#define LP5521_ENG_MASK_BASE           0x30    /* 00110000 */
-#define LP5521_ENG_STATUS_MASK         0x07    /* 00000111 */
-
-#define LP5521_CMD_LOAD                        0x15    /* 00010101 */
-#define LP5521_CMD_RUN                 0x2a    /* 00101010 */
-#define LP5521_CMD_DIRECT              0x3f    /* 00111111 */
-#define LP5521_CMD_DISABLED            0x00    /* 00000000 */
+#define LP5521_PROGRAM_LENGTH          32
+#define LP5521_MAX_LEDS                        3
+#define LP5521_CMD_DIRECT              0x3F
 
 /* Registers */
 #define LP5521_REG_ENABLE              0x00
 #define LP5521_REG_G_CURRENT           0x06
 #define LP5521_REG_B_CURRENT           0x07
 #define LP5521_REG_CONFIG              0x08
-#define LP5521_REG_R_CHANNEL_PC                0x09
-#define LP5521_REG_G_CHANNEL_PC                0x0A
-#define LP5521_REG_B_CHANNEL_PC                0x0B
 #define LP5521_REG_STATUS              0x0C
 #define LP5521_REG_RESET               0x0D
-#define LP5521_REG_GPO                 0x0E
 #define LP5521_REG_R_PROG_MEM          0x10
 #define LP5521_REG_G_PROG_MEM          0x30
 #define LP5521_REG_B_PROG_MEM          0x50
 
-#define LP5521_PROG_MEM_BASE           LP5521_REG_R_PROG_MEM
-#define LP5521_PROG_MEM_SIZE           0x20
-
 /* Base register to set LED current */
 #define LP5521_REG_LED_CURRENT_BASE    LP5521_REG_R_CURRENT
-
 /* Base register to set the brightness */
 #define LP5521_REG_LED_PWM_BASE                LP5521_REG_R_PWM
 
@@ -96,9 +79,6 @@
 /* default R channel current register value */
 #define LP5521_REG_R_CURR_DEFAULT      0xAF
 
-/* Pattern Mode */
-#define PATTERN_OFF    0
-
 /* Reset register value */
 #define LP5521_RESET                   0xFF
 
index b14bde2db24f93205277f0b52ff186ef8564b764..e145ce984b1df6a0c4e4021eb6c22f5f5b702cd9 100644 (file)
 
 #include "leds-lp55xx-common.h"
 
+#define LP5523_PROGRAM_LENGTH          32
+#define LP5523_MAX_LEDS                        9
+
+/* Registers */
 #define LP5523_REG_ENABLE              0x00
 #define LP5523_REG_OP_MODE             0x01
-#define LP5523_REG_RATIOMETRIC_MSB     0x02
-#define LP5523_REG_RATIOMETRIC_LSB     0x03
 #define LP5523_REG_ENABLE_LEDS_MSB     0x04
 #define LP5523_REG_ENABLE_LEDS_LSB     0x05
-#define LP5523_REG_LED_CNTRL_BASE      0x06
 #define LP5523_REG_LED_PWM_BASE                0x16
 #define LP5523_REG_LED_CURRENT_BASE    0x26
 #define LP5523_REG_CONFIG              0x36
-#define LP5523_REG_CHANNEL1_PC         0x37
-#define LP5523_REG_CHANNEL2_PC         0x38
-#define LP5523_REG_CHANNEL3_PC         0x39
-#define LP5523_REG_STATUS              0x3a
-#define LP5523_REG_GPO                 0x3b
-#define LP5523_REG_VARIABLE            0x3c
-#define LP5523_REG_RESET               0x3d
-#define LP5523_REG_TEMP_CTRL           0x3e
-#define LP5523_REG_TEMP_READ           0x3f
-#define LP5523_REG_TEMP_WRITE          0x40
+#define LP5523_REG_STATUS              0x3A
+#define LP5523_REG_RESET               0x3D
 #define LP5523_REG_LED_TEST_CTRL       0x41
 #define LP5523_REG_LED_TEST_ADC                0x42
-#define LP5523_REG_ENG1_VARIABLE       0x45
-#define LP5523_REG_ENG2_VARIABLE       0x46
-#define LP5523_REG_ENG3_VARIABLE       0x47
-#define LP5523_REG_MASTER_FADER1       0x48
-#define LP5523_REG_MASTER_FADER2       0x49
-#define LP5523_REG_MASTER_FADER3       0x4a
-#define LP5523_REG_CH1_PROG_START      0x4c
-#define LP5523_REG_CH2_PROG_START      0x4d
-#define LP5523_REG_CH3_PROG_START      0x4e
-#define LP5523_REG_PROG_PAGE_SEL       0x4f
+#define LP5523_REG_PROG_PAGE_SEL       0x4F
 #define LP5523_REG_PROG_MEM            0x50
 
-#define LP5523_CMD_LOAD                        0x15 /* 00010101 */
-#define LP5523_CMD_RUN                 0x2a /* 00101010 */
-#define LP5523_CMD_DISABLED            0x00 /* 00000000 */
-
+/* Bit description in registers */
 #define LP5523_ENABLE                  0x40
 #define LP5523_AUTO_INC                        0x40
 #define LP5523_PWR_SAVE                        0x20
 #define LP5523_PWM_PWR_SAVE            0x04
-#define LP5523_CP_1                    0x08
-#define LP5523_CP_1_5                  0x10
 #define LP5523_CP_AUTO                 0x18
-#define LP5523_INT_CLK                 0x01
 #define LP5523_AUTO_CLK                        0x02
+
 #define LP5523_EN_LEDTEST              0x80
 #define LP5523_LEDTEST_DONE            0x80
 #define LP5523_RESET                   0xFF
-
-#define LP5523_DEFAULT_CURRENT         50 /* microAmps */
-#define LP5523_PROGRAM_LENGTH          32 /* in bytes */
-#define LP5523_PROGRAM_PAGES           6
 #define LP5523_ADC_SHORTCIRC_LIM       80
-
-#define LP5523_MAX_LEDS                        9
-#define LP5523_ENGINES                 3
-
-#define LP5523_ENG_MASK_BASE           0x30 /* 00110000 */
-
-#define LP5523_ENG_STATUS_MASK          0x07 /* 00000111 */
-
-#define LP5523_IRQ_FLAGS                IRQF_TRIGGER_FALLING
-
 #define LP5523_EXT_CLK_USED            0x08
 
-#define LED_ACTIVE(mux, led)           (!!(mux & (0x0001 << led)))
-#define SHIFT_MASK(id)                 (((id) - 1) * 2)
-
 /* Memory Page Selection */
 #define LP5523_PAGE_ENG1               0
 #define LP5523_PAGE_ENG2               1
This page took 0.031938 seconds and 5 git commands to generate.