aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-01-28 21:53:01 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-28 21:53:01 -0500
commit268943fb7529a15254a5247372119ba4bd735e94 (patch)
tree790d42cfade2a35b0eec5e1b7e0ac3795d399bcc /include/linux/mfd
parent2ad48ee810335bdd99de96e1a0796ba34c0e8301 (diff)
parent3cb6f44aedf519dce4a9106dec675b94d675c539 (diff)
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
Pull LED subsystem update from Bryan Wu: "Basically this cycle is mostly cleanup for LED subsystem" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: leds: s3c24xx: Remove hardware.h inclusion leds: replace list_for_each with list_for_each_entry leds: kirkwood: Cleanup in header files leds: pwm: Remove a warning on non-DT platforms leds: leds-pwm: fix duty time overflow. leds: leds-mc13783: Remove unneeded mc13xxx_{un}lock leds: leds-mc13783: Remove duplicate field in platform data drivers: leds: leds-tca6507: check CONFIG_GPIOLIB whether defined for 'gpio_base' leds: lp5523: Support LED MUX configuration on running a pattern leds: lp5521/5523: Fix multiple engine usage bug LEDS: tca6507 - fix up some comments. LEDS: tca6507: add device-tree support for GPIO configuration. LEDS: tca6507 - fix bugs in parsing of device-tree configuration.
Diffstat (limited to 'include/linux/mfd')
-rw-r--r--include/linux/mfd/mc13xxx.h37
1 files changed, 28 insertions, 9 deletions
diff --git a/include/linux/mfd/mc13xxx.h b/include/linux/mfd/mc13xxx.h
index 6156686bf108..ac39d910e70b 100644
--- a/include/linux/mfd/mc13xxx.h
+++ b/include/linux/mfd/mc13xxx.h
@@ -110,9 +110,6 @@ struct mc13xxx_led_platform_data {
110 int id; 110 int id;
111 const char *name; 111 const char *name;
112 const char *default_trigger; 112 const char *default_trigger;
113
114/* Three or two bits current selection depending on the led */
115 char max_current;
116}; 113};
117 114
118#define MAX_LED_CONTROL_REGS 6 115#define MAX_LED_CONTROL_REGS 6
@@ -121,7 +118,7 @@ struct mc13xxx_leds_platform_data {
121 struct mc13xxx_led_platform_data *led; 118 struct mc13xxx_led_platform_data *led;
122 int num_leds; 119 int num_leds;
123 120
124/* LED Control 0 */ 121/* MC13783 LED Control 0 */
125#define MC13783_LED_C0_ENABLE (1 << 0) 122#define MC13783_LED_C0_ENABLE (1 << 0)
126#define MC13783_LED_C0_TRIODE_MD (1 << 7) 123#define MC13783_LED_C0_TRIODE_MD (1 << 7)
127#define MC13783_LED_C0_TRIODE_AD (1 << 8) 124#define MC13783_LED_C0_TRIODE_AD (1 << 8)
@@ -129,21 +126,43 @@ struct mc13xxx_leds_platform_data {
129#define MC13783_LED_C0_BOOST (1 << 10) 126#define MC13783_LED_C0_BOOST (1 << 10)
130#define MC13783_LED_C0_ABMODE(x) (((x) & 0x7) << 11) 127#define MC13783_LED_C0_ABMODE(x) (((x) & 0x7) << 11)
131#define MC13783_LED_C0_ABREF(x) (((x) & 0x3) << 14) 128#define MC13783_LED_C0_ABREF(x) (((x) & 0x3) << 14)
132/* LED Control 1 */ 129/* MC13783 LED Control 1 */
133#define MC13783_LED_C1_TC1HALF (1 << 18) 130#define MC13783_LED_C1_TC1HALF (1 << 18)
134#define MC13783_LED_C1_SLEWLIM (1 << 23) 131#define MC13783_LED_C1_SLEWLIM (1 << 23)
135/* LED Control 2 */ 132/* MC13783 LED Control 2 */
133#define MC13783_LED_C2_CURRENT_MD(x) (((x) & 0x7) << 0)
134#define MC13783_LED_C2_CURRENT_AD(x) (((x) & 0x7) << 3)
135#define MC13783_LED_C2_CURRENT_KP(x) (((x) & 0x7) << 6)
136#define MC13783_LED_C2_PERIOD(x) (((x) & 0x3) << 21) 136#define MC13783_LED_C2_PERIOD(x) (((x) & 0x3) << 21)
137#define MC13783_LED_C2_SLEWLIM (1 << 23) 137#define MC13783_LED_C2_SLEWLIM (1 << 23)
138/* LED Control 3 */ 138/* MC13783 LED Control 3 */
139#define MC13783_LED_C3_CURRENT_R1(x) (((x) & 0x3) << 0)
140#define MC13783_LED_C3_CURRENT_G1(x) (((x) & 0x3) << 2)
141#define MC13783_LED_C3_CURRENT_B1(x) (((x) & 0x3) << 4)
139#define MC13783_LED_C3_PERIOD(x) (((x) & 0x3) << 21) 142#define MC13783_LED_C3_PERIOD(x) (((x) & 0x3) << 21)
140#define MC13783_LED_C3_TRIODE_TC1 (1 << 23) 143#define MC13783_LED_C3_TRIODE_TC1 (1 << 23)
141/* LED Control 4 */ 144/* MC13783 LED Control 4 */
145#define MC13783_LED_C4_CURRENT_R2(x) (((x) & 0x3) << 0)
146#define MC13783_LED_C4_CURRENT_G2(x) (((x) & 0x3) << 2)
147#define MC13783_LED_C4_CURRENT_B2(x) (((x) & 0x3) << 4)
142#define MC13783_LED_C4_PERIOD(x) (((x) & 0x3) << 21) 148#define MC13783_LED_C4_PERIOD(x) (((x) & 0x3) << 21)
143#define MC13783_LED_C4_TRIODE_TC2 (1 << 23) 149#define MC13783_LED_C4_TRIODE_TC2 (1 << 23)
144/* LED Control 5 */ 150/* MC13783 LED Control 5 */
151#define MC13783_LED_C5_CURRENT_R3(x) (((x) & 0x3) << 0)
152#define MC13783_LED_C5_CURRENT_G3(x) (((x) & 0x3) << 2)
153#define MC13783_LED_C5_CURRENT_B3(x) (((x) & 0x3) << 4)
145#define MC13783_LED_C5_PERIOD(x) (((x) & 0x3) << 21) 154#define MC13783_LED_C5_PERIOD(x) (((x) & 0x3) << 21)
146#define MC13783_LED_C5_TRIODE_TC3 (1 << 23) 155#define MC13783_LED_C5_TRIODE_TC3 (1 << 23)
156/* MC13892 LED Control 0 */
157#define MC13892_LED_C0_CURRENT_MD(x) (((x) & 0x7) << 9)
158#define MC13892_LED_C0_CURRENT_AD(x) (((x) & 0x7) << 21)
159/* MC13892 LED Control 1 */
160#define MC13892_LED_C1_CURRENT_KP(x) (((x) & 0x7) << 9)
161/* MC13892 LED Control 2 */
162#define MC13892_LED_C2_CURRENT_R(x) (((x) & 0x7) << 9)
163#define MC13892_LED_C2_CURRENT_G(x) (((x) & 0x7) << 21)
164/* MC13892 LED Control 3 */
165#define MC13892_LED_C3_CURRENT_B(x) (((x) & 0x7) << 9)
147 u32 led_control[MAX_LED_CONTROL_REGS]; 166 u32 led_control[MAX_LED_CONTROL_REGS];
148}; 167};
149 168