diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-27 14:34:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-27 14:34:20 -0400 |
commit | 3ddab4788d4980b1b3dc324fdd105adab3812418 (patch) | |
tree | 91b25590723d2a81ecd4d42753412cb8c4897bf0 /include | |
parent | d1e0fe252e1c410164127b3000613afeaf47e49f (diff) | |
parent | a7cca8aec9d08231207503e4823e7b47bfa7e596 (diff) |
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds:
leds: Add mx31moboard MC13783 led support
leds: Add mc13783 LED support
leds: leds-ss4200: fix led_classdev_unregister twice in error handling
leds: leds-lp3944: properly handle lp3944_configure fail in lp3944_probe
leds: led-class: set permissions on max_brightness file to 0444
leds: leds-gpio: Change blink_set callback to be able to turn off blinking
leds: Add LED driver for the Soekris net5501 board
leds: 88pm860x - fix checking in probe function
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/leds.h | 12 | ||||
-rw-r--r-- | include/linux/mfd/mc13783.h | 66 |
2 files changed, 74 insertions, 4 deletions
diff --git a/include/linux/leds.h b/include/linux/leds.h index d8bf9665e70c..ba6986a11663 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
@@ -149,14 +149,18 @@ struct gpio_led { | |||
149 | unsigned default_state : 2; | 149 | unsigned default_state : 2; |
150 | /* default_state should be one of LEDS_GPIO_DEFSTATE_(ON|OFF|KEEP) */ | 150 | /* default_state should be one of LEDS_GPIO_DEFSTATE_(ON|OFF|KEEP) */ |
151 | }; | 151 | }; |
152 | #define LEDS_GPIO_DEFSTATE_OFF 0 | 152 | #define LEDS_GPIO_DEFSTATE_OFF 0 |
153 | #define LEDS_GPIO_DEFSTATE_ON 1 | 153 | #define LEDS_GPIO_DEFSTATE_ON 1 |
154 | #define LEDS_GPIO_DEFSTATE_KEEP 2 | 154 | #define LEDS_GPIO_DEFSTATE_KEEP 2 |
155 | 155 | ||
156 | struct gpio_led_platform_data { | 156 | struct gpio_led_platform_data { |
157 | int num_leds; | 157 | int num_leds; |
158 | struct gpio_led *leds; | 158 | struct gpio_led *leds; |
159 | int (*gpio_blink_set)(unsigned gpio, | 159 | |
160 | #define GPIO_LED_NO_BLINK_LOW 0 /* No blink GPIO state low */ | ||
161 | #define GPIO_LED_NO_BLINK_HIGH 1 /* No blink GPIO state high */ | ||
162 | #define GPIO_LED_BLINK 2 /* Plase, blink */ | ||
163 | int (*gpio_blink_set)(unsigned gpio, int state, | ||
160 | unsigned long *delay_on, | 164 | unsigned long *delay_on, |
161 | unsigned long *delay_off); | 165 | unsigned long *delay_off); |
162 | }; | 166 | }; |
diff --git a/include/linux/mfd/mc13783.h b/include/linux/mfd/mc13783.h index 8895d9d8879c..4a894f688549 100644 --- a/include/linux/mfd/mc13783.h +++ b/include/linux/mfd/mc13783.h | |||
@@ -64,6 +64,70 @@ static inline int mc13783_ackirq(struct mc13783 *mc13783, int irq) | |||
64 | MC13783_ADC0_TSMOD1 | \ | 64 | MC13783_ADC0_TSMOD1 | \ |
65 | MC13783_ADC0_TSMOD2) | 65 | MC13783_ADC0_TSMOD2) |
66 | 66 | ||
67 | struct mc13783_led_platform_data { | ||
68 | #define MC13783_LED_MD 0 | ||
69 | #define MC13783_LED_AD 1 | ||
70 | #define MC13783_LED_KP 2 | ||
71 | #define MC13783_LED_R1 3 | ||
72 | #define MC13783_LED_G1 4 | ||
73 | #define MC13783_LED_B1 5 | ||
74 | #define MC13783_LED_R2 6 | ||
75 | #define MC13783_LED_G2 7 | ||
76 | #define MC13783_LED_B2 8 | ||
77 | #define MC13783_LED_R3 9 | ||
78 | #define MC13783_LED_G3 10 | ||
79 | #define MC13783_LED_B3 11 | ||
80 | #define MC13783_LED_MAX MC13783_LED_B3 | ||
81 | int id; | ||
82 | const char *name; | ||
83 | const char *default_trigger; | ||
84 | |||
85 | /* Three or two bits current selection depending on the led */ | ||
86 | char max_current; | ||
87 | }; | ||
88 | |||
89 | struct mc13783_leds_platform_data { | ||
90 | int num_leds; | ||
91 | struct mc13783_led_platform_data *led; | ||
92 | |||
93 | #define MC13783_LED_TRIODE_MD (1 << 0) | ||
94 | #define MC13783_LED_TRIODE_AD (1 << 1) | ||
95 | #define MC13783_LED_TRIODE_KP (1 << 2) | ||
96 | #define MC13783_LED_BOOST_EN (1 << 3) | ||
97 | #define MC13783_LED_TC1HALF (1 << 4) | ||
98 | #define MC13783_LED_SLEWLIMTC (1 << 5) | ||
99 | #define MC13783_LED_SLEWLIMBL (1 << 6) | ||
100 | #define MC13783_LED_TRIODE_TC1 (1 << 7) | ||
101 | #define MC13783_LED_TRIODE_TC2 (1 << 8) | ||
102 | #define MC13783_LED_TRIODE_TC3 (1 << 9) | ||
103 | int flags; | ||
104 | |||
105 | #define MC13783_LED_AB_DISABLED 0 | ||
106 | #define MC13783_LED_AB_MD1 1 | ||
107 | #define MC13783_LED_AB_MD12 2 | ||
108 | #define MC13783_LED_AB_MD123 3 | ||
109 | #define MC13783_LED_AB_MD1234 4 | ||
110 | #define MC13783_LED_AB_MD1234_AD1 5 | ||
111 | #define MC13783_LED_AB_MD1234_AD12 6 | ||
112 | #define MC13783_LED_AB_MD1_AD 7 | ||
113 | char abmode; | ||
114 | |||
115 | #define MC13783_LED_ABREF_200MV 0 | ||
116 | #define MC13783_LED_ABREF_400MV 1 | ||
117 | #define MC13783_LED_ABREF_600MV 2 | ||
118 | #define MC13783_LED_ABREF_800MV 3 | ||
119 | char abref; | ||
120 | |||
121 | #define MC13783_LED_PERIOD_10MS 0 | ||
122 | #define MC13783_LED_PERIOD_100MS 1 | ||
123 | #define MC13783_LED_PERIOD_500MS 2 | ||
124 | #define MC13783_LED_PERIOD_2S 3 | ||
125 | char bl_period; | ||
126 | char tc1_period; | ||
127 | char tc2_period; | ||
128 | char tc3_period; | ||
129 | }; | ||
130 | |||
67 | /* to be cleaned up */ | 131 | /* to be cleaned up */ |
68 | struct regulator_init_data; | 132 | struct regulator_init_data; |
69 | 133 | ||
@@ -80,12 +144,14 @@ struct mc13783_regulator_platform_data { | |||
80 | struct mc13783_platform_data { | 144 | struct mc13783_platform_data { |
81 | int num_regulators; | 145 | int num_regulators; |
82 | struct mc13783_regulator_init_data *regulators; | 146 | struct mc13783_regulator_init_data *regulators; |
147 | struct mc13783_leds_platform_data *leds; | ||
83 | 148 | ||
84 | #define MC13783_USE_TOUCHSCREEN (1 << 0) | 149 | #define MC13783_USE_TOUCHSCREEN (1 << 0) |
85 | #define MC13783_USE_CODEC (1 << 1) | 150 | #define MC13783_USE_CODEC (1 << 1) |
86 | #define MC13783_USE_ADC (1 << 2) | 151 | #define MC13783_USE_ADC (1 << 2) |
87 | #define MC13783_USE_RTC (1 << 3) | 152 | #define MC13783_USE_RTC (1 << 3) |
88 | #define MC13783_USE_REGULATOR (1 << 4) | 153 | #define MC13783_USE_REGULATOR (1 << 4) |
154 | #define MC13783_USE_LED (1 << 5) | ||
89 | unsigned int flags; | 155 | unsigned int flags; |
90 | }; | 156 | }; |
91 | 157 | ||