int set_gps_ref_clk_enable_bcm(bool enable, gps_modem_id_enum modem_id, gps_rat_mode_enum rat_mode) { int ret = 0; int ic_type = 0; printk(KERN_INFO "[GPS] set_gps_ref_clk_enable(%d) \n", enable); ic_type = get_gps_ic_type(); switch(ic_type) { case GPS_IC_TYPE_4752: { ret = set_gps_ref_clk_enable_bcm4752(enable); break; } case GPS_IC_TYPE_47531: { ret = set_gps_ref_clk_enable_bcm47531(enable); break; } case GPS_IC_TYPE_4774: { ret = set_gps_ref_clk_enable_bcm4774(enable); break; } default: { printk(KERN_INFO "[GPS] can't find IC \n"); ret = -1; break; } } return ret; }
int set_gps_ref_clk_enable_bcm(bool enable) { int ret = 0; printk(KERN_INFO "[GPS] set_gps_ref_clk_enable(%d) \n", enable); if(GPS_IC_TYPE_4752 == get_gps_ic_type()) { set_gps_ref_clk_enable_bcm4752(enable); } else if(GPS_IC_TYPE_47531 == get_gps_ic_type()) { set_gps_ref_clk_enable_bcm47531(enable); } else { printk(KERN_INFO "[GPS] can't find IC \n"); } return 0; }
static int __init k3_gps_bcm_init(void) { #ifdef CONFIG_HWCONNECTIVITY //For OneTrack, we need check it's the right chip type or not. //If it's not the right chip type, don't init the driver if (!isMyConnectivityChip(CHIP_TYPE_BCM)) { printk(KERN_ERR "gps chip type is not match, skip driver init"); return -EINVAL; } else { printk(KERN_INFO "gps chip type is matched with Broadcom, continue"); } #endif if(GPS_IC_TYPE_4774 != get_gps_ic_type()) { printk(KERN_INFO "gps chip type is matched with Broadcom, but is not 4774"); return -EINVAL; } printk(KERN_INFO "gps chip type is matched with Broadcom, and it is 4774\n"); return platform_driver_register(&k3_gps_bcm_driver); }