Exemplo n.º 1
0
void __init exynos5_universal5410_2mic_init(void)
{
	int ret;
	universal5410_2mic_gpio_init();

	if (system_rev < 0x3)
		es325_pdata.use_sleep = false;

	exynos5_hs_i2c0_set_platdata(&hs_i2c4_data);
	ret = i2c_register_board_info(4, i2c_devs4, ARRAY_SIZE(i2c_devs4));

	platform_add_devices(universal5410_2mic_devices,
			ARRAY_SIZE(universal5410_2mic_devices));
}
void __init exynos5_universal5410_audio_init(void)
{
	int ret;

	exynos5_audio_init();
	universal5410_audio_gpio_init();

#ifdef CONFIG_SND_SOC_WM1811
	exynos5_hs_i2c0_set_platdata(&hs_i2c_data_audio);
	ret = i2c_register_board_info(4, i2c_devs_audio, ARRAY_SIZE(i2c_devs_audio));
#endif

#ifdef CONFIG_SND_SOC_WM5102
	s3c_gpio_cfgpin(EXYNOS5410_GPJ1(4), S3C_GPIO_SFN(0xf));
	s3c_gpio_setpull(EXYNOS5410_GPJ1(4), S3C_GPIO_PULL_NONE);

#ifdef MODE_WM5102_SPI
	ret = exynos_spi_cfg_cs(spi_audio_csi[0].line, 2);
	if (!ret) {
		s3c64xx_spi2_set_platdata(&s3c64xx_spi2_pdata,
			EXYNOS_SPI_SRCCLK_SCLK, ARRAY_SIZE(spi_audio_csi));
	} else
		pr_err(KERN_ERR "Error requesting gpio for SPI-CH2 CS\n");
#endif

#if defined(MODE_WM5102_SPI) || defined(MODE_WM5102_SPI_EMUL)
	ret = spi_register_board_info(spi_board_info,
						ARRAY_SIZE(spi_board_info));
	if (ret)
		pr_err("ERR! spi_register_board_info fail (err %d)\n", ret);
#endif

#ifdef MODE_WM5102_I2C_EMUL
	//i2c_devs12_emul[0].irq = gpio_to_irq(EXYNOS5410_GPJ1(4));
	platform_device_register(&s3c_device_i2c12);
	ret = i2c_register_board_info(12, i2c_devs12_emul,
				ARRAY_SIZE(i2c_devs12_emul));
#endif
#endif

	platform_add_devices(universal5410_audio_devices,
			ARRAY_SIZE(universal5410_audio_devices));

	exynos5_universal5410_2mic_init();
}
void __init exynos5_smdk5420_power_init(void)
{
	exynos5_hs_i2c0_set_platdata(NULL);
	i2c_register_board_info(4, hs_i2c_devs0, ARRAY_SIZE(hs_i2c_devs0));
#ifdef CONFIG_EXYNOS_THERMAL
	exynos_tmu_set_platdata(&exynos5_tmu_data);
#endif

#ifdef CONFIG_ARM_EXYNOS5420_BUS_DEVFREQ
	s3c_set_platdata(&smdk5420_qos_mif_pd, sizeof(struct exynos_devfreq_platdata),
			&exynos5_mif_devfreq);
	s3c_set_platdata(&smdk5420_qos_int_pd, sizeof(struct exynos_devfreq_platdata),
			&exynos5_int_devfreq);
#endif

	platform_add_devices(smdk5420_power_devices,
			ARRAY_SIZE(smdk5420_power_devices));
}
Exemplo n.º 4
0
void __init exynos5_smdk5410_power_init(void)
{
	exynos5_hs_i2c0_set_platdata(NULL);
	i2c_register_board_info(4, hs_i2c_devs0, ARRAY_SIZE(hs_i2c_devs0));
#ifdef CONFIG_PM_DEVFREQ
	s3c_set_platdata(&smdk5410_qos_mif_pd, sizeof(struct exynos_devfreq_platdata),
			&exynos5_mif_devfreq);

	s3c_set_platdata(&smdk5410_qos_int_pd, sizeof(struct exynos_devfreq_platdata),
			&exynos5_int_devfreq);
#endif

	s3c_set_platdata(&exynos5_tmu_data, sizeof(struct exynos_tmu_platform_data),
			&exynos5410_device_tmu);

	platform_add_devices(smdk5410_power_devices,
			ARRAY_SIZE(smdk5410_power_devices));
}
Exemplo n.º 5
0
void __init board_hl_pmic_init(void)
{
    printk( "system rev A %d", system_rev);

	if( system_rev <= 3 ){
		exynos5_s2m_pdata.num_regulators = ARRAY_SIZE(exynos_regulators_evt0),
		exynos5_s2m_pdata.regulators = exynos_regulators_evt0;
	}

	if( system_rev == 0 ){
		universal5260_power_devices[0]=&s3c_device_i2c1;
		s3c_i2c1_set_platdata(&s3c_i2c_data1);
		i2c_register_board_info(5, s3c_i2c_devs1, ARRAY_SIZE(s3c_i2c_devs1));
	}else{
		exynos5_hs_i2c0_set_platdata(&hs_i2c0_data);
		i2c_register_board_info(0, hs_i2c_devs0, ARRAY_SIZE(hs_i2c_devs0));
	}

	platform_add_devices(universal5260_power_devices,
			ARRAY_SIZE(universal5260_power_devices));
}
void __init exynos5_universal5420_sensor_init(void)
{
	int ret = 0;

	pr_info("%s, is called\n", __func__);

#ifdef CONFIG_SENSORS_SSP
	ret = initialize_ssp_gpio();
	if (ret < 0)
		pr_err("%s, initialize_ssp_gpio fail(err=%d)\n", __func__, ret);
#endif

#if defined(CONFIG_V1A) || defined(CONFIG_N1A)
	s3c_i2c3_set_platdata(NULL);
	ret = i2c_register_board_info(3, i2c_devs3, ARRAY_SIZE(i2c_devs3));
	if (ret < 0) {
		pr_err("%s, i2c3 adding i2c fail(err=%d)\n", __func__, ret);
	}

	ret = platform_device_register(&s3c_device_i2c3);
	if (ret < 0)
		pr_err("%s, sensor platform device register failed (err=%d)\n",
			__func__, ret);

#endif

#if defined(CONFIG_V1A_3G) || defined(CONFIG_N1A_3G)
	exynos5_hs_i2c0_set_platdata(&hs_i2c0_data);
	ret = i2c_register_board_info(4, i2c_devs4, ARRAY_SIZE(i2c_devs4));
	if (ret < 0) {
		pr_err("%s, i2c4 adding i2c fail(err=%d)\n", __func__, ret);
	}

	ret = platform_device_register(&exynos5_device_hs_i2c0);
	if (ret < 0)
		pr_err("%s, grip platform device register failed (err=%d)\n",
			__func__, ret);
#endif


#ifdef CONFIG_SENSORS_SSP_STM
	pr_info("%s, SSP_SPI_SETUP\n", __func__);
	if (!exynos_spi_cfg_cs(spi0_csi[0].line, 0)) {
		pr_info("%s, spi0_set_platdata ...\n", __func__);
		ssp_spi0_set_platdata(&s3c64xx_spi0_pdata,
			EXYNOS_SPI_SRCCLK_SCLK, ARRAY_SIZE(spi0_csi));

		spi_register_board_info(spi0_board_info,
			ARRAY_SIZE(spi0_board_info));
	} else {
		pr_err("%s, Error requesting gpio for SPI-CH%d CS",
			__func__, spi0_board_info->bus_num);
	}

	ret = platform_device_register(&s3c64xx_device_spi0);
	if (ret < 0)
		pr_err("%s, Failed to register spi0 plaform devices(err=%d)\n",
			__func__, ret);
#endif

#ifdef CONFIG_SENSORS_VFS61XX
	pr_info("%s: SENSORS_VFS61XX init\n", __func__);
	vfs61xx_setup_gpio();
	s3c64xx_spi1_pdata.dma_mode = PIO_MODE;
	if (system_rev > 4)
		vfs61xx_pdata.ldocontrol = 1;

	if (!exynos_spi_cfg_cs(spi1_csi[0].line, 1)) {
		pr_info("%s: spi1_set_platdata ...\n", __func__);
		s3c64xx_spi1_set_platdata(&s3c64xx_spi1_pdata,
			EXYNOS_SPI_SRCCLK_SCLK, ARRAY_SIZE(spi1_csi));

		spi_register_board_info(spi1_board_info,
			ARRAY_SIZE(spi1_board_info));
	} else {
		pr_err("%s : Error requesting gpio for SPI-CH%d CS",
			__func__, spi1_board_info->bus_num);
	}
	platform_device_register(&s3c64xx_device_spi1);
#endif
}