Пример #1
0
static void __init msm7x2x_init(void)
{
	msm7x2x_misc_init();

	/* Initialize regulators first so that other devices can use them */
	msm7x27a_init_regulators();
	msm_adsp_add_pdev();
	if (cpu_is_msm8625())
		msm8625_device_i2c_init();
	else
		msm7x27a_device_i2c_init();
	msm7x27a_init_ebi2();
	msm7x27a_uartdm_config();

	msm7x27a_otg_gadget();
	msm7x27a_cfg_smsc911x();

	msm7x27a_add_footswitch_devices();
	msm7x27a_add_platform_devices();
	/* Ensure ar6000pm device is registered before MMC/SDC */
	msm7x27a_init_ar6000pm();
	msm7627a_init_mmc();
	msm_fb_add_devices();
	msm7x2x_init_host();
	msm7x27a_pm_init();
	register_i2c_devices();
	msm7627a_bt_power_init();
	msm7627a_camera_init();
	msm7627a_add_io_devices();
	/*7x25a kgsl initializations*/
	msm7x25a_kgsl_3d0_init();
	/*8x25 kgsl initializations*/
	msm8x25_kgsl_3d0_init();
}
Пример #2
0
int vision_init_panel(void)
{
  int ret = 0;

  printk(KERN_ERR "%s: Sony=%d Samsung=%d Other=%d\n", __func__, is_sony_panel(), panel_type == SAMSUNG_PANEL, panel_type != SAMSUNG_PANEL && !is_sony_panel());

  ret = panel_init_power();
  if (ret)
    return ret;

  msm_fb_add_devices(
                     vision_fb_devices, ARRAY_SIZE(vision_fb_devices));

  if (is_sony_panel())
    {
      ret = platform_device_register(&lcdc_sonywvga_panel_device);
      printk(KERN_ERR "%s: registered sony panel: %d\n", __func__, ret);
    }
  else if (panel_type == SAMSUNG_PANEL)
    {
      ret = platform_device_register(&lcdc_tl2796a_panel_device);
      printk(KERN_ERR "%s: registered tl2796a panel: %d\n", __func__, ret);
    }
  else
    {
      ret = platform_device_register(&lcdc_s6e63m0_panel_device);
      printk(KERN_ERR "%s: registered s6e63m0 panel: %d\n", __func__, ret);
    }
  return ret;
}
static void __init msm7x2x_init(void)
{
	msm7x2x_misc_init();

	/* Initialize regulators first so that other devices can use them */
	msm7x27a_init_regulators();
	msm_adsp_add_pdev();
	if (cpu_is_msm8625())
		msm8625_device_i2c_init();
	else
		msm7x27a_device_i2c_init();
	msm7x27a_init_ebi2();
	msm7x27a_uartdm_config();

	msm7x27a_otg_gadget();
/* LGE_CHANGE_: 2012/11/2 [email protected] U0 Flash Porting */
#ifndef CONFIG_MACH_LGE
	msm7x27a_cfg_smsc911x();
#endif
/* LGE_CHANGE_E: 2012/11/2 [email protected] U0 Flash Porting */

	msm7x27a_add_footswitch_devices();
	msm7x27a_add_platform_devices();
	/* Ensure ar6000pm device is registered before MMC/SDC */
	msm7x27a_init_ar6000pm();
	msm7627a_init_mmc();
	msm_fb_add_devices();
	msm7x2x_init_host();
	msm7x27a_pm_init();
#if defined(CONFIG_I2C) && defined(CONFIG_GPIO_SX150X)
	register_i2c_devices();
#endif
#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
	msm7627a_bt_power_init();
#endif
#ifdef CONFIG_MSM7X27A_AUDIO
	lge_add_sound_devices();
#endif
/* LGE_CHANGE_S: 2012/11/2 [email protected] U0 Flash Porting */
	msm7627a_camera_init();
/* LGE_CHANGE_E: 2012/11/2 [email protected] U0 Flash Porting */
	msm7627a_add_io_devices();
	/*7x25a kgsl initializations*/
	msm7x25a_kgsl_3d0_init();
	/*8x25 kgsl initializations*/
	msm8x25_kgsl_3d0_init();
	lge_add_gpio_i2c_devices();
/* 2012-10-25 [email protected] Boot Mode Check [START] */
#ifdef CONFIG_LGE_POWER_ON_STATUS_PATCH
	lge_board_pwr_on_status();
#endif
#ifdef CONFIG_LGE_BOOT_MODE
	lge_add_boot_mode_devices();
#endif
/* 2012-10-25 [email protected] Boot Mode Check [END] */
#if defined(CONFIG_ANDROID_RAM_CONSOLE) && defined(CONFIG_LGE_HANDLE_PANIC)
	lge_add_panic_handler_devices();
#endif
	lge_add_pm_devices();
}
Пример #4
0
/*
TODO:
1.find a better way to handle msm_fb_resources, to avoid passing it across file.
2.error handling
 */
