static int __devinit hs_rpc_init(void) { int rc; rc = hs_rpc_cb_init(); #if defined(CONFIG_MACH_LGE) && !defined(CONFIG_MACH_MSM7X27_SWIFT) if (rc) { pr_err("%s: failed to initialize rpc client\n", __func__); return rc; } rc = msm_rpc_create_server(&hs_rpc_server); if (rc) pr_err("%s: failed to create rpc server\n", __func__); #else if (rc) { pr_err("%s: failed to initialize rpc client, try server...\n", __func__); rc = msm_rpc_create_server(&hs_rpc_server); if (rc) { pr_err("%s: failed to create rpc server\n", __func__); return rc; } } #endif return rc; }
static int __init rpc_server_init(void) { int ret; ret = msm_rpc_create_server(&rpc_server[1]); if (ret < 0) return ret; return msm_rpc_create_server(&rpc_server[0]); }
static int __init rpc_server_init(void) { /* Dual server registration to support backwards compatibility vers */ int ret; ret = msm_rpc_create_server(&rpc_server[1]); if (ret < 0) return ret; return msm_rpc_create_server(&rpc_server[0]); }
static int __init rpc_server_init(void) { /* Dual server registration to support backwards compatibility vers */ int ret; ret = msm_rpc_create_server(&rpc_server[2]); if (ret < 0) return ret; ret = msm_rpc_create_server(&rpc_server[1]); if (ret < 0) return ret; printk(KERN_ERR "Using very old AMSS modem firmware.\n"); return msm_rpc_create_server(&rpc_server[0]); }
static int __init shterm_init( void ) { int ret; ret = msm_rpc_create_server( &shterm_rpc_server ); ret = misc_register( &shterm_dev ); if( ret ){ printk( "misc_register failure %s\n", __FUNCTION__ ); return ret; } ret = misc_register( &shterm_cmd_dev ); if( ret ){ printk( "misc_register failure %s\n", __FUNCTION__ ); return ret; } endpoint = msm_rpc_connect_compatible( SHTERM_A2M_PROG, SHTERM_A2M_VERS, 0 ); if( IS_ERR(endpoint) ){ printk( "%s: init rpc failed! ret = %lx\n", __FUNCTION__, PTR_ERR(endpoint) ); return -1; } return ret; }
static int __devinit hs_rpc_init(void) { int rc; rc = hs_rpc_cb_init(); if (rc) { pr_err("%s: failed to initialize rpc client, try server...\n", __func__); } rc = msm_rpc_create_server(&hs_rpc_server); if (rc) { pr_err("%s: failed to create rpc server\n", __func__); return rc; } rpc_svc_p = msm_rpc_connect_compatible(HS_RPC_PROG,HS_RPC_VERS_1,0); if(IS_ERR(rpc_svc_p)) { pr_err("%s: couldn't connect compatible rpc client err %ld\n", __func__, PTR_ERR(rpc_svc_p)); rpc_svc_p = msm_rpc_connect_compatible(HS_RPC_PROG,HS_RPC_VERS_2,0); } if(IS_ERR(rpc_svc_p)) { pr_err("%s: couldn't connect compatible rpc client err %ld\n", __func__, PTR_ERR(rpc_svc_p)); return PTR_ERR(rpc_svc_p); } return rc; }
static int __init rpc_server_init(void) { int rc = 0; //rc = msm_rpc_create_server(&rpc_server_keypad); rc = msm_rpc_create_server(&rpc_server_misc_apps); //rc = msm_rpc_create_server(&rpc_server_fffe); return rc; }
static int __devinit hs_rpc_init(void) { int rc; rc = hs_rpc_cb_init(); //#ifdef CONFIG_MACH_LGE #if 0 /* FIXME: following code is from qualcomm's 2.6.32 kernel * in qualcomm's original code in 7020 version, * rpc server of handset can't be created in any case. * so, power key event is never passed from arm9. * this comes from fact that hs_rpc_cb_init() always returns '0' * and subsequently msm_rpc_create_server() is never called. * this is obvious qualcomm's bug. * I expect that qualcomm fix this bug later. * 2010-11-18, [email protected] */ if (rc) { pr_err("%s: failed to initialize rpc client\n", __func__); return rc; } rc = msm_rpc_create_server(&hs_rpc_server); if (rc) pr_err("%s: failed to create rpc server\n", __func__); #else if (rc) { pr_err("%s: failed to initialize rpc client, try server...\n", __func__); rc = msm_rpc_create_server(&hs_rpc_server); if (rc) { pr_err("%s: failed to create rpc server\n", __func__); return rc; } } #endif return rc; }
static int __devinit hs_rpc_init(void) { int rc; rc = hs_rpc_cb_init(); if (rc) pr_err("%s: failed to initialize rpc client\n", __func__); rc = msm_rpc_create_server(&hs_rpc_server); if (rc < 0) pr_err("%s: failed to create rpc server\n", __func__); return 0; }
static int __init rpc_server_init(void) { uint32_t time_vers; if (!amss_get_id(AMSS_TIME_REMOTE_MTOA_VERS, &time_vers)) { printk(KERN_ERR "%s: failed to get AMSS_TIME_REMOTE_MTOA_VERS\n", __func__); return -1; } if (!amss_get_id(AMSS_TIME_TOD_SET_APPS_BASES, &tod_app_bases)) { printk(KERN_ERR "%s: failed to get AMSS_TIME_TOD_SET_APPS_BASES\n", __func__); return -1; } rpc_server.vers = time_vers; /* Dual server registration to support backwards compatibility vers */ return msm_rpc_create_server(&rpc_server); }
static int __devinit hs_rpc_init(void) { int rc; if (machine_is_msm7x27_surf() || machine_is_msm7x27_ffa() || machine_is_qsd8x50_surf() || machine_is_qsd8x50_ffa() || machine_is_msm7x30_surf() || machine_is_msm7x30_ffa()) { rc = hs_rpc_cb_init(); if (rc) pr_err("%s: failed to initialize\n", __func__); } rc = msm_rpc_create_server(&hs_rpc_server); if (rc < 0) pr_err("%s: failed to create rpc server\n", __func__); return 0; }
static int __devinit hs_rpc_init(void) { int rc; rc = hs_rpc_cb_init(); if (rc) { pr_err("%s: failed to initialize rpc client, try server...\n", __func__); } //LHX_PM_20110105_01 match for AMSS rc = msm_rpc_create_server(&hs_rpc_server); if (rc) { pr_err("%s: failed to create rpc server\n", __func__); return rc; } return rc; }
static int hs_rpc_init(void) { int rc; rc = hs_rpc_cb_init(); if (rc) { pr_err("%s: failed to initialize rpc client, try server...\n", __func__); rc = msm_rpc_create_server(&hs_rpc_server); if (rc) { pr_err("%s: failed to create rpc server\n", __func__); return rc; } } return rc; }
static int __init shswic_init( void ) { int err = -ENODEV; msm_rpc_create_server(&shswic_rpc_server); err = misc_register(&shswic_diag_device); if (err) { misc_deregister(&shswic_diag_device); SHSWIC_DEBUG_LOG_1("shswic_diag_device: register failed\n"); } ep_shswic_p = msm_rpc_connect(SHSWIC_REMOTE_A2MPROG, SHSWIC_REMOTE_A2MVERS, 0); if (IS_ERR(ep_shswic_p)) { SHSWIC_DEBUG_LOG_1("rpc connect failed"); return -1; } return 0; }
static int __init lge_ats_init(void) { int err; if((err = msm_rpc_create_server(&ats_rpc_server)) != 0) { printk(KERN_ERR"%s: Error during creating rpc server for ats atcmd\n", __func__); return err; } lge_ats_data.handle_atcmd = lge_ats_handle_atcmd; lge_ats_data.handle_atcmd_eta = lge_ats_handle_atcmd_eta; lge_ats_data.update_atcmd_state = lge_ats_update_atcmd_state; lge_ats_data.handle_flex = lge_ats_handle_flex; //LGE_CHAGE[[email protected]] 2010-06- 04 - to get flex value from ARM9 #ifdef CONFIG_LGE_SUPPORT_AT_CMD platform_device_register(&ats_atcmd_device); #endif #ifdef CONFIG_LGE_ATS_INPUT_DEVICE platform_device_register(&ats_input_device); #endif return err; }
static int __init rpc_server_init(void) { /* Dual server registration to support backwards compatibility vers */ rpc_server.vers = amss_get_num_value(DOG_KEEPALIVE_VERS); return msm_rpc_create_server(&rpc_server); }
static int __init rpc_misc_server_init(void) { return msm_rpc_create_server(&rpc_server); }
static int htc_headset_mgr_probe(struct platform_device *pdev) { int ret; struct htc_headset_mgr_platform_data *pdata = pdev->dev.platform_data; HS_LOG("++++++++++++++++++++"); hi = kzalloc(sizeof(struct htc_headset_mgr_info), GFP_KERNEL); if (!hi) return -ENOMEM; hi->pdata.driver_flag = pdata->driver_flag; hi->pdata.headset_devices_num = pdata->headset_devices_num; hi->pdata.headset_devices = pdata->headset_devices; hi->driver_init_seq = 0; wake_lock_init(&hi->hs_wake_lock, WAKE_LOCK_SUSPEND, DRIVER_NAME); hi->hpin_jiffies = jiffies; hi->usb_headset.type = USB_NO_HEADSET; hi->usb_headset.status = STATUS_DISCONNECTED; hi->ext_35mm_status = HTC_35MM_UNPLUG; hi->h2w_35mm_status = HTC_35MM_UNPLUG; hi->is_ext_insert = 0; hi->mic_bias_state = 0; hi->mic_detect_counter = 0; hi->key_level_flag = -1; atomic_set(&hi->btn_state, 0); hi->tty_enable_flag = 0; hi->fm_flag = 0; hi->debug_flag = 0; mutex_init(&hi->mutex_lock); hi->sdev.name = "h2w"; hi->sdev.print_name = h2w_print_name; ret = switch_dev_register(&hi->sdev); if (ret < 0) goto err_switch_dev_register; detect_wq = create_workqueue("detect"); if (detect_wq == NULL) { ret = -ENOMEM; HS_ERR("Failed to create detect workqueue"); goto err_create_detect_work_queue; } button_wq = create_workqueue("button"); if (button_wq == NULL) { ret = -ENOMEM; HS_ERR("Failed to create button workqueue"); goto err_create_button_work_queue; } hi->input = input_allocate_device(); if (!hi->input) { ret = -ENOMEM; goto err_request_input_dev; } hi->input->name = "h2w headset"; set_bit(EV_SYN, hi->input->evbit); set_bit(EV_KEY, hi->input->evbit); set_bit(KEY_END, hi->input->keybit); set_bit(KEY_MUTE, hi->input->keybit); set_bit(KEY_VOLUMEDOWN, hi->input->keybit); set_bit(KEY_VOLUMEUP, hi->input->keybit); set_bit(KEY_NEXTSONG, hi->input->keybit); set_bit(KEY_PLAYPAUSE, hi->input->keybit); set_bit(KEY_PREVIOUSSONG, hi->input->keybit); set_bit(KEY_MEDIA, hi->input->keybit); set_bit(KEY_SEND, hi->input->keybit); ret = input_register_device(hi->input); if (ret < 0) goto err_register_input_dev; ret = register_attributes(); if (ret) goto err_register_attributes; if (hi->pdata.driver_flag & DRIVER_HS_MGR_RPC_SERVER) { /* Create RPC server */ ret = msm_rpc_create_server(&hs_rpc_server); if (ret < 0) { HS_ERR("Failed to create RPC server"); goto err_create_rpc_server; } HS_LOG("Create RPC server successfully"); } hs_notify_driver_ready(DRIVER_NAME); HS_LOG("--------------------"); return 0; err_create_rpc_server: err_register_attributes: input_unregister_device(hi->input); err_register_input_dev: input_free_device(hi->input); err_request_input_dev: destroy_workqueue(button_wq); err_create_button_work_queue: destroy_workqueue(detect_wq); err_create_detect_work_queue: switch_dev_unregister(&hi->sdev); err_switch_dev_register: mutex_destroy(&hi->mutex_lock); wake_lock_destroy(&hi->hs_wake_lock); kfree(hi); HS_ERR("Failed to register %s driver", DRIVER_NAME); return ret; }
static int __init htc_battery_init(void) { platform_driver_register(&htc_battery_driver); msm_rpc_create_server(&battery_server); return 0; }
static int __init rpc_server_init(void) { /* Dual server registration to support backwards compatibility vers */ return msm_rpc_create_server(&rpc_server); }
static int htc_headset_mgr_probe(struct platform_device *pdev) { int ret; struct htc_headset_mgr_platform_data *pdata = pdev->dev.platform_data; HS_LOG("++++++++++++++++++++"); hi = kzalloc(sizeof(struct htc_headset_mgr_info), GFP_KERNEL); if (!hi) return -ENOMEM; hi->pdata.driver_flag = pdata->driver_flag; hi->pdata.headset_devices_num = pdata->headset_devices_num; hi->pdata.headset_devices = pdata->headset_devices; hi->pdata.headset_config_num = pdata->headset_config_num; hi->pdata.headset_config = pdata->headset_config; hi->pdata.hptv_det_hp_gpio = pdata->hptv_det_hp_gpio; hi->pdata.hptv_det_tv_gpio = pdata->hptv_det_tv_gpio; hi->pdata.hptv_sel_gpio = pdata->hptv_sel_gpio; hi->pdata.headset_init = pdata->headset_init; hi->pdata.headset_power = pdata->headset_power; if (hi->pdata.headset_init) hi->pdata.headset_init(); hi->driver_init_seq = 0; hi->early_suspend.suspend = htc_headset_mgr_early_suspend; hi->early_suspend.resume = htc_headset_mgr_late_resume; register_early_suspend(&hi->early_suspend); wake_lock_init(&hi->hs_wake_lock, WAKE_LOCK_SUSPEND, DRIVER_NAME); hi->hpin_jiffies = jiffies; hi->usb_headset.type = USB_NO_HEADSET; hi->usb_headset.status = STATUS_DISCONNECTED; hi->hs_35mm_type = HEADSET_UNPLUG; hi->h2w_35mm_type = HEADSET_UNPLUG; hi->is_ext_insert = 0; hi->mic_bias_state = 0; hi->mic_detect_counter = 0; hi->key_level_flag = -1; hi->quick_boot_status = 0; atomic_set(&hi->btn_state, 0); hi->tty_enable_flag = 0; hi->fm_flag = 0; hi->debug_flag = 0; mutex_init(&hi->mutex_lock); hi->sdev_h2w.name = "h2w"; hi->sdev_h2w.print_name = h2w_print_name; ret = switch_dev_register(&hi->sdev_h2w); if (ret < 0) goto err_h2w_switch_dev_register; hi->sdev_usb_audio.name = "usb_audio"; hi->sdev_usb_audio.print_name = usb_audio_print_name; ret = switch_dev_register(&hi->sdev_usb_audio); if (ret < 0) goto err_usb_audio_switch_dev_register; detect_wq = create_workqueue("detect"); if (detect_wq == NULL) { ret = -ENOMEM; HS_ERR("Failed to create detect workqueue"); goto err_create_detect_work_queue; } button_wq = create_workqueue("button"); if (button_wq == NULL) { ret = -ENOMEM; HS_ERR("Failed to create button workqueue"); goto err_create_button_work_queue; } hi->input = input_allocate_device(); if (!hi->input) { ret = -ENOMEM; goto err_request_input_dev; } hi->input->name = "h2w headset"; set_bit(EV_SYN, hi->input->evbit); set_bit(EV_KEY, hi->input->evbit); set_bit(KEY_END, hi->input->keybit); set_bit(KEY_MUTE, hi->input->keybit); set_bit(KEY_VOLUMEDOWN, hi->input->keybit); set_bit(KEY_VOLUMEUP, hi->input->keybit); set_bit(KEY_NEXTSONG, hi->input->keybit); set_bit(KEY_PLAYPAUSE, hi->input->keybit); set_bit(KEY_PREVIOUSSONG, hi->input->keybit); set_bit(KEY_MEDIA, hi->input->keybit); set_bit(KEY_SEND, hi->input->keybit); ret = input_register_device(hi->input); if (ret < 0) goto err_register_input_dev; ret = register_attributes(); if (ret) goto err_register_attributes; #ifdef HTC_HEADSET_CONFIG_MSM_RPC if (hi->pdata.driver_flag & DRIVER_HS_MGR_RPC_SERVER) { /* Create RPC server */ ret = msm_rpc_create_server(&hs_rpc_server); if (ret < 0) { HS_ERR("Failed to create RPC server"); goto err_create_rpc_server; } HS_LOG("Create RPC server successfully"); } #else HS_DBG("NOT support RPC (%du, %du)", hs_rpc_server.prog, hs_rpc_server.vers); #endif headset_mgr_init(); hs_notify_driver_ready(DRIVER_NAME); HS_LOG("--------------------"); return 0; #ifdef HTC_HEADSET_CONFIG_MSM_RPC err_create_rpc_server: #endif err_register_attributes: input_unregister_device(hi->input); err_register_input_dev: input_free_device(hi->input); err_request_input_dev: destroy_workqueue(button_wq); err_create_button_work_queue: destroy_workqueue(detect_wq); err_create_detect_work_queue: switch_dev_unregister(&hi->sdev_usb_audio); err_usb_audio_switch_dev_register: switch_dev_unregister(&hi->sdev_h2w); err_h2w_switch_dev_register: mutex_destroy(&hi->mutex_lock); wake_lock_destroy(&hi->hs_wake_lock); kfree(hi); HS_ERR("Failed to register %s driver", DRIVER_NAME); return ret; }
static int __init hs_rpc_server_init(void) { return msm_rpc_create_server(&hs_rpc_server); }