diff options
Diffstat (limited to 'include/linux/leds-lp5521.h')
-rw-r--r-- | include/linux/leds-lp5521.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/leds-lp5521.h b/include/linux/leds-lp5521.h index fd548d2a8775..3f071ec019b2 100644 --- a/include/linux/leds-lp5521.h +++ b/include/linux/leds-lp5521.h | |||
@@ -26,15 +26,37 @@ | |||
26 | /* See Documentation/leds/leds-lp5521.txt */ | 26 | /* See Documentation/leds/leds-lp5521.txt */ |
27 | 27 | ||
28 | struct lp5521_led_config { | 28 | struct lp5521_led_config { |
29 | char *name; | ||
29 | u8 chan_nr; | 30 | u8 chan_nr; |
30 | u8 led_current; /* mA x10, 0 if led is not connected */ | 31 | u8 led_current; /* mA x10, 0 if led is not connected */ |
31 | u8 max_current; | 32 | u8 max_current; |
32 | }; | 33 | }; |
33 | 34 | ||
35 | struct lp5521_led_pattern { | ||
36 | u8 *r; | ||
37 | u8 *g; | ||
38 | u8 *b; | ||
39 | u8 size_r; | ||
40 | u8 size_g; | ||
41 | u8 size_b; | ||
42 | }; | ||
43 | |||
34 | #define LP5521_CLOCK_AUTO 0 | 44 | #define LP5521_CLOCK_AUTO 0 |
35 | #define LP5521_CLOCK_INT 1 | 45 | #define LP5521_CLOCK_INT 1 |
36 | #define LP5521_CLOCK_EXT 2 | 46 | #define LP5521_CLOCK_EXT 2 |
37 | 47 | ||
48 | /* Bits in CONFIG register */ | ||
49 | #define LP5521_PWM_HF 0x40 /* PWM: 0 = 256Hz, 1 = 558Hz */ | ||
50 | #define LP5521_PWRSAVE_EN 0x20 /* 1 = Power save mode */ | ||
51 | #define LP5521_CP_MODE_OFF 0 /* Charge pump (CP) off */ | ||
52 | #define LP5521_CP_MODE_BYPASS 8 /* CP forced to bypass mode */ | ||
53 | #define LP5521_CP_MODE_1X5 0x10 /* CP forced to 1.5x mode */ | ||
54 | #define LP5521_CP_MODE_AUTO 0x18 /* Automatic mode selection */ | ||
55 | #define LP5521_R_TO_BATT 4 /* R out: 0 = CP, 1 = Vbat */ | ||
56 | #define LP5521_CLK_SRC_EXT 0 /* Ext-clk source (CLK_32K) */ | ||
57 | #define LP5521_CLK_INT 1 /* Internal clock */ | ||
58 | #define LP5521_CLK_AUTO 2 /* Automatic clock selection */ | ||
59 | |||
38 | struct lp5521_platform_data { | 60 | struct lp5521_platform_data { |
39 | struct lp5521_led_config *led_config; | 61 | struct lp5521_led_config *led_config; |
40 | u8 num_channels; | 62 | u8 num_channels; |
@@ -43,6 +65,9 @@ struct lp5521_platform_data { | |||
43 | void (*release_resources)(void); | 65 | void (*release_resources)(void); |
44 | void (*enable)(bool state); | 66 | void (*enable)(bool state); |
45 | const char *label; | 67 | const char *label; |
68 | u8 update_config; | ||
69 | struct lp5521_led_pattern *patterns; | ||
70 | int num_patterns; | ||
46 | }; | 71 | }; |
47 | 72 | ||
48 | #endif /* __LINUX_LP5521_H */ | 73 | #endif /* __LINUX_LP5521_H */ |