int __init pyd_init_panel(struct resource *res, size_t size)
{
	int ret;

	PR_DISP_INFO("%s: res=%p, size=%d\n", __func__, res, size);
	if (panel_type == PANEL_ID_PYD_SHARP)
		mipi_novatek_panel_data.shrink_pwm = pyd_shp_shrink_pwm;
	else
		mipi_novatek_panel_data.shrink_pwm = pyd_auo_shrink_pwm;

	if (panel_type == PANEL_ID_PYD_SHARP)
		mdp_pdata.color_enhancment_tbl = pyd_sharp_gamma;
	else
		mdp_pdata.color_enhancment_tbl = pyd_auo_gamma;

	msm_fb_device.resource = res;
	msm_fb_device.num_resources = size;

#if 1
	/* Cancel the fixup temporally due to it's cause flicking problem. */
	if (panel_type == PANEL_ID_PYD_AUO_NT)
		mipi_pdata.esd_fixup = pyd_esd_fixup;
#endif

	ret = platform_device_register(&msm_fb_device);
	ret = platform_device_register(&lcdc_samsung_panel_device);
	ret = platform_device_register(&mipi_dsi_video_sharp_wvga_panel_device);
	ret = platform_device_register(&mipi_dsi_cmd_sharp_qhd_panel_device);

	msm_fb_add_devices();

	return 0;
}
Пример #5
0
static void __init qsd8x50_init(void)
{
	if (socinfo_init() < 0)
		printk(KERN_ERR "%s: socinfo_init() failed!\n",
		       __func__);
	qsd8x50_cfg_smc91x();
	msm_acpu_clock_init(&qsd8x50_clock_data);
	msm_device_hsusb_peripheral.dev.platform_data = &msm_hsusb_pdata;
	msm_device_hsusb_host.dev.platform_data = &msm_hsusb_pdata;
	platform_add_devices(devices, ARRAY_SIZE(devices));
	msm_fb_add_devices();
	msm_camera_add_device();
	qsd8x50_init_mmc();
	bt_power_init();
	audio_gpio_init();
	msm_device_i2c_init();
	i2c_register_board_info(0, msm_i2c_board_info,
				ARRAY_SIZE(msm_i2c_board_info));
	spi_register_board_info(msm_spi_board_info,
				ARRAY_SIZE(msm_spi_board_info));
	msm_pm_set_platform_data(msm_pm_data);

#ifdef CONFIG_SURF_FFA_GPIO_KEYPAD
	if (machine_is_qsd8x50_ffa())
		platform_device_register(&keypad_device_8k_ffa);
	else
		platform_device_register(&keypad_device_surf);
#endif
}
/*
TODO:
1.find a better way to handle msm_fb_resources, to avoid passing it across file.
2.error handling
 */
