# CONFIG_EEPROM_MAX6875 is not set
# CONFIG_EEPROM_93CX6 is not set
# CONFIG_RK29_SUPPORT_MODEM is not set
-# CONFIG_RK29_GPS is not set
+CONFIG_RK29_GPS=y
+CONFIG_GPS_GNS7560=y
#
# Motion Sensors Support
CONFIG_UART1_RK29=y
CONFIG_UART2_RK29=y
CONFIG_UART2_CTS_RTS_RK29=y
-# CONFIG_UART3_RK29 is not set
+CONFIG_UART3_RK29=y
CONFIG_SERIAL_RK29_CONSOLE=y
CONFIG_UNIX98_PTYS=y
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
#define RK29_GPS_POWER_PIN RK29_PIN6_PB2
#define RK29_GPS_RESET_PIN RK29_PIN6_PC1
-static int gps_open =0;
-
int rk29_gps_power_up(void)
{
- gps_open = 1;
printk("%s \n", __FUNCTION__);
- gpio_request(RK29_GPS_POWER_PIN, NULL);
+
+ gpio_request(RK29_GPS_POWER_PIN, NULL);
gpio_direction_output(RK29_GPS_POWER_PIN, GPIO_HIGH);
- gpio_request(RK29_GPS_RESET_PIN, NULL);
- gpio_direction_output(RK29_GPS_RESET_PIN, GPIO_LOW);
- rk29_mux_api_set(GPIO2B3_UART3SOUT_NAME, GPIO2L_UART3_SOUT);
- rk29_mux_api_set(GPIO2B2_UART3SIN_NAME, GPIO2L_UART3_SIN);
- mdelay(100);
- gpio_direction_output(RK29_GPS_RESET_PIN, GPIO_HIGH);
+
return 0;
}
int rk29_gps_power_down(void)
{
- gps_open =0;
printk("%s \n", __FUNCTION__);
+
gpio_direction_output(RK29_GPS_POWER_PIN, GPIO_LOW);
- mdelay(100);
- gpio_direction_output(RK29_GPS_RESET_PIN, GPIO_LOW); //uart1
+
return 0;
}
+int rk29_gps_reset_set(int level)
+{
+ gpio_request(RK29_GPS_RESET_PIN, NULL);
+ if (level)
+ gpio_direction_output(RK29_GPS_RESET_PIN, GPIO_HIGH);
+ else
+ gpio_direction_output(RK29_GPS_RESET_PIN, GPIO_LOW);
+
+ return 0;
+}
struct rk29_gps_data rk29_gps_info = {
.power_up = rk29_gps_power_up,
.power_down = rk29_gps_power_down,
+ .reset = rk29_gps_reset_set,
.uart_id = 3,
- .powerpin = RK29_GPS_POWER_PIN,
- .powerflag = 1,
- };
+};
struct platform_device rk29_device_gps = {
.name = "rk29_gps",
#ifdef CONFIG_RK_HEADSET_DET
&rk28_device_headset,
#endif
+#ifdef CONFIG_RK29_GPS
+ &rk29_device_gps,
+#endif
};
#ifdef CONFIG_RK29_VMAC