static void __init msm_camera_add_device(void) { msm_camera_register_device(&msm_camera_resources, ARRAY_SIZE(msm_camera_resources), &msm_camera_device_data); config_camera_off_gpios(); }
static void __init msm7x2x_init(void) { msm_clock_init(msm_clocks_7x27, msm_num_clocks_7x27); #if defined(CONFIG_MSM_SERIAL_DEBUGGER) msm_serial_debug_init(MSM_UART1_PHYS, INT_UART1, &msm_device_uart1.dev, 1); #endif if (cpu_is_msm7x27()) msm7x2x_clock_data.max_axi_khz = 200000; msm_acpu_clock_init(&msm7x2x_clock_data); msm_add_pmem_devices(); msm_add_fb_device(); #if !defined(CONFIG_MSM_SERIAL_DEBUGGER) if (lge_get_uart_mode()) platform_device_register(&msm_device_uart3); #endif platform_add_devices(devices, ARRAY_SIZE(devices)); #ifdef CONFIG_ARCH_MSM7X27 msm_add_kgsl_device(); #endif msm_add_usb_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)); if (cpu_is_msm7x27()) msm_pm_set_platform_data(msm7x27_pm_data, ARRAY_SIZE(msm7x27_pm_data)); else msm_pm_set_platform_data(msm7x25_pm_data, ARRAY_SIZE(msm7x25_pm_data)); msm7x27_wlan_init(); #ifdef CONFIG_ANDROID_RAM_CONSOLE lge_add_ramconsole_devices(); lge_add_ers_devices(); lge_add_panic_handler_devices(); #endif lge_add_camera_devices(); lge_add_lcd_devices(); lge_add_btpower_devices(); lge_add_mmc_devices(); lge_add_input_devices(); lge_add_misc_devices(); lge_add_pm_devices(); lge_add_gpio_i2c_devices(); create_testmode_status(); create_sw_version_status(); create_smpl_reset_status(); create_qpst_enable_status(); }
static void __init halibut_init(void) { #if defined(CONFIG_MSM_SERIAL_DEBUGGER) msm_serial_debug_init(MSM_UART3_PHYS, INT_UART3, &msm_device_uart3.dev, 1); #endif msm_device_hsusb.dev.platform_data = &msm_hsusb_pdata; msm_acpu_clock_init(&halibut_clock_data); #ifdef CONFIG_MSM_CAMERA config_camera_off_gpios(); /* might not be necessary */ #endif i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices)); platform_add_devices(devices, ARRAY_SIZE(devices)); i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices)); msm_hsusb_set_vbus_state(1); }
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 }
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); }
static void __init msm_camera_add_device(void) { msm_camera_register_device(NULL, 0, &msm_camera_device_data); config_camera_off_gpios(); }
int camera_power_on (void) { int rc; struct device *dev = pecan_backlight_dev(); camera_power_mutex_lock(); if(lcd_bl_power_state == BL_POWER_SUSPEND) { pecan_pwrsink_resume(); mdelay(50); } /* clear RESET, PWDN to Low*/ gpio_set_value(GPIO_CAM_RESET, 0); gpio_set_value(GPIO_CAM_PWDN, 0); //2010-11-02 config_camera_off_gpios(); mdelay(40); /*AVDD power 2.8V*/ if (lge_bd_rev == LGE_REV_B) { rc = aat28xx_ldo_set_level(dev, LDO_CAM_AF_NO, 2800); if (rc < 0) { printk(KERN_ERR "%s: ldo %d set level error\n", __func__, LDO_CAM_AF_NO); goto power_on_fail; } rc = aat28xx_ldo_enable(dev, LDO_CAM_AF_NO, 1); if (rc < 0) { printk(KERN_ERR "%s: ldo %d control error\n", __func__, LDO_CAM_AF_NO); goto power_on_fail; } } else { /* it is for rev.c and default */ struct vreg *vreg_mmc = vreg_get(0, "mmc"); vreg_set_level(vreg_mmc, 2800); vreg_enable(vreg_mmc); } /* DVDD power 1.2V, change to 1.8V */ rc = aat28xx_ldo_set_level(dev, LDO_CAM_DVDD_NO, 1800); if (rc < 0) { printk(KERN_ERR "%s: ldo %d set level error\n", __func__, LDO_CAM_DVDD_NO); goto power_on_fail; } rc = aat28xx_ldo_enable(dev, LDO_CAM_DVDD_NO, 1); if (rc < 0) { printk(KERN_ERR "%s: ldo %d control error\n", __func__, LDO_CAM_DVDD_NO); goto power_on_fail; } mdelay(1); /*IOVDD power 2.6V*/ rc = aat28xx_ldo_set_level(dev, LDO_CAM_IOVDD_NO, 2600); if (rc < 0) { printk(KERN_ERR "%s: ldo %d set level error\n", __func__, LDO_CAM_IOVDD_NO); goto power_on_fail; } rc = aat28xx_ldo_enable(dev, LDO_CAM_IOVDD_NO, 1); if (rc < 0) { printk(KERN_ERR "%s: ldo %d control error\n", __func__, LDO_CAM_IOVDD_NO); goto power_on_fail; } /*AVDD power 2.7V*/ /* LGE_CHANGE * Change AVDD level from 2.7V to 2.8V in order to reduce camera noise in dard environment. * 2010-08-03. [email protected] */ rc = aat28xx_ldo_set_level(dev, LDO_CAM_AVDD_NO, 2800); if (rc < 0) { printk(KERN_ERR "%s: ldo %d set level error\n", __func__, LDO_CAM_AVDD_NO); goto power_on_fail; } rc = aat28xx_ldo_enable(dev, LDO_CAM_AVDD_NO, 1); if (rc < 0) { printk(KERN_ERR "%s: ldo %d control error\n", __func__, LDO_CAM_AVDD_NO); goto power_on_fail; } //mdelay(5); /*M Clock -24Mhz*/ mdelay(20); config_camera_on_gpios(); msm_camio_clk_rate_set(mclk_rate); mdelay(5); msm_camio_camif_pad_reg_reset(); mdelay(5); /*Nstandby high*/ gpio_set_value(GPIO_CAM_PWDN, 0); mdelay(1); /*reset high*/ gpio_set_value(GPIO_CAM_RESET, 1); mdelay(8); // T2 camera_power_state = CAM_POWER_ON; power_on_fail: camera_power_mutex_unlock(); return rc; }
static void __init msm7x2x_init(void) { if (socinfo_init() < 0) BUG(); msm_clock_init(msm_clocks_7x27, msm_num_clocks_7x27); #if defined(CONFIG_MSM_SERIAL_DEBUGGER) msm_serial_debug_init(MSM_UART3_PHYS, INT_UART3, &msm_device_uart3.dev, 1); #endif if (cpu_is_msm7x27()) msm7x2x_clock_data.max_axi_khz = 200000; msm_acpu_clock_init(&msm7x2x_clock_data); msm_add_pmem_devices(); msm_add_fb_device(); #if !defined(CONFIG_MSM_SERIAL_DEBUGGER) if (lge_get_uart_mode()) platform_device_register(&msm_device_uart3); #endif platform_add_devices(devices, ARRAY_SIZE(devices)); #ifdef CONFIG_ARCH_MSM7X27 msm_add_kgsl_device(); #endif msm_add_usb_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)); if (cpu_is_msm7x27()) msm_pm_set_platform_data(msm7x27_pm_data, ARRAY_SIZE(msm7x27_pm_data)); else msm_pm_set_platform_data(msm7x25_pm_data, ARRAY_SIZE(msm7x25_pm_data)); msm7x27_wlan_init(); swift_init_gpio_i2c_devices(); #ifdef CONFIG_ANDROID_RAM_CONSOLE lge_add_ramconsole_devices(); lge_add_ers_devices(); lge_add_panic_handler_devices(); #endif lge_add_camera_devices(); lge_add_lcd_devices(); lge_add_btpower_devices(); lge_add_mmc_devices(); lge_add_input_devices(); lge_add_misc_devices(); lge_add_pm_devices(); /* gpio i2c devices should be registered at latest point */ lge_add_gpio_i2c_devices(); /* initialize timed_output vibrator */ swift_init_timed_vibrator(); }