/* system_rev == higher 16bits of PCBID XA -> 0000FFFF -> 0x0000 XB -> 0101FFFF -> 0x0101 XC -> 0202FFFF -> 0x0202 */ static void __init supersonic_init(void) { int ret; struct kobject *properties_kobj; printk("supersonic_init() revision=%d\n", system_rev); /* Must set msm_hw_reset_hook before first proc comm */ msm_hw_reset_hook = supersonic_reset; OJ_BMA_power(); msm_acpu_clock_init(&supersonic_clock_data); perflock_init(&supersonic_perflock_data); #if defined(CONFIG_MSM_SERIAL_DEBUGGER) msm_device_uart1.dev.platform_data = &msm_uart_debug_pdata; msm_serial_debug_init(MSM_UART1_PHYS, INT_UART1, &msm_device_uart1.dev, 1, MSM_GPIO_TO_INT(SUPERSONIC_GPIO_UART1_RX)); #endif #ifdef CONFIG_ARCH_QSD8X50 bt_export_bd_address(); #endif /* set the gpu power rail to manual mode so clk en/dis will not * turn off gpu power, and hang it on resume */ supersonic_kgsl_power_rail_mode(0); supersonic_kgsl_power(true); #ifdef CONFIG_SERIAL_MSM_HS msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata; msm_device_uart_dm1.name = "msm_serial_hs_bcm"; /* for bcm */ #endif config_gpio_table(camera_off_gpio_table, ARRAY_SIZE(camera_off_gpio_table)); /*gpio_direction_output(SUPERSONIC_GPIO_TP_LS_EN, 0);*/ gpio_direction_output(SUPERSONIC_GPIO_TP_EN, 0); supersonic_audio_init(); supersonic_init_panel(); #ifdef CONFIG_MICROP_COMMON supersonic_microp_init(); #endif msm_device_i2c_init(); platform_add_devices(devices, ARRAY_SIZE(devices)); #ifdef CONFIG_USB_ANDROID if (!opt_usb_h2w_sw) suc_add_usb_devices(); #endif i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices)); ret = supersonic_init_mmc(system_rev); if (ret != 0) pr_crit("%s: Unable to initialize MMC\n", __func__); properties_kobj = kobject_create_and_add("board_properties", NULL); if (properties_kobj) ret = sysfs_create_group(properties_kobj, &supersonic_properties_attr_group); if (!properties_kobj || ret) pr_err("failed to create board_properties\n"); msm_init_pmic_vibrator(3000); }
/* system_rev == higher 16bits of PCBID XA -> 0000FFFF -> 0x0000 XB -> 0101FFFF -> 0x0101 XC -> 0202FFFF -> 0x0202 */ static void __init supersonic_init(void) { int ret; struct kobject *properties_kobj; printk("supersonic_init() revision=%d\n", system_rev); android_usb_pdata.serial_number = board_serialno(); msm_hw_reset_hook = supersonic_reset; OJ_BMA_power(); msm_acpu_clock_init(&supersonic_clock_data); #if defined(CONFIG_MSM_SERIAL_DEBUGGER) msm_serial_debug_init(MSM_UART1_PHYS, INT_UART1, &msm_device_uart1.dev, 1, MSM_GPIO_TO_INT(SUPERSONIC_GPIO_UART1_RX)); #endif #ifdef CONFIG_ARCH_QSD8X50 bt_export_bd_address(); #endif /* set the gpu power rail to manual mode so clk en/dis will not * turn off gpu power, and hang it on resume */ supersonic_kgsl_power_rail_mode(0); supersonic_kgsl_power(true); #ifdef CONFIG_SPI_QSD msm_device_spi.dev.platform_data = &supersonic_spi_pdata; #endif msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata; config_gpio_table(usb_phy_3v3_table, ARRAY_SIZE(usb_phy_3v3_table)); config_gpio_table(camera_off_gpio_table, ARRAY_SIZE(camera_off_gpio_table)); gpio_request(SUPERSONIC_GPIO_TP_EN, "tp_en"); gpio_direction_output(SUPERSONIC_GPIO_TP_EN, 0); supersonic_audio_init(); supersonic_init_panel(); #ifdef CONFIG_MICROP_COMMON supersonic_microp_init(); #endif platform_add_devices(devices, ARRAY_SIZE(devices)); if (!opt_usb_h2w_sw) { msm_device_hsusb.dev.platform_data = &msm_hsusb_pdata; config_supersonic_usb_id_gpios(0); } i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices)); ret = supersonic_init_mmc(system_rev); if (ret != 0) pr_crit("%s: Unable to initialize MMC\n", __func__); properties_kobj = kobject_create_and_add("board_properties", NULL); if (properties_kobj) ret = sysfs_create_group(properties_kobj, &supersonic_properties_attr_group); if (!properties_kobj || ret) pr_err("failed to create board_properties\n"); msm_init_pmic_vibrator(); }