int __init golfu_init_panel(void)
{
	int ret = 0;
	if ((panel_type == PANEL_ID_PIO_SAMSUNG) ||
		(panel_type == PANEL_ID_PIO_SAMSUNG_C2))

		mipi_dsi_cmd_hvga_panel_device.name = "mipi_samsung";

	else if (panel_type == PANEL_ID_GOLFU_AUO ||
			panel_type == PANEL_ID_GOLFU_AUO_C2 ||
			panel_type == PANEL_ID_GOLFU_AUO_C3 ||
			panel_type == PANEL_ID_GOLFU_AUO_C4)
		mipi_dsi_cmd_hvga_panel_device.name = "mipi_orise";
	else
		golfu_panel_power(0);

	PR_DISP_INFO("panel_type= 0x%x\n", panel_type);
	PR_DISP_INFO("%s: %s\n", __func__, mipi_dsi_cmd_hvga_panel_device.name);

	mipi_golfu_panel_data.shrink_pwm = golfu_shrink_pwm;


	ret = platform_device_register(&msm_fb_device);
	ret = platform_device_register(&mipi_dsi_cmd_hvga_panel_device);

	msm_fb_add_devices();

	return 0;
}
Пример #7
0
/* common functions */
void __init lge_add_lcd_devices(void)
{
	platform_device_register(&mddi_ss_driveric_device);

	msm_fb_add_devices();
	
	platform_device_register(&rt9393_bl);
}
Пример #8
0
/* common functions */
void __init lge_add_lcd_devices(void)
{
	platform_device_register(&mddi_sharp_panel_device);

	msm_fb_add_devices();

	lge_add_gpio_i2c_device(thunderg_init_i2c_backlight);
}
Пример #9
0
void __init lge_add_lcd_devices(void)
{
	platform_device_register(&mddi_hitachi_panel_device);

	msm_fb_add_devices();

	lge_add_gpio_i2c_device(ku3700_init_i2c_backlight);
}
Пример #10
0
static void __init msm7x2x_init(void)
{
	msm7x2x_misc_init();

	/* Initialize regulators first so that other devices can use them */
	msm7x27a_init_regulators();
/* [LGE_BSP_S] [email protected], 20130212 - RT8966A miniABB regulator */
#ifdef CONFIG_MINIABB_REGULATOR
	init_miniabb_regulators();
#endif /* CONFIG_MINIABB_REGULATOR */
/* [LGE_BSP_E] [email protected], 20130212 - RT8966A miniABB regulator */
	msm_adsp_add_pdev();
	msm7x27a_device_i2c_init();
	msm7x27a_init_ebi2();
	msm7x27a_uartdm_config();

	msm7x27a_otg_gadget();

	msm7x27a_add_footswitch_devices();
	msm7x27a_add_platform_devices();
	/* Ensure ar6000pm device is registered before MMC/SDC */
	msm7x27a_init_ar6000pm();
	msm7627a_init_mmc();
	msm_fb_add_devices();
	msm7x2x_init_host();
	msm7x27a_pm_init();
#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
	msm7627a_bt_power_init();
#endif
#ifdef CONFIG_MSM7X27A_AUDIO //ew0804.kim
	lge_add_sound_devices();
#endif
	msm7627a_camera_init();
	msm7627a_add_io_devices();
	/*7x25a kgsl initializations*/
	msm7x25a_kgsl_3d0_init();
	/*8x25 kgsl initializations*/
	msm8x25_kgsl_3d0_init();
	lge_add_gpio_i2c_devices();
/* 2012-10-25 [email protected] Boot Mode Check [START] */
#ifdef CONFIG_LGE_POWER_ON_STATUS_PATCH
	lge_board_pwr_on_status();
#endif
#ifdef CONFIG_LGE_BOOT_MODE
	lge_add_boot_mode_devices();
#endif
#if defined(CONFIG_ANDROID_RAM_CONSOLE) && defined(CONFIG_LGE_HANDLE_PANIC)
	lge_add_panic_handler_devices();
#endif 

// LGE_CHANGE_S, [email protected],Add pm device	
	lge_add_pm_devices();
// LGE_CHANGE_E, [email protected],Add pm device	
}
/* common functions */
void __init lge_add_lcd_devices(void)
{
	if(ebi2_tovis_panel_data.initialized)
		ebi2_tovis_power_save(1);

	fb_register_client(&jump_fb_event_notifier);

	platform_device_register(&ebi2_tovis_panel_device);
	msm_fb_add_devices();
	lge_add_gpio_i2c_device(jump_init_i2c_backlight);
}
Пример #12
0
void __init lge_add_lcd_devices(void)
{
        if(ebi2_tovis_panel_data.initialized)
		ebi2_tovis_power_save(1);

	fb_register_client(&e0eu_fb_event_notifier);    

	platform_add_devices(e0eu_panel_devices, ARRAY_SIZE(e0eu_panel_devices));
	msm_fb_add_devices();
	lge_add_gpio_i2c_device(msm7x27a_e0eu_init_i2c_backlight);
}
Пример #13
0
void __init lge_add_lcd_devices(void)
{
#if defined(CONFIG_FB_MSM_MDDI_NOVATEK_HVGA)
	platform_device_register(&mddi_novatek_panel_device);
#else
	platform_device_register(&mddi_hitachi_panel_device);
#endif

	msm_fb_add_devices();

	lge_add_gpio_i2c_device(thundera_init_i2c_backlight);
}
Пример #14
0
static void __init halibut_init(void)
{
	if (socinfo_init() < 0)
		BUG();

	if (machine_is_msm7201a_ffa()) {
		smc91x_resources[0].start = 0x98000300;
		smc91x_resources[0].end = 0x98000400;
		smc91x_resources[1].start = MSM_GPIO_TO_INT(85);
		smc91x_resources[1].end = MSM_GPIO_TO_INT(85);
	}

	/* All 7x01 2.0 based boards are expected to have RAM chips capable
	 * of 160 MHz. */
	if (cpu_is_msm7x01()
	    && SOCINFO_VERSION_MAJOR(socinfo_get_version()) == 2)
		halibut_clock_data.max_axi_khz = 160000;

#if defined(CONFIG_MSM_SERIAL_DEBUGGER)
	msm_serial_debug_init(MSM_UART3_PHYS, INT_UART3,
			      &msm_device_uart3.dev, 1);
#endif
	msm_hsusb_pdata.soc_version = socinfo_get_version();
	msm_acpu_clock_init(&halibut_clock_data);
	msm_device_hsusb_peripheral.dev.platform_data = &msm_hsusb_pdata,
	msm_device_hsusb_host.dev.platform_data = &msm_hsusb_pdata,
	platform_add_devices(devices, ARRAY_SIZE(devices));
	msm_camera_add_device();
	msm_device_i2c_init();
	i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices));

