예제 #1
0
static int msm_fb_detect_panel(const char *name)
{
	int ret = -EPERM;

	if (machine_is_qsd8x50_ffa() || machine_is_qsd8x50a_ffa()) {
		if (!strncmp(name, "mddi_toshiba_wvga_pt", 20))
			ret = 0;
		else
			ret = -ENODEV;
	} else if ((machine_is_qsd8x50_surf() || machine_is_qsd8x50a_surf())
			&& !strcmp(name, "lcdc_external"))
		ret = 0;
	else if (0 /*machine_is_qsd8x50_grapefruit() */) {
		if (!strcmp(name, "lcdc_grapefruit_vga"))
			ret = 0;
		else
			ret = -ENODEV;
	} else if (machine_is_qsd8x50_st1()) {
		if (!strcmp(name, "lcdc_st1_wxga"))
			ret = 0;
		else
			ret = -ENODEV;
	} else if (machine_is_qsd8x50a_st1_5()) {
		if (!strcmp(name, "lcdc_st15") ||
		    !strcmp(name, "hdmi_sii9022"))
			ret = 0;
		else
			ret = -ENODEV;
	}

	return ret;
}
int msm_pm_app_rpc_init(void)
{

	if (!machine_is_qsd8x50_ffa() && !machine_is_qsd8x50a_ffa()
			&& !machine_is_msm7x27_ffa())
		return -ENOTSUPP;

	boost_vreg = vreg_get(NULL, "boost");
	if (IS_ERR(boost_vreg)) {
		pr_err("%s: boost vreg get failed\n", __func__);
		return PTR_ERR(boost_vreg);
	}

	usb_vreg = vreg_get(NULL, "usb");
	if (IS_ERR(usb_vreg)) {
		pr_err("%s: usb vreg get failed\n", __func__);
		vreg_put(usb_vreg);
		return PTR_ERR(usb_vreg);
	}

	client = msm_rpc_register_client("pmapp_usb",
			PM_APP_USB_PROG,
			PM_APP_USB_VERS_2_1, 1,
			pm_app_usb_cb_func);
	if (!IS_ERR(client)) {
		rpc_pmapp_init_rpc_ids(PM_APP_USB_VERS_2_1);
		goto done;
	}

	client = msm_rpc_register_client("pmapp_usb",
			PM_APP_USB_PROG,
			PM_APP_USB_VERS_1_2, 1,
			pm_app_usb_cb_func);
	if (!IS_ERR(client)) {
		rpc_pmapp_init_rpc_ids(PM_APP_USB_VERS_1_2);
		goto done;
	}

	client = msm_rpc_register_client("pmapp_usb",
			PM_APP_USB_PROG,
			PM_APP_USB_VERS_1_1, 1,
			pm_app_usb_cb_func);
	if (!IS_ERR(client))
		rpc_pmapp_init_rpc_ids(PM_APP_USB_VERS_1_1);
	else
		return PTR_ERR(client);

done:
	return 0;
}
예제 #3
0
static void __init qsd8x50_init_mmc(void)
{
    if (machine_is_qsd8x50_ffa() || machine_is_qsd8x50a_ffa())
        vreg_mmc = vreg_get(NULL, "gp6");
    else
        vreg_mmc = vreg_get(NULL, "gp5");

    if (IS_ERR(vreg_mmc)) {
        pr_err("vreg get for vreg_mmc failed (%ld)\n",
               PTR_ERR(vreg_mmc));
        return;
    }

    msm_add_sdcc(1, &qsd8x50_sdc1_data, 0, 0);
}
예제 #4
0
int msm_pm_app_rpc_init(void (*callback)(int online))
{
	uint32_t cb_id, rc;

	if (!machine_is_qsd8x50_ffa() && !machine_is_qsd8x50a_ffa()
			&& !machine_is_msm7x27_ffa())
		return -ENOTSUPP;

	client = msm_rpc_register_client("pmapp_usb",
			PMAPP_RPC_PROG,
			PMAPP_RPC_VER_2_1, 1,
			pm_app_usb_cb_func);
	if (!IS_ERR(client)) {
		rpc_pmapp_init_rpc_ids(PMAPP_RPC_VER_2_1);
		goto done;
	}

	client = msm_rpc_register_client("pmapp_usb",
			PMAPP_RPC_PROG,
			PMAPP_RPC_VER_1_2, 1,
			pm_app_usb_cb_func);
	if (!IS_ERR(client)) {
		rpc_pmapp_init_rpc_ids(PMAPP_RPC_VER_1_2);
		goto done;
	}

	client = msm_rpc_register_client("pmapp_usb",
			PMAPP_RPC_PROG,
			PMAPP_RPC_VER_1_1, 1,
			pm_app_usb_cb_func);
	if (!IS_ERR(client))
		rpc_pmapp_init_rpc_ids(PMAPP_RPC_VER_1_1);
	else
		return PTR_ERR(client);

done:
	cb_id = msm_rpc_add_cb_func(client, (void *)callback);
	/* In case of NULL callback funtion, cb_id would be -1 */
	if ((int) cb_id < -1)
		return cb_id;
	rc =  msm_rpc_client_req(client,
		rpc_ids.reg_for_vbus_valid,
			vbus_sess_valid_arg_cb,
				&cb_id, NULL, NULL, -1);
	return rc;
}