瀏覽代碼

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 <pali.rohar@gmail.com>
Signed-off-by: Joerg Reisenweber <joerg@openmoko.org>
[tony@atomide.com: updated comments to describe regression]
Signed-off-by: Tony Lindgren <tony@atomide.com>
Pali Rohár 12 年之前
父節點
當前提交
d1f1ca36b5
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      arch/arm/mach-omap2/board-rx51-peripherals.c

+ 9 - 0
arch/arm/mach-omap2/board-rx51-peripherals.c

@@ -167,38 +167,47 @@ static struct lp55xx_led_config rx51_lp5523_led_config[] = {
 		.name		= "lp5523:kb1",
 		.name		= "lp5523:kb1",
 		.chan_nr	= 0,
 		.chan_nr	= 0,
 		.led_current	= 50,
 		.led_current	= 50,
+		.max_current	= 100,
 	}, {
 	}, {
 		.name		= "lp5523:kb2",
 		.name		= "lp5523:kb2",
 		.chan_nr	= 1,
 		.chan_nr	= 1,
 		.led_current	= 50,
 		.led_current	= 50,
+		.max_current	= 100,
 	}, {
 	}, {
 		.name		= "lp5523:kb3",
 		.name		= "lp5523:kb3",
 		.chan_nr	= 2,
 		.chan_nr	= 2,
 		.led_current	= 50,
 		.led_current	= 50,
+		.max_current	= 100,
 	}, {
 	}, {
 		.name		= "lp5523:kb4",
 		.name		= "lp5523:kb4",
 		.chan_nr	= 3,
 		.chan_nr	= 3,
 		.led_current	= 50,
 		.led_current	= 50,
+		.max_current	= 100,
 	}, {
 	}, {
 		.name		= "lp5523:b",
 		.name		= "lp5523:b",
 		.chan_nr	= 4,
 		.chan_nr	= 4,
 		.led_current	= 50,
 		.led_current	= 50,
+		.max_current	= 100,
 	}, {
 	}, {
 		.name		= "lp5523:g",
 		.name		= "lp5523:g",
 		.chan_nr	= 5,
 		.chan_nr	= 5,
 		.led_current	= 50,
 		.led_current	= 50,
+		.max_current	= 100,
 	}, {
 	}, {
 		.name		= "lp5523:r",
 		.name		= "lp5523:r",
 		.chan_nr	= 6,
 		.chan_nr	= 6,
 		.led_current	= 50,
 		.led_current	= 50,
+		.max_current	= 100,
 	}, {
 	}, {
 		.name		= "lp5523:kb5",
 		.name		= "lp5523:kb5",
 		.chan_nr	= 7,
 		.chan_nr	= 7,
 		.led_current	= 50,
 		.led_current	= 50,
+		.max_current	= 100,
 	}, {
 	}, {
 		.name		= "lp5523:kb6",
 		.name		= "lp5523:kb6",
 		.chan_nr	= 8,
 		.chan_nr	= 8,
 		.led_current	= 50,
 		.led_current	= 50,
+		.max_current	= 100,
 	}
 	}
 };
 };