Exemplo n.º 1
0
void __init msm8930_add_vidc_device(void)
{
	if (cpu_is_msm8627()) {
		struct msm_vidc_platform_data *pdata;
		pdata = (struct msm_vidc_platform_data *)
			apq8930_msm_device_vidc.dev.platform_data;
		pdata->disable_fullhd = 1;
	}
	platform_add_devices(vidc_device, ARRAY_SIZE(vidc_device));
}
Exemplo n.º 2
0
static void __exit msm8930_audio_exit(void)
{
	if (!cpu_is_msm8930() && !cpu_is_msm8930aa() && !cpu_is_msm8627()) {
		pr_err("%s: Not the right machine type\n", __func__);
		return ;
	}
	msm8930_free_headset_mic_gpios();
	platform_device_unregister(msm8930_snd_device);
	kfree(mbhc_cfg.calibration);
}
Exemplo n.º 3
0
static int __init msm8930_audio_init(void)
{
	int ret;

/* Jen Chang merge from detroit_2.0 for boot log */
	printk("BootLog, +%s\n", __func__);
/* Jen Chang, 20120924 */

	if (!cpu_is_msm8930() && !cpu_is_msm8930aa() && !cpu_is_msm8627()) {
		pr_err("%s: Not the right machine type\n", __func__);
		return -ENODEV ;
	}
	mbhc_cfg.calibration = def_sitar_mbhc_cal();
	if (!mbhc_cfg.calibration) {
		pr_err("Calibration data allocation failed\n");
		return -ENOMEM;
	}

	msm8930_snd_device = platform_device_alloc("soc-audio", 0);
	if (!msm8930_snd_device) {
		pr_err("Platform device allocation failed\n");
		kfree(mbhc_cfg.calibration);
		return -ENOMEM;
	}

	platform_set_drvdata(msm8930_snd_device, &snd_soc_card_msm8930);
	ret = platform_device_add(msm8930_snd_device);
	if (ret) {
		platform_device_put(msm8930_snd_device);
		kfree(mbhc_cfg.calibration);
		return ret;
	}

	if (msm8930_configure_headset_mic_gpios()) {
		pr_err("%s Fail to configure headset mic gpios\n", __func__);
		msm8930_headset_gpios_configured = 0;
	} else
		msm8930_headset_gpios_configured = 1;

	atomic_set(&auxpcm_rsc_ref, 0);
/* Jen Chang merge from detroit_2.0 for boot log */
	snd_create_kernel_debuglevel_entries();
	printk("BootLog, -%s, ret=%d\n", __func__, ret);
/* Jen Chang, 20120924 */
	return ret;

}
Exemplo n.º 4
0
static int __cpuinit release_secondary(unsigned int cpu)
{
	BUG_ON(cpu >= get_core_count());

	if (cpu_is_msm8x60())
		return scorpion_release_secondary();

	if (machine_is_msm8960_sim() || machine_is_msm8960_rumi3() ||
	    machine_is_apq8064_sim())
		return krait_release_secondary_sim(0x02088000, cpu);

	if (cpu_is_msm8960() || cpu_is_msm8930() || cpu_is_msm8930aa() ||
	    cpu_is_apq8064() || cpu_is_msm8627() || cpu_is_apq8064ab())
		return krait_release_secondary(0x02088000, cpu);

	WARN(1, "unknown CPU case in release_secondary\n");
	return -EINVAL;
}
Exemplo n.º 5
0
static int tz_init(struct kgsl_device *device, struct kgsl_pwrscale *pwrscale)
{
	struct tz_priv *priv;

	/* Trustzone is only valid for some SOCs */
	if (!(cpu_is_msm8x60() || cpu_is_msm8960() || cpu_is_apq8064() ||
		cpu_is_msm8930() || cpu_is_msm8627()))
		return -EINVAL;

	priv = pwrscale->priv = kzalloc(sizeof(struct tz_priv), GFP_KERNEL);
	if (pwrscale->priv == NULL)
		return -ENOMEM;

	priv->governor = TZ_GOVERNOR_ONDEMAND;
	spin_lock_init(&tz_lock);
	kgsl_pwrscale_policy_add_files(device, pwrscale, &tz_attr_group);

	return 0;
}
Exemplo n.º 6
0
static int __init msm8930_audio_init(void)
{
	int ret;

	if (!cpu_is_msm8930() && !cpu_is_msm8930aa() && !cpu_is_msm8627()) {
		pr_err("%s: Not the right machine type\n", __func__);
		return -ENODEV ;
	}
	mbhc_cfg.calibration = def_sitar_mbhc_cal();
	if (!mbhc_cfg.calibration) {
		pr_err("Calibration data allocation failed\n");
		return -ENOMEM;
	}

	msm8930_snd_device = platform_device_alloc("soc-audio", 0);
	if (!msm8930_snd_device) {
		pr_err("Platform device allocation failed\n");
		kfree(mbhc_cfg.calibration);
		return -ENOMEM;
	}

	platform_set_drvdata(msm8930_snd_device, &snd_soc_card_msm8930);
	ret = platform_device_add(msm8930_snd_device);
	if (ret) {
		platform_device_put(msm8930_snd_device);
		kfree(mbhc_cfg.calibration);
		return ret;
	}

	if (msm8930_configure_headset_mic_gpios()) {
		pr_err("%s Fail to configure headset mic gpios\n", __func__);
		msm8930_headset_gpios_configured = 0;
	} else
		msm8930_headset_gpios_configured = 1;

	atomic_set(&auxpcm_rsc_ref, 0);
	return ret;

}
void __init msm8930_init_fb(void)
{
	platform_device_register(&msm_fb_device);

#ifdef CONFIG_FB_MSM_WRITEBACK_MSM_PANEL
	platform_device_register(&wfd_panel_device);
	platform_device_register(&wfd_device);
#endif

	platform_device_register(&mipi_dsi_novatek_panel_device);

#ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL
	if (!cpu_is_msm8627())
		platform_device_register(&hdmi_msm_device);
#endif

	platform_device_register(&mipi_dsi_toshiba_panel_device);

	msm_fb_register_device("mdp", &mdp_pdata);
	msm_fb_register_device("mipi_dsi", &mipi_dsi_pdata);
#ifdef CONFIG_MSM_BUS_SCALING
	msm_fb_register_device("dtv", &dtv_pdata);
#endif
}
static int __init modem_8960_init(void)
{
    int ret;

    if (!cpu_is_msm8960() && !cpu_is_msm8930() && !cpu_is_msm8930aa() &&
            !cpu_is_msm9615() && !cpu_is_msm8627())
        return -ENODEV;

    ret = smsm_state_cb_register(SMSM_MODEM_STATE, SMSM_RESET,
                                 smsm_state_cb, 0);

    if (ret < 0)
        pr_err("%s: Unable to register SMSM callback! (%d)\n",
               __func__, ret);

    ret = request_irq(Q6FW_WDOG_EXPIRED_IRQ, modem_wdog_bite_irq,
                      IRQF_TRIGGER_RISING, "modem_wdog_fw", NULL);

    if (ret < 0) {
        pr_err("%s: Unable to request q6fw watchdog IRQ. (%d)\n",
               __func__, ret);
        goto out;
    }

    ret = request_irq(Q6SW_WDOG_EXPIRED_IRQ, modem_wdog_bite_irq,
                      IRQF_TRIGGER_RISING, "modem_wdog_sw", NULL);

    if (ret < 0) {
        pr_err("%s: Unable to request q6sw watchdog IRQ. (%d)\n",
               __func__, ret);
        disable_irq_nosync(Q6FW_WDOG_EXPIRED_IRQ);
        goto out;
    }

    ret = modem_subsystem_restart_init();

    if (ret < 0) {
        pr_err("%s: Unable to reg with subsystem restart. (%d)\n",
               __func__, ret);
        goto out;
    }

    modemfw_ramdump_dev = create_ramdump_device("modem_fw");

    if (!modemfw_ramdump_dev) {
        pr_err("%s: Unable to create modem fw ramdump device. (%d)\n",
               __func__, -ENOMEM);
        ret = -ENOMEM;
        goto out;
    }

    modemsw_ramdump_dev = create_ramdump_device("modem_sw");

    if (!modemsw_ramdump_dev) {
        pr_err("%s: Unable to create modem sw ramdump device. (%d)\n",
               __func__, -ENOMEM);
        ret = -ENOMEM;
        goto out;
    }

    smem_ramdump_dev = create_ramdump_device("smem-modem");

    if (!smem_ramdump_dev) {
        pr_err("%s: Unable to create smem ramdump device. (%d)\n",
               __func__, -ENOMEM);
        ret = -ENOMEM;
        goto out;
    }

    ret = modem_debugfs_init();

    pr_info("%s: modem fatal driver init'ed.\n", __func__);
out:
    return ret;
}
Exemplo n.º 9
0
/* ZTE_Audio_LCX_130325, lichaoxia, 2013-03-25, end */
static int msm8930_configure_headset_mic_gpios(void)
{
	int ret;
	
/* ZTE_Audio_LCX_130325, lichaoxia, 2013-03-25, start */
#if defined(CONFIG_US_EURO_SWITCH)   
	
	struct pm_gpio param = {
		.direction      = PM_GPIO_DIR_OUT,
		.output_buffer  = PM_GPIO_OUT_BUF_CMOS,
		.output_value   = 1,
		.pull	   = PM_GPIO_PULL_NO,
		.vin_sel	= PM_GPIO_VIN_S4,
		.out_strength   = PM_GPIO_STRENGTH_MED,
		.function       = PM_GPIO_FUNC_NORMAL,
	};

	ret = gpio_request(us_euro_sel_gpio, "US_EURO_SWITCH");
	if (ret) {
		pr_err("%s: Failed to request gpio %d\n", __func__,
		       us_euro_sel_gpio);
		return ret;
	}

	ret = pm8xxx_gpio_config(us_euro_sel_gpio, &param);
	if (ret)
		pr_err("%s: Failed to configure gpio %d\n", __func__,
		       us_euro_sel_gpio);
	else

	gpio_direction_output(us_euro_sel_gpio, 0);

#else
	ret = gpio_request(80, "US_EURO_SWITCH");
	if (ret) {
		pr_err("%s: Failed to request gpio 80\n", __func__);
		return ret;
	}
	ret = gpio_direction_output(80, 0);
	if (ret) {
		pr_err("%s: Unable to set direction\n", __func__);
		gpio_free(80);
	}
#endif
/* ZTE_Audio_LCX_130325, lichaoxia, 2013-03-25, end */

	msm8930_headset_gpios_configured = 0;
	return 0;
}