#ifdef CONFIG_SURF_FFA_GPIO_KEYPAD
	if (machine_is_msm7201a_ffa())
		platform_device_register(&keypad_device_7k_ffa);
	else
		platform_device_register(&keypad_device_surf);
#endif

	halibut_init_mmc();
#ifdef CONFIG_USB_FUNCTION
	hsusb_gpio_init();
#endif
	msm_fb_add_devices();
	bt_power_init();
#ifdef CONFIG_USB_ANDROID
	msm_hsusb_rpc_connect();
	msm_hsusb_set_vbus_state(1) ;
#endif
	msm_pm_set_platform_data(msm_pm_data);
}
Пример #15
0
void __init lge_add_lcd_devices(void)
{
	int maker_id;
	maker_id = gpio_get_value(GPIO_IN_85);

//	if(maker_id)
		platform_device_register(&lcdc_lgit_panel_device);
//	else
//		platform_device_register(&lcdc_hitachi_panel_device);

	lcdc_lgit_gpio_init();
	msm_fb_add_devices();

}
Пример #16
0
int __init vigor_init_panel(struct resource *res, size_t size)
{
	int ret;

	PR_DISP_INFO("%s: res=%p, size=%d\n", __func__, res, size);
	msm_fb_device.resource = res;
	msm_fb_device.num_resources = size;

	ret = platform_device_register(&msm_fb_device);
	ret = platform_device_register(&mipi_dsi_cmd_panel_device);

	msm_fb_add_devices();

	return 0;
}
static void __init msm_qrd1_init(void)
{
	msm7x2x_misc_init();
	msm7627a_init_regulators();
	msm_device_i2c_init();
#ifdef CONFIG_SERIAL_MSM_HS
	msm_uart_dm1_pdata.wakeup_irq = gpio_to_irq(UART1DM_RX_GPIO);
	msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata;
#endif

#ifdef CONFIG_USB_MSM_OTG_72K
	msm_otg_pdata.swfi_latency = msm7627a_pm_data
		[MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT].latency;
	msm_device_otg.dev.platform_data = &msm_otg_pdata;
#endif
	msm_device_gadget_peripheral.dev.platform_data =
		&msm_gadget_pdata;
	platform_add_devices(qrd1_devices,
			ARRAY_SIZE(qrd1_devices));
	msm7627a_init_mmc();

#ifdef CONFIG_USB_EHCI_MSM_72K
	msm7627a_init_host();
#endif
	msm_pm_set_platform_data(msm7627a_pm_data,
				ARRAY_SIZE(msm7627a_pm_data));
	BUG_ON(msm_pm_boot_init(&msm_pm_boot_pdata));

	msm_fb_add_devices();

#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
	msm7627a_bt_power_init();
#endif

	msm7627a_camera_init();

#if defined(CONFIG_TOUCHSCREEN_SYNAPTICS_RMI4_I2C) || \
	defined(CONFIG_TOUCHSCREEN_SYNAPTICS_RMI4_I2C_MODULE)
	i2c_register_board_info(MSM_GSBI1_QUP_I2C_BUS_ID,
				synaptic_i2c_clearpad3k,
				ARRAY_SIZE(synaptic_i2c_clearpad3k));
#endif
	platform_device_register(&hs_pdev);

#ifdef CONFIG_MSM_RPC_VIBRATOR
	msm_init_pmic_vibrator();
#endif
}
Пример #18
0
static void __init msm_qrd_init(void)
{
	msm7x2x_misc_init();
	msm7627a_init_regulators();
	msmqrd_adsp_add_pdev();

	if (cpu_is_msm8625() || cpu_is_msm8625q())
		msm8625_device_i2c_init();
	else
		msm7627a_device_i2c_init();

	/* uart1dm*/
	qrd7627a_uart1dm_config();
	/*OTG gadget*/
	qrd7627a_otg_gadget();

	msm_add_footswitch_devices();
	add_platform_devices();

	/* Ensure ar6000pm device is registered before MMC/SDC */
	
#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
	msm_qrd_init_ar6000pm();
#endif	
	msm7627a_init_mmc();

#ifdef CONFIG_USB_EHCI_MSM_72K
	msm7627a_init_host();
#endif
	msm_pm_init();

	msm_pm_register_irqs();
	msm_fb_add_devices();

	if (machine_is_msm8625q_evbd() || machine_is_msm8625q_skud()
				       || machine_is_msm8625q_skue())
		i2c_register_board_info(2, i2c2_info,
				ARRAY_SIZE(i2c2_info));

#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
	msm7627a_bt_power_init();
#endif
	msm7627a_sensor_init();
	msm7627a_camera_init();
	qrd7627a_add_io_devices();
	msm7x25a_kgsl_3d0_init();
	msm8x25_kgsl_3d0_init();
}
void __init holiday_init_panel(struct resource msm_fb_resources[], int num_resources)
{
#ifdef HOY_ESD_FIXUP
	if (panel_type == PANEL_ID_HOY_SONY_OTM)
		mipi_pdata.esd_fixup = holiday_esd_fixup;
#endif

	msm_fb_device.resource = msm_fb_resources;
	msm_fb_device.num_resources = num_resources;

	platform_add_devices(display_devices, ARRAY_SIZE(display_devices));

	msm_fb_add_devices();

	PR_DISP_INFO("%s: %s\n", __func__, mipi_dsi_cmd_panel_device.name);
}
static void __init msm7x2x_init(void)
{
	msm7x2x_misc_init();

	msm7x27a_init_regulators();

#ifdef CONFIG_MINIABB_REGULATOR
	init_miniabb_regulators();
#endif
	msm_adsp_add_pdev();

	msm7x27a_device_i2c_init();
	msm7x27a_init_ebi2();
	msm7x27a_uartdm_config();
	msm7x27a_otg_gadget();
	msm7x27a_add_footswitch_devices();
	msm7x27a_add_platform_devices();
	msm7x27a_init_ar6000pm();

	msm7627a_init_mmc();

	msm_fb_add_devices();

	msm7x2x_init_host();
	msm7x27a_pm_init();
#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
	msm7627a_bt_power_init();
#endif
#ifdef CONFIG_MSM7X27A_AUDIO
	lge_add_sound_devices();
#endif
	msm7627a_camera_init();
	msm7627a_add_io_devices();
	msm7x25a_kgsl_3d0_init();
	msm8x25_kgsl_3d0_init();
	lge_add_gpio_i2c_devices();
#ifdef CONFIG_LGE_POWER_ON_STATUS_PATCH
	lge_board_pwr_on_status();
#endif
#ifdef CONFIG_LGE_BOOT_MODE
	lge_add_boot_mode_devices();
#endif
#if defined(CONFIG_ANDROID_RAM_CONSOLE) && defined(CONFIG_LGE_HANDLE_PANIC)
	lge_add_panic_handler_devices();
#endif
	lge_add_pm_devices();
}
Пример #21
0
int __init spade_init_panel(void)
{
  int ret;
  
  ret = panel_init_power();
  if (ret)
    return ret;
  
  msm_fb_add_devices(
                     spade_fb_devices, ARRAY_SIZE(spade_fb_devices));

  ret = platform_device_register(&lcdc_spadewvga_panel_device);
  if (ret != 0)
    return ret;
  
  return 0;
}
static void __init msm_qrd_init(void)
{
	msm7x2x_misc_init();
	msm7627a_init_regulators();
	msmqrd_adsp_add_pdev();

	if (cpu_is_msm8625())
		msm8625_device_i2c_init();
	else
		msm7627a_device_i2c_init();

	/* uart1dm*/
	qrd7627a_uart1dm_config();
	/*OTG gadget*/
	qrd7627a_otg_gadget();

	msm_add_footswitch_devices();
	add_platform_devices();

	/* Ensure ar6000pm device is registered before MMC/SDC */
	msm_qrd_init_ar6000pm();
	msm7627a_init_mmc();

#ifdef CONFIG_USB_EHCI_MSM_72K
	msm7627a_init_host();
#endif
	msm_pm_init();

	msm_pm_register_irqs();
	msm_fb_add_devices();

#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
    /* qcomm QRD phone concerned not need by hw product*/
	//msm7627a_bt_power_init();
#endif

	msm7627a_camera_init();
	qrd7627a_add_io_devices();
	msm7x25a_kgsl_3d0_init();
	msm8x25_kgsl_3d0_init();
}
Пример #23
0
/*
TODO:
1.find a better way to handle msm_fb_resources, to avoid passing it across file.
2.error handling
 */
