Example #1
0
void __init evt_peripherals_init(void)
{
//&*&*&*SJ1_20110419, Add /proc file to display software and hardware version.
#if defined (CONFIG_PROCFS_DISPLAY_SW_HW_VERSION)
	get_share_region();	
#endif
//&*&*&*SJ2_20110419, Add /proc file to display software and hardware version.

//&*&*&*BC1_110615: fix the issue that system can not enter off mode
	twl4030_get_scripts(&evt_t2scripts_data);
//&*&*&*BC2_110615: fix the issue that system can not enter off mode

    
#ifdef CONFIG_ANDROID_RAM_CONSOLE
    platform_device_register(&ram_console_device);
#endif
    
    omap_i2c_init();
    platform_add_devices( evt_board_devices, ARRAY_SIZE(evt_board_devices) );
    platform_add_devices( evt_board_devices_2, ARRAY_SIZE(evt_board_devices_2) );
    
#ifdef CONFIG_ENCORE_MODEM_MGR
    if (is_encore_3g()) {
        platform_device_register(&encore_modem_mgr_device);
    }
#endif 

#ifdef CONFIG_SND_SOC_TLV320DAC3100
    audio_dac_3100_dev_init();
#endif
/***++++20110115, jimmySu add backlight driver for PWM***/
#ifdef CONFIG_LEDS_OMAP_DISPLAY
	gptimer8 = (unsigned long)ioremap(0x4903E000, 16);
//&*&*&*HC1_20110826, modify pwm init sequence
	//zoom_pwm_init();
	omap_set_primary_brightness(100);
//&*&*&*HC2_20110826, modify pwm init sequence
#endif // CONFIG_LEDS_OMAP_DISPLAY
/***-----20110115, jimmySu add backlight driver for PWM***/


    /* NOTE: Please deselect CONFIG_MACH_OMAP_USE_UART3 in order to init 
    *  only UART1 and UART2, all in the name of saving some power.
    */
    omap_serial_init(omap_serial_platform_data);
    evt_lcd_panel_init();
//    kxtf9_dev_init();

#ifdef CONFIG_BATTERY_MAX17042
    max17042_dev_init();
#endif

    usb_musb_init(&musb_board_data);

//&*&*&*SJ1_20110607
#if defined (CONFIG_ANDROID_FACTORY_DEFAULT_REBOOT)
	android_factory_default_init();
#endif
//&*&*&*SJ2_20110607
}
static void __init omap_boxer_init(void)
{
	/*we need to have this enable function here to light up the BL*/
	boxer_panel_enable_lcd(&boxer_lcd_device);
	omap_i2c_init();
	/* Fix to prevent VIO leakage on wl127x */
//	wl127x_vio_leakage_fix();

	platform_add_devices(boxer_devices, ARRAY_SIZE(boxer_devices));

	omap_board_config = boxer_config;
	omap_board_config_size = ARRAY_SIZE(boxer_config);

	spi_register_board_info(boxer_spi_board_info,
				ARRAY_SIZE(boxer_spi_board_info));
#ifdef  CONFIG_TOUCHSCREEN_PIXCIR_I2C
	pixcir_dev_init();
#endif
#ifdef CONFIG_TOUCHSCREEN_CYTTSP_I2C
//    cyttsp_dev_init();
#endif

#ifdef CONFIG_INPUT_KXTF9
	kxtf9_dev_init();
#endif /* CONFIG_INPUT_KXTF9 */

#ifdef CONFIG_BATTERY_MAX17042
	max17042_dev_init();
#endif

#if defined(CONFIG_SND_SOC_DAC3100) || defined(CONFIG_SND_SOC_DAC3100_MODULE) || defined(CONFIG_SND_OMAP_SOC_OMAP3_EDP)
        audio_dac_3100_dev_init();
#endif
//	synaptics_dev_init();
//	msecure_init();
//	ldp_flash_init();
	omap_serial_init();
	usb_musb_init();
	boxer_backlight_init();
#if defined(CONFIG_USB_ANDROID) || defined(CONFIG_USB_ANDROID_MODULE)
	platform_device_register(&usb_mass_storage_device);
	// Set the device serial number passed in from the bootloader.
	if (system_serial_high != 0 || system_serial_low != 0) {
		snprintf(adb_serial_number, sizeof(adb_serial_number), "%08x%08x", system_serial_high, system_serial_low);
		adb_serial_number[16] = '\0';
		android_usb_pdata.serial_number = adb_serial_number;
	}
	platform_device_register(&android_usb_device);
#endif
        BUG_ON(!cpu_is_omap3630());
}