static void msm8930_free_headset_mic_gpios(void)
{
	if (msm8930_headset_gpios_configured)

/* ZTE_Audio_LCX_130325, lichaoxia, 2013-03-25, start */
#if defined(CONFIG_US_EURO_SWITCH)
		gpio_free(us_euro_sel_gpio);
#else
		gpio_free(80);
#endif
/* ZTE_Audio_LCX_130325, lichaoxia, 2013-03-25, end */
}

static int __init msm8930_audio_init(void)
{
	int ret;

	if (!cpu_is_msm8930() && !cpu_is_msm8930aa() && !cpu_is_msm8627()) {
		pr_err("%s: Not the right machine type\n", __func__);
		return -ENODEV ;
	}
	mbhc_cfg.calibration = def_sitar_mbhc_cal();
	if (!mbhc_cfg.calibration) {
		pr_err("Calibration data allocation failed\n");
		return -ENOMEM;
	}

	msm8930_snd_device = platform_device_alloc("soc-audio", 0);
	if (!msm8930_snd_device) {
		pr_err("Platform device allocation failed\n");
		kfree(mbhc_cfg.calibration);
		return -ENOMEM;
	}

	platform_set_drvdata(msm8930_snd_device, &snd_soc_card_msm8930);
	ret = platform_device_add(msm8930_snd_device);
	if (ret) {
		platform_device_put(msm8930_snd_device);
		kfree(mbhc_cfg.calibration);
		return ret;
	}

	if (msm8930_configure_headset_mic_gpios()) {
		pr_err("%s Fail to configure headset mic gpios\n", __func__);
		msm8930_headset_gpios_configured = 0;
	} else
		msm8930_headset_gpios_configured = 1;

	atomic_set(&auxpcm_rsc_ref, 0);
	return ret;

}