int __init shooter_u_init_panel(struct resource *res, size_t size)
{
	int ret=0;

	if (panel_type == PANEL_ID_SHR_SHARP_OTM ||
		panel_type == PANEL_ID_SHR_SHARP_OTM_C2)
		mipi_dsi_cmd_sharp_qhd_panel_device.name = "mipi_orise";

	PR_DISP_INFO("%s: %s\n", __func__, mipi_dsi_cmd_sharp_qhd_panel_device.name);

	mipi_novatek_panel_data.shrink_pwm = shooter_u_shrink_pwm;

	msm_fb_device.resource = res;
	msm_fb_device.num_resources = size;

	ret = platform_device_register(&msm_fb_device);
	ret = platform_device_register(&mipi_dsi_cmd_sharp_qhd_panel_device);

	msm_fb_add_devices();

	return 0;
}
/*
TODO:
1.find a better way to handle msm_fb_resources, to avoid passing it across file.
2.error handling
 */
int __init pico_init_panel(void)
{
	int ret=0;

	if ((panel_type == PANEL_ID_PIO_SAMSUNG) | (panel_type == PANEL_ID_PIO_SAMSUNG_C2))
		mipi_dsi_cmd_hvga_panel_device.name = "mipi_samsung";
	else if (panel_type == PANEL_ID_PIO_AUO)
		mipi_dsi_cmd_hvga_panel_device.name = "mipi_novatek";
	else
		pico_panel_power(0);

	PR_DISP_INFO("panel_type= 0x%x\n", panel_type);
	PR_DISP_INFO("%s: %s\n", __func__, mipi_dsi_cmd_hvga_panel_device.name);

	mipi_pico_panel_data.shrink_pwm = pico_shrink_pwm;


	ret = platform_device_register(&msm_fb_device);
	ret = platform_device_register(&mipi_dsi_cmd_hvga_panel_device);

	msm_fb_add_devices();

	return 0;
}
Пример #25
0
static void __init msm7x2x_init(void)
{
	if (socinfo_init() < 0)
		BUG();

#ifdef CONFIG_HUAWEI_CAMERA
    sensor_vreg_disable(sensor_vreg_array,ARRAY_SIZE(sensor_vreg_array));
#endif

#if defined(CONFIG_MSM_SERIAL_DEBUGGER)
	msm_serial_debug_init(MSM_UART3_PHYS, INT_UART3,
                          &msm_device_uart3.dev, 1);
#endif

/*delete*/
	msm_acpu_clock_init(&msm7x2x_clock_data);

	msm_hsusb_pdata.swfi_latency =
		msm7x25_pm_data
		[MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT].latency;

    if(machine_is_msm7x25_u8110()) {    
        msm_device_hsusb_peripheral.dev.platform_data = &msm_hsusb_tmo_pdata;
    } else {
        msm_device_hsusb_peripheral.dev.platform_data = &msm_hsusb_pdata;
    }

    if(machine_is_msm7x25_u8110()) {
        mass_storage_device.dev.platform_data = &usb_mass_storage_tmo_pdata;
    }
    
	platform_add_devices(devices, ARRAY_SIZE(devices));
#ifdef CONFIG_MSM_CAMERA
	config_camera_off_gpios(); /* might not be necessary */
#endif
	msm_device_i2c_init();
	i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices));

