#if defined(CONFIG_SPIM_RK29)
#include "../../../drivers/spi/rk29_spim.h"
#endif
+#if defined(CONFIG_MU509)
+#include <linux/mu509.h>
+#endif
#if defined(CONFIG_ANDROID_TIMED_GPIO)
#include "../../../drivers/staging/android/timed_gpio.h"
#endif
}
};
#endif
+#if defined(CONFIG_MU509)
+static int mu509_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(GPIO2B7_LCDC1DATA15_SMCADDR19_HSADCDATA7_NAME, GPIO2B_GPIO2B7);
+ rk30_mux_api_set(GPIO2C0_LCDCDATA16_GPSCLK_HSADCCLKOUT_NAME, GPIO2C_GPIO2C0);
+ return 0;
+}
+
+static int mu509_io_deinit(void)
+{
+
+ return 0;
+}
+
+struct rk29_mu509_data rk29_mu509_info = {
+ .io_init = mu509_io_init,
+ .io_deinit = mu509_io_deinit,
+ .modem_power_en = RK30_PIN6_PB2,//RK30_PIN4_PD1,
+ .bp_power = RK30_PIN2_PB6,//RK30_PIN4_PD1,
+ .bp_reset = RK30_PIN4_PD2,
+ .ap_wakeup_bp = RK30_PIN2_PB7,
+ .bp_wakeup_ap = RK30_PIN6_PA0,
+};
+struct platform_device rk29_device_mu509 = {
+ .name = "mu509",
+ .id = -1,
+ .dev = {
+ .platform_data = &rk29_mu509_info,
+ }
+ };
+#endif
/*MMA8452 gsensor*/
#if defined (CONFIG_GS_MMA8452)
#ifdef CONFIG_RK29_SUPPORT_MODEM
&rk30_device_modem,
#endif
+#if defined(CONFIG_MU509)
+ &rk29_device_mu509,
+#endif
#ifdef CONFIG_BATTERY_RK30_ADC
&rk30_device_adc_battery,
#endif
static struct wake_lock modem_wakelock;
#define IRQ_BB_WAKEUP_AP_TRIGGER IRQF_TRIGGER_FALLING
//#define IRQ_BB_WAKEUP_AP_TRIGGER IRQF_TRIGGER_RISING
+#if defined(CONFIG_ARCH_RK29)
#define airplane_mode RK29_PIN6_PC1
+#endif
+#if defined(CONFIG_ARCH_RK30)
+#define airplane_mode RK30_PIN2_PC0
+#endif
#define MU509_RESET 0x01
#define AIRPLANE_MODE_OFF 0x03
#define AIRPLANE_MODE_ON 0x00
//MODEMDBG("-------------%s\n",__FUNCTION__);
if(!online)
ap_wakeup_bp(pdev, 1);
+#if defined(CONFIG_ARCH_RK29)
rk29_mux_api_set(GPIO1C1_UART0RTSN_SDMMC1WRITEPRT_NAME, GPIO1H_GPIO1C1);
//gpio_direction_output(RK29_PIN1_PC1, 1);
+#endif
+#if defined(CONFIG_ARCH_RK30)
+ rk30_mux_api_set(GPIO1A7_UART1RTSN_SPI0TXD_NAME, GPIO1A_GPIO1A7);
+#endif
return 0;
}
{
//MODEMDBG("-------------%s\n",__FUNCTION__);
//ap_wakeup_bp(pdev, 0);
+#if defined(CONFIG_ARCH_RK29)
rk29_mux_api_set(GPIO1C1_UART0RTSN_SDMMC1WRITEPRT_NAME, GPIO1H_UART0_RTS_N);
+#endif
+#if defined(CONFIG_ARCH_RK30)
+ rk30_mux_api_set(GPIO1A7_UART1RTSN_SPI0TXD_NAME, GPIO1A_UART1_RTS_N);
+#endif
if(gpio_get_value(gpdata->bp_wakeup_ap))
{
schedule_delayed_work(&wakeup_work, 2*HZ);