phonepad:add sew868
author赵子初 <zzc@rock-chips.com>
Tue, 17 Jul 2012 08:43:17 +0000 (16:43 +0800)
committer赵子初 <zzc@rock-chips.com>
Tue, 17 Jul 2012 08:43:17 +0000 (16:43 +0800)
arch/arm/mach-rk30/board-rk30-phonepad.c

index e500d0ac0438a115f48b638c8f0123bedf1410c9..446367dd907b4584b0b1c77a52278f9181216861 100755 (executable)
@@ -60,6 +60,9 @@
 #if defined(CONFIG_MT6229)
 #include <linux/mt6229.h>
 #endif
+#if defined(CONFIG_SEW868)
+#include <linux/sew868.h>
+#endif
 #if defined(CONFIG_ANDROID_TIMED_GPIO)
 #include "../../../drivers/staging/android/timed_gpio.h"
 #endif
@@ -793,6 +796,38 @@ struct platform_device rk29_device_mt6229 = {
        }       
     };
 #endif
+#if defined(CONFIG_SEW868)
+static int sew868_io_init(void)
+{
+       rk30_mux_api_set(GPIO2B6_LCDC1DATA14_SMCADDR18_TSSYNC_NAME, GPIO2B_GPIO2B6);
+    rk30_mux_api_set(GPIO4D2_SMCDATA10_TRACEDATA10_NAME, GPIO4D_GPIO4D2);
+       rk30_mux_api_set(GPIO4D4_SMCDATA12_TRACEDATA12_NAME, GPIO4D_GPIO4D4);
+       return 0;
+}
+static int sew868_io_deinit(void)
+{
+       return 0;
+}
+struct rk30_sew868_data rk30_sew868_info = {
+       .io_init = sew868_io_init,
+       .io_deinit = sew868_io_deinit,
+       .bp_power = RK30_PIN6_PB2, 
+       .bp_power_active_low = 1,
+       .bp_sys = RK30_PIN2_PB6, 
+       .bp_reset = RK30_PIN4_PD2, 
+       .bp_reset_active_low = 1,
+       .bp_wakeup_ap = RK30_PIN4_PD4, 
+       .ap_wakeup_bp = NULL,
+};
+
+struct platform_device rk30_device_sew868 = {  
+        .name = "sew868",      
+       .id = -1,       
+       .dev            = {
+               .platform_data = &rk30_sew868_info,
+       }       
+    };
+#endif
 
 /*MMA8452 gsensor*/
 #if defined (CONFIG_GS_MMA8452)
@@ -1401,6 +1436,9 @@ static struct platform_device *devices[] __initdata = {
 #if defined(CONFIG_MT6229)
        &rk29_device_mt6229,
 #endif
+#if defined(CONFIG_SEW868)
+       &rk30_device_sew868,
+#endif
 #ifdef CONFIG_BATTERY_RK30_ADC
        &rk30_device_adc_battery,
 #endif