#ifdef CONFIG_SURF_FFA_GPIO_KEYPAD
	if (machine_is_msm7x25_ffa() || machine_is_msm7x27_ffa())
		platform_device_register(&keypad_device_7k_ffa);
	else
		platform_device_register(&keypad_device_surf);
#endif

#ifdef CONFIG_HUAWEI_GPIO_KEYPAD
	if (machine_is_msm7x25_c8600())
		platform_device_register(&keypad_device_c8600);
	else if (machine_is_msm7x25_u8110()) //machine_is_msm7x25_u8100() 
		platform_device_register(&keypad_device_u8100);
	else if (machine_is_msm7x25_u7610())
		platform_device_register(&keypad_device_u7610);
	else
		platform_device_register(&keypad_device_c8600);  //default use c6800 keypad
#endif
	lcdc_gpio_init();
#ifdef CONFIG_HUAWEI_JOGBALL
	//config_jogball_gpios();
	//init_jogball();
	if (machine_is_msm7x25_c8600())
		platform_device_register(&jogball_device);
#endif 

	msm_fb_add_devices();
	msm7x2x_init_mmc();
	bt_power_init();
    msm_pm_set_platform_data(msm7x25_pm_data);
#ifdef CONFIG_HUAWEI_MSM_VIBRATOR
	msm_init_pmic_vibrator();
