mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
add gps of a22
This commit is contained in:
@@ -642,7 +642,8 @@ CONFIG_APANIC_PLABEL="kpanic"
|
||||
# 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
|
||||
@@ -926,7 +927,7 @@ CONFIG_UART0_CTS_RTS_RK29=y
|
||||
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
|
||||
|
||||
@@ -1230,41 +1230,42 @@ struct wm831x_pdata wm831x_platdata = {
|
||||
#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",
|
||||
@@ -2614,6 +2615,9 @@ static struct platform_device *devices[] __initdata = {
|
||||
#ifdef CONFIG_RK_HEADSET_DET
|
||||
&rk28_device_headset,
|
||||
#endif
|
||||
#ifdef CONFIG_RK29_GPS
|
||||
&rk29_device_gps,
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef CONFIG_RK29_VMAC
|
||||
|
||||
Reference in New Issue
Block a user