update newton config file and board file(add led support)
authorlmc <lmc@rock-chips.com>
Wed, 6 Jul 2011 07:02:01 +0000 (15:02 +0800)
committerroot <root@eddie-desktop.(none)>
Wed, 6 Jul 2011 07:03:56 +0000 (15:03 +0800)
arch/arm/configs/rk29_newton_defconfig
arch/arm/mach-rk29/board-rk29-newton.c

index b06786b69b68c20c875eea1b414242674c7b64e6..13054708d93118cd944e8e0fa09cab4a7d31321d 100755 (executable)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.32.27
-# Mon Jul  4 21:01:10 2011
+# Wed Jul  6 14:51:46 2011
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -572,6 +572,7 @@ CONFIG_WIRELESS_EXT_SYSFS=y
 # CONFIG_WIMAX is not set
 CONFIG_RFKILL=y
 # CONFIG_RFKILL_PM is not set
+CONFIG_RFKILL_LEDS=y
 # CONFIG_RFKILL_INPUT is not set
 # CONFIG_NET_9P is not set
 
@@ -853,6 +854,7 @@ CONFIG_KEYS_RK29=y
 # CONFIG_KEYBOARD_GPIO is not set
 # CONFIG_KEYBOARD_WM831X_GPIO is not set
 # CONFIG_KEYBOARD_MATRIX is not set
+# CONFIG_KEYBOARD_LM8323 is not set
 # CONFIG_KEYBOARD_MAX7359 is not set
 # CONFIG_KEYBOARD_NEWTON is not set
 # CONFIG_KEYBOARD_OPENCORES is not set
@@ -1664,7 +1666,34 @@ CONFIG_SDMMC1_RK29=y
 # CONFIG_MMC_AT91 is not set
 # CONFIG_MMC_ATMELMCI is not set
 # CONFIG_MEMSTICK is not set
-# CONFIG_NEW_LEDS is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_PCA9532 is not set
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_GPIO_PLATFORM=y
+# CONFIG_LEDS_LP3944 is not set
+# CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_BD2802 is not set
+# CONFIG_LEDS_ATT1272 is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_GPIO is not set
+# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
+# CONFIG_LEDS_TRIGGER_SLEEP is not set
+
+#
+# iptables trigger is under Netfilter config (LED target)
+#
 CONFIG_SWITCH=y
 CONFIG_SWITCH_GPIO=y
 # CONFIG_ACCESSIBILITY is not set
index bacd0e616c586e58a8ad2bda1feb11230c31b337..2f4accc94c30c6f2bc885da9cc8fd16b3d37c9fc 100755 (executable)
@@ -1504,11 +1504,55 @@ static struct platform_device rk29_device_keys = {
 };
 #endif
 
+#ifdef CONFIG_LEDS_GPIO_PLATFORM
+struct gpio_led rk29_leds[] = {
+               {
+                       .name = "rk29_red_led",
+                       .gpio = RK29_PIN4_PB2,
+                       .default_trigger = "timer",
+                       .active_low = 0,
+                       .default_state = LEDS_GPIO_DEFSTATE_OFF,
+               },
+               {
+                       .name = "rk29_green_led",
+                       .gpio = RK29_PIN4_PB1,
+                       .default_trigger = "timer",
+                       .active_low = 0,
+                       .default_state = LEDS_GPIO_DEFSTATE_OFF,
+               },
+               {
+                       .name = "rk29_blue_led",
+                       .gpio = RK29_PIN4_PB0,
+                       .default_trigger = "timer",
+                       .active_low = 0,
+                       .default_state = LEDS_GPIO_DEFSTATE_OFF,
+               },
+};
+
+struct gpio_led_platform_data rk29_leds_pdata = {
+       .leds = &rk29_leds,
+       .num_leds       = ARRAY_SIZE(rk29_leds),
+};
+
+struct platform_device rk29_device_gpio_leds = {
+       .name   = "leds-gpio",
+       .id     = -1,
+       .dev    = {
+          .platform_data  = &rk29_leds_pdata,
+       },
+};
+#endif
+
 static void __init rk29_board_iomux_init(void)
 {
        #ifdef CONFIG_RK29_PWM_REGULATOR
        rk29_mux_api_set(REGULATOR_PWM_MUX_NAME,REGULATOR_PWM_MUX_MODE);
        #endif
+       #ifdef CONFIG_LEDS_GPIO_PLATFORM
+       rk29_mux_api_set(GPIO4B0_FLASHDATA8_NAME,GPIO4L_GPIO4B0);
+       rk29_mux_api_set(GPIO4B1_FLASHDATA9_NAME,GPIO4L_GPIO4B1);
+       rk29_mux_api_set(GPIO4B2_FLASHDATA10_NAME,GPIO4L_GPIO4B2);
+       #endif
 }
 
 static struct platform_device *devices[] __initdata = {
@@ -1590,6 +1634,9 @@ static struct platform_device *devices[] __initdata = {
 #ifdef CONFIG_BACKLIGHT_RK29_BL
        &rk29_device_backlight,
 #endif
+#ifdef CONFIG_LEDS_GPIO_PLATFORM
+       &rk29_device_gpio_leds,
+#endif
 #ifdef CONFIG_RK29_VMAC
        &rk29_device_vmac,
 #endif