#endif
}
Пример #26
0
void __init lge_add_lcd_devices(void)
{
	platform_add_devices(m3mpcs_panel_devices, ARRAY_SIZE(m3mpcs_panel_devices));
	msm_fb_add_devices();
	lge_add_gpio_i2c_device(msm7x27a_m3mpcs_init_i2c_backlight);
}
Пример #27
0
static void __init msm_qrd_init(void)
{
	msm7x2x_misc_init();
	msm7627a_init_regulators();
	msmqrd_adsp_add_pdev();

	if (cpu_is_msm8625() || cpu_is_msm8625q())
		msm8625_device_i2c_init();
	else
		msm7627a_device_i2c_init();

	/* uart1dm*/
	qrd7627a_uart1dm_config();
	/*OTG gadget*/
	qrd7627a_otg_gadget();

	msm_add_footswitch_devices();
	add_platform_devices();

	/* Ensure ar6000pm device is registered before MMC/SDC */
/* modified by fanjiankang begin*/	
	//msm_qrd_init_ar6000pm();

	wlan_init_power();
    msm_read_nv(NV_ITEM_WLAN_MAC_ADDR, wlan_mac_addr);
	
	msm7627a_init_mmc();

#ifdef CONFIG_USB_EHCI_MSM_72K
	msm7627a_init_host();
#endif
	msm_pm_init();

	msm_pm_register_irqs();
	msm_fb_add_devices();

// zhangji modify for del mp8845c
// platform_device_register(&mp8845c_platform_device);
platform_device_register(&ncp6335d_platform_device);
#ifdef CONFIG_I2C_GPIO
	//if (machine_is_msm8625q_evbd() || machine_is_msm8625q_skud()
	//			       || machine_is_msm8625q_skue())
	//	i2c_register_board_info(2, i2c2_info, ARRAY_SIZE(i2c2_info));
#endif


#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
	msm7627a_bt_power_init();
#endif
	//msm7627a_sensor_init();
	msm7627a_camera_init();
	qrd7627a_add_io_devices();
	msm7x25a_kgsl_3d0_init();
	msm8x25_kgsl_3d0_init();
        msm7x27a_sensor_init();
	
	#ifdef CONFIG_PN544_NFC
	nfc_init();
	#endif
	
}
Пример #28
0
static void __init msm7x2x_init(void)
{
	msm7x2x_misc_init();

	/* Initialize regulators first so that other devices can use them */
	msm7x27a_init_regulators();

	/* Common functions for SURF/FFA/RUMI3 */
	msm_device_i2c_init();
	msm7x27a_init_ebi2();
	msm7x27a_cfg_uart2dm_serial();
#ifdef CONFIG_SERIAL_MSM_HS
	msm_uart_dm1_pdata.wakeup_irq = gpio_to_irq(UART1DM_RX_GPIO);
	msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata;
#endif

#ifdef CONFIG_USB_MSM_OTG_72K
	msm_otg_pdata.swfi_latency =
		msm7x27a_pm_data
		[MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT].latency;
	msm_device_otg.dev.platform_data = &msm_otg_pdata;
#endif
	msm_device_gadget_peripheral.dev.platform_data =
		&msm_gadget_pdata;
	msm7x27a_cfg_smsc911x();
	platform_add_devices(msm_footswitch_devices,
			msm_num_footswitch_devices);
	platform_add_devices(surf_ffa_devices,
			ARRAY_SIZE(surf_ffa_devices));
	/* Ensure ar6000pm device is registered before MMC/SDC */
	msm7x27a_init_ar6000pm();
#ifdef CONFIG_MMC_MSM
	msm7627a_init_mmc();
#endif
	msm_fb_add_devices();
#ifdef CONFIG_USB_EHCI_MSM_72K
	msm7x2x_init_host();
#endif

	msm_pm_set_platform_data(msm7x27a_pm_data,
				ARRAY_SIZE(msm7x27a_pm_data));
	BUG_ON(msm_pm_boot_init(&msm_pm_boot_pdata));

#if defined(CONFIG_I2C) && defined(CONFIG_GPIO_SX150X)
	register_i2c_devices();
#endif
#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
	msm7627a_bt_power_init();
#endif
	if (machine_is_msm7625a_surf() || machine_is_msm7625a_ffa()) {
		atmel_ts_pdata.min_x = 0;
		atmel_ts_pdata.max_x = 480;
		atmel_ts_pdata.min_y = 0;
		atmel_ts_pdata.max_y = 320;
	}

	i2c_register_board_info(MSM_GSBI1_QUP_I2C_BUS_ID,
		atmel_ts_i2c_info,
		ARRAY_SIZE(atmel_ts_i2c_info));

#if defined(CONFIG_MSM_CAMERA)
	msm7627a_camera_init();
#endif
	platform_device_register(&kp_pdev);
	platform_device_register(&hs_pdev);

	/* configure it as a pdm function*/
	if (gpio_tlmm_config(GPIO_CFG(LED_GPIO_PDM, 3,
				GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL,
				GPIO_CFG_8MA), GPIO_CFG_ENABLE))
		pr_err("%s: gpio_tlmm_config for %d failed\n",
			__func__, LED_GPIO_PDM);
	else
		platform_device_register(&led_pdev);

#ifdef CONFIG_MSM_RPC_VIBRATOR
	if (machine_is_msm7x27a_ffa() || machine_is_msm7625a_ffa())
		msm_init_pmic_vibrator();
#endif
	/*7x25a kgsl initializations*/
	msm7x25a_kgsl_3d0_init();
}
Пример #29
0
int __init staging_init_devices(void)
{
	platform_add_devices(devices, ARRAY_SIZE(devices));
	msm_fb_add_devices();
	return 0;
}
Пример #30
0
static void __init msm7x27_init(void)
{
	if (socinfo_init() < 0)
		BUG();

#if defined(CONFIG_MSM_SERIAL_DEBUGGER)
	msm_serial_debug_init(MSM_UART3_PHYS, INT_UART3,
			&msm_device_uart3.dev, 1);
#endif
	if (machine_is_msm7x27_ffa()) {
		smc91x_resources[0].start = 0x98000300;
		smc91x_resources[0].end = 0x980003ff;
		smc91x_resources[1].start = MSM_GPIO_TO_INT(85);
		smc91x_resources[1].end = MSM_GPIO_TO_INT(85);
		if (gpio_tlmm_config(GPIO_CFG(85, 0,
					      GPIO_INPUT,
					      GPIO_PULL_DOWN,
					      GPIO_2MA),
				     GPIO_ENABLE)) {
			printk(KERN_ERR
			       "%s: Err: Config GPIO-85 INT\n",
				__func__);
		}

		msm7x27_clock_data.max_axi_khz = 160000;
	}

	if (cpu_is_msm7x27())
		msm7x27_clock_data.max_axi_khz = 200000;

	msm_acpu_clock_init(&msm7x27_clock_data);

	/* This value has been set to 160000 for power savings. */
	/* OEMs may modify the value at their discretion for performance */
	/* The appropriate maximum replacement for 160000 is: */
	/* clk_get_max_axi_khz() */
	kgsl_pdata.max_axi_freq = 160000;

	msm_hsusb_pdata.swfi_latency =
		msm7x27_pm_data
		[MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT].latency;
	msm_device_hsusb_peripheral.dev.platform_data = &msm_hsusb_pdata;
	msm_device_otg.dev.platform_data = &msm_otg_pdata;
	msm_device_gadget_peripheral.dev.platform_data = &msm_gadget_pdata;
	msm_device_hsusb_host.dev.platform_data = &msm_hsusb_pdata;
	platform_add_devices(devices, ARRAY_SIZE(devices));
#ifdef CONFIG_MSM_CAMERA
	config_camera_off_gpios(); /* might not be necessary */
#endif
	msm_device_i2c_init();
	i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices));

#ifdef CONFIG_SURF_FFA_GPIO_KEYPAD
	if (machine_is_msm7x27_ffa())
		platform_device_register(&keypad_device_7k_ffa);
	else
		platform_device_register(&keypad_device_surf);
#endif
	lcdc_gordon_gpio_init();
	msm_fb_add_devices();
	msm7x27_init_mmc();
	bt_power_init();

	if (cpu_is_msm7x27())
		msm_pm_set_platform_data(msm7x27_pm_data);
	else
		msm_pm_set_platform_data(msm7x27_pm_data);
}