Esempio n. 1
0
static int msm_fb_detect_panel(const char *name)
{
	if (machine_is_msm8x60_fluid()) {
		uint32_t soc_platform_version = socinfo_get_platform_version();
		if (SOCINFO_VERSION_MAJOR(soc_platform_version) < 3) {
#ifdef CONFIG_FB_MSM_LCDC_SAMSUNG_OLED_PT
			if (!strncmp(name, LCDC_SAMSUNG_OLED_PANEL_NAME,
					strlen(LCDC_SAMSUNG_OLED_PANEL_NAME)))
				return 0;
#endif
		} else { /*P3 and up use AUO panel */
#ifdef CONFIG_FB_MSM_LCDC_AUO_WVGA
			if (!strncmp(name, LCDC_AUO_PANEL_NAME,
					strlen(LCDC_AUO_PANEL_NAME)))
				return 0;
#endif
		}
		if (!strncmp(name, LCDC_SAMSUNG_WSVGA_PANEL_NAME,
				strlen(LCDC_SAMSUNG_WSVGA_PANEL_NAME)))
			return -ENODEV;
	} else {
		if (!strncmp(name, LCDC_SAMSUNG_WSVGA_PANEL_NAME,
				strlen(LCDC_SAMSUNG_WSVGA_PANEL_NAME)))
			return 0;
		if (!strncmp(name, LCDC_SAMSUNG_OLED_PANEL_NAME,
				strlen(LCDC_SAMSUNG_OLED_PANEL_NAME)))
			return -ENODEV;
	}
	pr_warning("%s: not supported '%s'", __func__, name);
	return -ENODEV;
}
Esempio n. 2
0
static int __init msm_peripheral_reset_init(void)
{
    if (pas_supported(PAS_DSPS) > 0) {
        pil_dsps_ops.init_image = init_image_dsps_trusted;
        pil_dsps_ops.auth_and_reset = reset_dsps_trusted;
        pil_dsps_ops.shutdown = shutdown_dsps_trusted;
    }

    if (machine_is_msm8x60_fluid())
        pil_dsps_desc.name = "dsps_fluid";
    BUG_ON(platform_device_register(&pil_dsps));
    BUG_ON(IS_ERR(msm_pil_register(&pil_dsps_desc)));

    return 0;
}
Esempio n. 3
0
static int __init msm_peripheral_reset_init(void)
{
	msm_mms_regs_base = ioremap(MSM_MMS_REGS_BASE, SZ_256);
	if (!msm_mms_regs_base)
		goto err;

	pxo = msm_xo_get(MSM_XO_PXO, "pil");
	if (IS_ERR(pxo))
		goto err_pxo;

	if (pas_supported(PAS_MODEM) > 0) {
		pil_modem_ops.init_image = init_image_modem_trusted;
		pil_modem_ops.auth_and_reset = reset_modem_trusted;
		pil_modem_ops.shutdown = shutdown_modem_trusted;
	}

	if (pas_supported(PAS_DSPS) > 0) {
		pil_dsps_ops.init_image = init_image_dsps_trusted;
		pil_dsps_ops.auth_and_reset = reset_dsps_trusted;
		pil_dsps_ops.shutdown = shutdown_dsps_trusted;
	}

	BUG_ON(platform_device_register(&pil_modem));
	BUG_ON(msm_pil_register(&pil_modem_desc));
	BUG_ON(platform_device_register(&pil_playready));
	BUG_ON(msm_pil_register(&pil_playready_desc));

	if (machine_is_msm8x60_fluid())
		pil_dsps_desc.name = "dsps_fluid";
	BUG_ON(platform_device_register(&pil_dsps));
	BUG_ON(msm_pil_register(&pil_dsps_desc));

	return 0;

err_pxo:
	iounmap(msm_mms_regs_base);
err:
	return -ENOMEM;
}