Skip to content

Commit d1f1ca3

Browse files
palitmlind
authored andcommitted
ARM: OMAP2: RX-51: Add missing max_current to rx51_lp5523_led_config
File drivers/leds/leds-lp55xx-common.c refuse to change led_current sysfs attribute if value is higher than max_current specified in board file. By default global C variables are zero, so changing always failed. This patch adding missing max_current and setting it to max safe value 100 (10 mA). It is unclear which commit exactly caused this regression as the lp5523 driver was broken and was hiding the platform data breakage. Now the driver is fixed so this should be fixed as well. Signed-off-by: Pali Rohár <[email protected]> Signed-off-by: Joerg Reisenweber <[email protected]> [[email protected]: updated comments to describe regression] Signed-off-by: Tony Lindgren <[email protected]>
1 parent 0b8214f commit d1f1ca3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

arch/arm/mach-omap2/board-rx51-peripherals.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,38 +167,47 @@ static struct lp55xx_led_config rx51_lp5523_led_config[] = {
167167
.name = "lp5523:kb1",
168168
.chan_nr = 0,
169169
.led_current = 50,
170+
.max_current = 100,
170171
}, {
171172
.name = "lp5523:kb2",
172173
.chan_nr = 1,
173174
.led_current = 50,
175+
.max_current = 100,
174176
}, {
175177
.name = "lp5523:kb3",
176178
.chan_nr = 2,
177179
.led_current = 50,
180+
.max_current = 100,
178181
}, {
179182
.name = "lp5523:kb4",
180183
.chan_nr = 3,
181184
.led_current = 50,
185+
.max_current = 100,
182186
}, {
183187
.name = "lp5523:b",
184188
.chan_nr = 4,
185189
.led_current = 50,
190+
.max_current = 100,
186191
}, {
187192
.name = "lp5523:g",
188193
.chan_nr = 5,
189194
.led_current = 50,
195+
.max_current = 100,
190196
}, {
191197
.name = "lp5523:r",
192198
.chan_nr = 6,
193199
.led_current = 50,
200+
.max_current = 100,
194201
}, {
195202
.name = "lp5523:kb5",
196203
.chan_nr = 7,
197204
.led_current = 50,
205+
.max_current = 100,
198206
}, {
199207
.name = "lp5523:kb6",
200208
.chan_nr = 8,
201209
.led_current = 50,
210+
.max_current = 100,
202211
}
203212
};
204213

0 commit comments

Comments
 (0)