int __init latte_init_keypad(void) { char *get_cid, *get_carrier, *get_keycaps; board_get_cid_tag(&get_cid); board_get_carrier_tag(&get_carrier); board_get_keycaps_tag(&get_keycaps); if (system_rev < 2) { latte_keypad_data.name = "latte-keypad-v0"; latte_keypad_matrix_info.keymap = latte_keymap_x0; } if (system_rev == 2) latte_keypad_data.name = "latte-keypad-v1"; if (platform_device_register(&latte_reset_keys_device)) printk(KERN_WARNING "%s: register reset key fail\n", __func__); return platform_device_register(&latte_keypad_device); }
static void __init marvelc_init(void) { int rc; char *cid = NULL; struct kobject *properties_kobj; printk("marvelc_init() revision = 0x%X\n", system_rev); msm_clock_init(); board_get_cid_tag(&cid); /* for bcm */ bt_export_bd_address(); /* * Setup common MSM GPIOS */ config_gpios(); /* We need to set this pin to 0 only once on power-up; we will * not actually enable the chip until we apply power to it via * vreg. */ gpio_request(MARVELC_GPIO_LS_EN, "ls_en"); gpio_direction_output(MARVELC_GPIO_LS_EN, 0); msm_hw_reset_hook = marvelc_reset; msm_acpu_clock_init(&marvelc_clock_data); perflock_init(&marvelc_perflock_data); #if defined(CONFIG_MSM_SERIAL_DEBUGGER) if (!opt_disable_uart3) msm_serial_debug_init(MSM_UART3_PHYS, INT_UART3, &msm_device_uart3.dev, 1, MSM_GPIO_TO_INT(MARVELC_GPIO_UART3_RX)); #endif msm_add_devices(); #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 */ msm_add_serial_devices(3); #else msm_add_serial_devices(0); #endif msm_add_serial_devices(2); /* msm_change_usb_id(0x0bb4, 0x0c10); */ #ifdef CONFIG_USB_FUNCTION msm_add_usb_id_pin_gpio(MARVELC_GPIO_USB_ID_PIN); msm_add_usb_devices(marvelc_phy_reset, NULL); #endif #ifdef CONFIG_USB_ANDROID android_usb_pdata.products[0].product_id = android_usb_pdata.product_id; android_usb_pdata.serial_number = board_serialno(); msm_hsusb_pdata.serial_number = board_serialno(); msm_device_hsusb.dev.platform_data = &msm_hsusb_pdata; config_marvelc_usb_id_gpios(0); platform_device_register(&msm_device_hsusb); platform_device_register(&usb_mass_storage_device); platform_device_register(&android_usb_device); #endif msm_add_mem_devices(&pmem_setting); #ifdef CONFIG_MICROP_COMMON marvelc_microp_init(); #endif rc = marvelc_init_mmc(system_rev); if (rc) printk(KERN_CRIT "%s: MMC init failure (%d)\n", __func__, rc); properties_kobj = kobject_create_and_add("board_properties", NULL); if (properties_kobj) rc = sysfs_create_group(properties_kobj, &marvelc_properties_attr_group); if (!properties_kobj || rc) pr_err("failed to create board_properties\n"); printk(KERN_INFO "[HS_BOARD] (%s) system_rev = %d\n", __func__, system_rev); if (system_rev >= 1) { htc_headset_microp.dev.platform_data = &htc_headset_microp_data_xb; htc_headset_mgr_data.headset_config_num = ARRAY_SIZE(htc_headset_mgr_config); htc_headset_mgr_data.headset_config = htc_headset_mgr_config; printk(KERN_INFO "[HS_BOARD] (%s) Set MEMS config\n", __func__); } /* probe camera driver */ i2c_register_board_info(0, i2c_camera_devices, ARRAY_SIZE(i2c_camera_devices)); /* probe g-sensor driver */ i2c_register_board_info(0, i2c_bma250_devices, ARRAY_SIZE(i2c_bma250_devices)); msm_device_i2c_init(); platform_add_devices(devices, ARRAY_SIZE(devices)); i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices)); marvelc_init_panel(); marvelc_init_keypad(); marvelc_wifi_init(); msm_init_pmic_vibrator(2800); }
static void __init latte_init(void) { int rc; char *cid = NULL; printk("latte_init() revision = 0x%X\n", system_rev); board_get_cid_tag(&cid); /* * Setup common MSM GPIOS */ config_gpios(); /* We need to set this pin to 0 only once on power-up; we will * not actually enable the chip until we apply power to it via * vreg. */ gpio_direction_output(LATTE_GPIO_LS_EN, 0); /* disable power for cm3602 chip */ __capella_cm3602_power(0); msm_hw_reset_hook = latte_reset; msm_acpu_clock_init(&latte_clock_data); perflock_init(&latte_perflock_data); #if defined(CONFIG_MSM_SERIAL_DEBUGGER) if (!opt_disable_uart3) msm_serial_debug_init(MSM_UART3_PHYS, INT_UART3, &msm_device_uart3.dev, 1, MSM_GPIO_TO_INT(LATTE_GPIO_UART3_RX)); #endif msm_add_devices(); #ifdef CONFIG_SERIAL_MSM_HS msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata; msm_add_serial_devices(3); #else msm_add_serial_devices(0); #endif msm_add_serial_devices(2); /* msm_change_usb_id(0x0bb4, 0x0c10); */ msm_add_usb_id_pin_gpio(LATTE_GPIO_USB_ID_PIN); msm_register_usb_phy_init_seq(espresso_phy_init_seq); msm_hsusb_set_product(espresso_usb_products, ARRAY_SIZE(espresso_usb_products)); msm_add_usb_devices(latte_phy_reset, latte_phy_shutdown); msm_add_mem_devices(&pmem_setting); msm_init_pmic_vibrator(); #ifdef CONFIG_MICROP_COMMON latte_microp_init(); #endif latte_init_h2w_power_gpio(); rc = latte_init_mmc(system_rev); if (rc) printk(KERN_CRIT "%s: MMC init failure (%d)\n", __func__, rc); /* register flashlight at new-XA above */ platform_device_register(&latte_flashlight_device); /* probe camera driver */ i2c_register_board_info(0, i2c_camera_devices, ARRAY_SIZE(i2c_camera_devices)); msm_device_i2c.dev.platform_data = &latte_i2c_device_data; platform_add_devices(devices, ARRAY_SIZE(devices)); i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices)); latte_init_keypad(); }
static void __init liberty_init(void) { int rc; char *cid = NULL; struct kobject *properties_kobj; printk("liberty_init() revision = 0x%X\n", system_rev); board_get_cid_tag(&cid); #ifndef CONFIG_SERIAL_MSM_HS_PURE_ANDROID /* for bcm */ bt_export_bd_address(); #endif /* * Setup common MSM GPIOS */ config_gpios(); /* We need to set this pin to 0 only once on power-up; we will * not actually enable the chip until we apply power to it via * vreg. */ gpio_request(LIBERTY_GPIO_LS_EN, "ls_en"); gpio_direction_output(LIBERTY_GPIO_LS_EN, 0); /* disable power for cm3602 chip */ /*__capella_cm3602_power(0);*/ msm_hw_reset_hook = liberty_reset; msm_acpu_clock_init(&liberty_clock_data); perflock_init(&liberty_perflock_data); #if defined(CONFIG_MSM_SERIAL_DEBUGGER) if (!opt_disable_uart3) msm_serial_debug_init(MSM_UART3_PHYS, INT_UART3, &msm_device_uart3.dev, 1, MSM_GPIO_TO_INT(LIBERTY_GPIO_UART3_RX)); #endif msm_add_devices(); #ifdef CONFIG_SERIAL_MSM_HS msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata; #ifndef CONFIG_SERIAL_MSM_HS_PURE_ANDROID msm_device_uart_dm1.name = "msm_serial_hs_bcm"; /* for bcm */ #endif msm_add_serial_devices(3); #else msm_add_serial_devices(0); #endif msm_add_serial_devices(2); #ifdef CONFIG_USB_ANDROID android_usb_pdata.products[0].product_id = android_usb_pdata.product_id; android_usb_pdata.serial_number = board_serialno(); msm_hsusb_pdata.serial_number = board_serialno(); msm_device_hsusb.dev.platform_data = &msm_hsusb_pdata; platform_device_register(&msm_device_hsusb); #ifdef CONFIG_USB_ANDROID_RNDIS platform_device_register(&rndis_device); #endif platform_device_register(&usb_mass_storage_device); platform_device_register(&android_usb_device); #endif msm_add_mem_devices(&pmem_setting); #ifdef CONFIG_MICROP_COMMON liberty_microp_init(); #endif rc = liberty_init_mmc(system_rev); if (rc) printk(KERN_CRIT "%s: MMC init failure (%d)\n", __func__, rc); properties_kobj = kobject_create_and_add("board_properties", NULL); if (properties_kobj) rc = sysfs_create_group(properties_kobj, &liberty_properties_attr_group); if (!properties_kobj || rc) pr_err("failed to create board_properties\n"); /* probe camera driver */ i2c_register_board_info(0, i2c_camera_devices, ARRAY_SIZE(i2c_camera_devices)); msm_device_i2c_init(); platform_add_devices(devices, ARRAY_SIZE(devices)); i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices)); liberty_init_keypad(); }
int __init chacha_init_keypad(void) { char *get_cid; char *get_carrier; char *get_keycaps; uint8_t cid_len; KEY_LOGD("%s\n", __func__); board_get_cid_tag(&get_cid); board_get_carrier_tag(&get_carrier); board_get_keycaps_tag(&get_keycaps); KEY_LOGI("%s: get CID: %s\n\tCarrier: %s, Keycaps: %s\n", __func__, get_cid, get_carrier, get_keycaps); cid_len = strlen(get_cid); if (cid_len) { if (strstr(SKU_BOPOMO, get_cid) != NULL) { chacha_keypad_data.name = "chacha-keypad-bopomo"; } else if (strstr(SKU_FRA, get_cid) != NULL) { chacha_keymap[KEYMAP_INDEX(0, 3)] = KEY_W; chacha_keymap[KEYMAP_INDEX(3, 0)] = KEY_Z; chacha_keymap[KEYMAP_INDEX(3, 4)] = KEY_A; chacha_keypad_nav_map[1].code = KEY_Q; chacha_keypad_data.name = "chacha-keypad-fra"; } else if (strstr(SKU_ITA, get_cid) != NULL) { chacha_keymap[KEYMAP_INDEX(4, 3)] = KEY_F15; chacha_keypad_data.name = "chacha-keypad-ita"; } else if (strstr(SKU_TUR, get_cid) != NULL) { chacha_keypad_data.name = "chacha-keypad-tur"; } else if (strstr(SKU_ELL, get_cid) != NULL) { chacha_keymap[KEYMAP_INDEX(4, 3)] = KEY_F15; chacha_keypad_data.name = "chacha-keypad-ell"; } else if (strstr(SKU_GER, get_cid) != NULL) { chacha_keymap[KEYMAP_INDEX(0, 3)] = KEY_Y; chacha_keymap[KEYMAP_INDEX(5, 4)] = KEY_Z; chacha_keypad_data.name = "chacha-keypad-ger"; } else if (strstr(SKU_ARA, get_cid) != NULL) { chacha_keymap[KEYMAP_INDEX(4, 3)] = KEY_F15; chacha_keypad_data.name = "chacha-keypad-ara"; } else if (strstr(SKU_ESN, get_cid) != NULL) { chacha_keypad_data.name = "chacha-keypad-esn"; } else if (strstr(SKU_NOR, get_cid) != NULL) { chacha_keypad_data.name = "chacha-keypad-nor"; } else if (strstr(SKU_RUS, get_cid) != NULL) { chacha_keymap[KEYMAP_INDEX(4, 3)] = KEY_F15; chacha_keymap[KEYMAP_INDEX(3, 5)] = KEY_F16; chacha_keypad_data.name = "chacha-keypad-rus"; } else if (strstr(SKU_HK, get_cid) != NULL) { chacha_keymap[KEYMAP_INDEX(4, 3)] = KEY_F15; chacha_keypad_data.name = "chacha-keypad-hk"; } else if (strstr(SKU_CN, get_cid) != NULL) { chacha_keymap[KEYMAP_INDEX(4, 3)] = KEY_F15; chacha_keypad_data.name = "chacha-keypad-cn"; } else if (strstr(SKU_AW, get_cid) != NULL) { chacha_keymap[KEYMAP_INDEX(4, 3)] = KEY_F15; chacha_keypad_data.name = "chacha-keypad-aw"; } else if (strstr(SKU_THAI, get_cid) != NULL) { chacha_keymap[KEYMAP_INDEX(4, 3)] = KEY_F15; chacha_keypad_data.name = "chacha-keypad-tai"; } else if (strstr(SKU_STROKE_ENG, get_cid) != NULL) { chacha_keypad_data.name = "chacha-keypad-steng"; } else { if (strstr(SKU_WWE, get_cid) == NULL) KEY_LOGI("%s: CID not matched\n", __func__); } } if (platform_device_register(&chacha_reset_keys_device)) KEY_LOGE("%s: register reset key fail\n", __func__); return platform_device_register(&chacha_keypad_device); }
static void __init buzz_init(void) { int rc; char *cid = NULL; struct kobject *properties_kobj; printk("buzz_init() revision = 0x%X\n", system_rev); msm_clock_init(); board_get_cid_tag(&cid); /* for bcm */ bt_export_bd_address(); /* * Setup common MSM GPIOS */ config_gpios(); /* We need to set this pin to 0 only once on power-up; we will * not actually enable the chip until we apply power to it via * vreg. */ gpio_request(BUZZ_GPIO_LS_EN, "ls_en"); gpio_direction_output(BUZZ_GPIO_LS_EN, 0); gpio_request(BUZZ_PS_2V85_EN, "ps_2v85_en"); msm_hw_reset_hook = buzz_reset; msm_acpu_clock_init(&buzz_clock_data); #ifdef CONFIG_PERFLOCK perflock_init(&buzz_perflock_data); #endif #if defined(CONFIG_MSM_SERIAL_DEBUGGER) if (!opt_disable_uart3) msm_serial_debug_init(MSM_UART3_PHYS, INT_UART3, &msm_device_uart3.dev, 1, MSM_GPIO_TO_INT(BUZZ_GPIO_UART3_RX)); #endif #ifdef CONFIG_SERIAL_MSM_HS msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata; #ifndef CONFIG_SERIAL_MSM_HS_PURE_ANDROID msm_device_uart_dm1.name = "msm_serial_hs_bcm"; /* for bcm */ #endif msm_add_serial_devices(3); #else msm_add_serial_devices(0); #endif msm_add_serial_devices(2); #ifdef CONFIG_USB_FUNCTION msm_register_usb_phy_init_seq(buzz_phy_init_seq); msm_add_usb_id_pin_gpio(BUZZ_GPIO_USB_ID_PIN); msm_add_usb_devices(buzz_phy_reset, NULL); #endif #ifdef CONFIG_USB_ANDROID android_usb_pdata.products[0].product_id = android_usb_pdata.product_id; android_usb_pdata.serial_number = board_serialno(); msm_hsusb_pdata.serial_number = board_serialno(); msm_device_hsusb.dev.platform_data = &msm_hsusb_pdata; platform_device_register(&msm_device_hsusb); #ifdef CONFIG_USB_ANDROID_RNDIS platform_device_register(&rndis_device); #endif platform_device_register(&usb_mass_storage_device); platform_device_register(&android_usb_device); #endif msm_add_mem_devices(&pmem_setting); #ifdef CONFIG_MICROP_COMMON buzz_microp_init(); #endif rc = buzz_init_mmc(system_rev); if (rc) printk(KERN_CRIT "%s: MMC init failure (%d)\n", __func__, rc); properties_kobj = kobject_create_and_add("board_properties", NULL); if (properties_kobj) rc = sysfs_create_group(properties_kobj, &buzz_properties_attr_group); if (!properties_kobj || rc) pr_err("failed to create board_properties\n"); msm_device_i2c_init(); platform_add_devices(devices, ARRAY_SIZE(devices)); i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices)); if (system_rev < 3) { i2c_microp_devices.platform_data = µp_data_xc; platform_device_register(&buzz_leds); } if (system_rev >= 4) { platform_device_register(&buzz_oj); } i2c_register_board_info(0, &i2c_microp_devices, 1); /* probe camera driver */ i2c_register_board_info(0, i2c_camera_devices, ARRAY_SIZE(i2c_camera_devices)); buzz_init_keypad(); buzz_wifi_init(); buzz_panel_init(); msm_init_pmic_vibrator(3000); }
int __init vision_init_keypad(void) { char *get_cid; char *get_carrier; char *get_keycaps; uint8_t cid_len; printk(KERN_DEBUG "%s\n", __func__); board_get_cid_tag(&get_cid); board_get_carrier_tag(&get_carrier); board_get_keycaps_tag(&get_keycaps); printk(KERN_DEBUG "%s: get CID: %s\n\tCarrier: %s, Keycaps: %s\n", __func__, get_cid, get_carrier, get_keycaps); cid_len = strlen(get_cid); if (cid_len) { if (strstr(SKU_WWE, get_cid) != NULL) { vision_pmic_keymap[KEYMAP_INDEX(6, 3)] = KEY_TAB; vision_keypad_data.name = "vision-keypad-wwe"; } else if (strstr(SKU_WWE_BOPOMO, get_cid) != NULL) { vision_pmic_keymap[KEYMAP_INDEX(6, 3)] = KEY_TAB; vision_keypad_data.name = "vision-keypad-wwe-bopomo"; } else if (strstr(SKU_FRA, get_cid) != NULL) { vision_pmic_keymap[KEYMAP_INDEX(0, 2)] = KEY_APOSTROPHE; vision_pmic_keymap[KEYMAP_INDEX(5, 0)] = KEY_SEARCH; vision_pmic_keymap[KEYMAP_INDEX(5, 1)] = KEY_W; vision_pmic_keymap[KEYMAP_INDEX(5, 4)] = KEY_Q; vision_pmic_keymap[KEYMAP_INDEX(5, 5)] = KEY_Z; vision_pmic_keymap[KEYMAP_INDEX(6, 3)] = KEY_TAB; vision_pmic_keymap[KEYMAP_INDEX(6, 5)] = KEY_A; vision_keypad_data.name = "vision-keypad-fra"; } else if (strstr(SKU_ITA, get_cid) != NULL) { vision_pmic_keymap[KEYMAP_INDEX(6, 3)] = KEY_TAB; vision_keypad_data.name = "vision-keypad-ita"; } else if (strstr(SKU_TUR, get_cid) != NULL) { vision_pmic_keymap[KEYMAP_INDEX(0, 2)] = KEY_APOSTROPHE; vision_pmic_keymap[KEYMAP_INDEX(5, 0)] = KEY_SEARCH; vision_pmic_keymap[KEYMAP_INDEX(6, 3)] = KEY_TAB; vision_keypad_data.name = "vision-keypad-tur"; } else if (strstr(SKU_ELL, get_cid) != NULL) { vision_pmic_keymap[KEYMAP_INDEX(6, 3)] = KEY_TAB; vision_keypad_data.name = "vision-keypad-ell"; } else if (strstr(SKU_GER, get_cid) != NULL) { vision_pmic_keymap[KEYMAP_INDEX(0, 2)] = KEY_SLASH; vision_pmic_keymap[KEYMAP_INDEX(3, 5)] = KEY_Z; vision_pmic_keymap[KEYMAP_INDEX(5, 0)] = KEY_SEARCH; vision_pmic_keymap[KEYMAP_INDEX(5, 1)] = KEY_Y; vision_pmic_keymap[KEYMAP_INDEX(6, 3)] = KEY_TAB; vision_keypad_data.name = "vision-keypad-ger"; } else if (strstr(SKU_ARA, get_cid) != NULL) { vision_pmic_keymap[KEYMAP_INDEX(0, 2)] = KEY_F16; vision_pmic_keymap[KEYMAP_INDEX(5, 0)] = KEY_SEARCH; vision_pmic_keymap[KEYMAP_INDEX(6, 3)] = KEY_TAB; vision_keypad_data.name = "vision-keypad-ara"; } else if (strstr(SKU_ESN, get_cid) != NULL) { vision_pmic_keymap[KEYMAP_INDEX(0, 2)] = KEY_APOSTROPHE; vision_pmic_keymap[KEYMAP_INDEX(5, 0)] = KEY_SEARCH; vision_pmic_keymap[KEYMAP_INDEX(6, 3)] = KEY_TAB; vision_keypad_data.name = "vision-keypad-esn"; } else if (strstr(SKU_NOR, get_cid) != NULL) { vision_pmic_keymap[KEYMAP_INDEX(0, 1)] = KEY_F16; vision_pmic_keymap[KEYMAP_INDEX(0, 2)] = KEY_F17; vision_pmic_keymap[KEYMAP_INDEX(1, 2)] = KEY_F18; vision_pmic_keymap[KEYMAP_INDEX(5, 0)] = KEY_SEARCH; vision_pmic_keymap[KEYMAP_INDEX(6, 3)] = KEY_TAB; vision_keypad_data.name = "vision-keypad-nor"; } else if (strstr(SKU_RUS, get_cid) != NULL) { vision_pmic_keymap[KEYMAP_INDEX(0, 1)] = KEY_F16; vision_pmic_keymap[KEYMAP_INDEX(0, 2)] = KEY_SEMICOLON; vision_pmic_keymap[KEYMAP_INDEX(0, 6)] = KEY_F17; vision_pmic_keymap[KEYMAP_INDEX(2, 0)] = KEY_F18; vision_pmic_keymap[KEYMAP_INDEX(4, 0)] = KEY_DOT; vision_pmic_keymap[KEYMAP_INDEX(5, 0)] = KEY_SEARCH; vision_pmic_keymap[KEYMAP_INDEX(6, 3)] = KEY_TAB; vision_keypad_data.name = "vision-keypad-rus"; } else if (strstr(SKU_HK, get_cid) != NULL) { vision_pmic_keymap[KEYMAP_INDEX(6, 3)] = KEY_TAB; vision_keypad_data.name = "vision-keypad-hk"; } else if (strstr(SKU_SEA, get_cid) != NULL) { vision_pmic_keymap[KEYMAP_INDEX(6, 3)] = KEY_TAB; vision_keypad_data.name = "vision-keypad-sea"; } } if (platform_device_register(&vision_reset_keys_device)) printk(KERN_WARNING "%s: register reset key fail\n", __func__); return platform_device_register(&vision_keypad_input_device); }
static void __init chacha_init(void) { int rc; char *cid = NULL; char *qwerty_color = NULL; struct kobject *properties_kobj; printk("chacha_init() revision = 0x%X\n", system_rev); msm_clock_init(); board_get_cid_tag(&cid); board_get_qwerty_color_tag(&qwerty_color); if (qwerty_color && strcmp(qwerty_color, "white") == 0) { cm3628_pdata.levels[2] = 24; cm3628_pdata.levels[3] = 79; pr_info("[LS][CM3628] Update white table\n"); } else pr_info("[LS][CM3628] Update %s table\n", qwerty_color); /* for bcm */ bt_export_bd_address(); /* * Setup common MSM GPIOS */ config_gpios(); /* We need to set this pin to 0 only once on power-up; we will * not actually enable the chip until we apply power to it via * vreg. */ gpio_request(CHACHA_GPIO_LS_EN, "ls_en"); gpio_direction_output(CHACHA_GPIO_LS_EN, 0); msm_hw_reset_hook = chacha_reset; if (socinfo_init() < 0) BUG(); if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) > 1) || ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) == 1) && (SOCINFO_VERSION_MINOR(socinfo_get_version()) >= 3))) { msm_acpu_clock_init(&chacha_turbo_clock_data); perflock_init(&chacha_turbo_perflock_data); }else{ msm_acpu_clock_init(&chacha_clock_data); perflock_init(&chacha_perflock_data); } #if defined(CONFIG_MSM_SERIAL_DEBUGGER) if (!opt_disable_uart3) msm_serial_debug_init(MSM_UART3_PHYS, INT_UART3, &msm_device_uart3.dev, 1, MSM_GPIO_TO_INT(CHACHA_GPIO_UART3_RX)); #endif msm_add_devices(); #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 */ msm_add_serial_devices(3); #else msm_add_serial_devices(0); #endif msm_add_serial_devices(2); /* msm_change_usb_id(0x0bb4, 0x0c10); */ #ifdef CONFIG_USB_FUNCTION msm_add_usb_id_pin_gpio(CHACHA_GPIO_USB_ID_PIN); msm_add_usb_devices(chacha_phy_reset, NULL); #endif #ifdef CONFIG_USB_ANDROID android_usb_pdata.products[0].product_id = android_usb_pdata.product_id; android_usb_pdata.serial_number = board_serialno(); msm_hsusb_pdata.serial_number = board_serialno(); msm_device_hsusb.dev.platform_data = &msm_hsusb_pdata; config_chacha_usb_id_gpios(0); platform_device_register(&msm_device_hsusb); platform_device_register(&usb_mass_storage_device); platform_device_register(&android_usb_device); #endif msm_add_mem_devices(&pmem_setting); #ifdef CONFIG_MICROP_COMMON chacha_microp_init(); #endif rc = chacha_init_mmc(system_rev); if (rc) printk(KERN_CRIT "%s: MMC init failure (%d)\n", __func__, rc); properties_kobj = kobject_create_and_add("board_properties", NULL); if (properties_kobj) rc = sysfs_create_group(properties_kobj, &chacha_properties_attr_group); if (!properties_kobj || rc) pr_err("failed to create board_properties\n"); /* probe camera driver */ i2c_register_board_info(0, i2c_camera_devices, ARRAY_SIZE(i2c_camera_devices)); printk(KERN_INFO "[HS_BOARD] (%s) system_rev = %d\n", __func__, system_rev); if (system_rev >= 2) { htc_headset_microp.dev.platform_data = &htc_headset_microp_data_xc; htc_headset_mgr_data.headset_config_num = ARRAY_SIZE(htc_headset_mgr_config); htc_headset_mgr_data.headset_config = htc_headset_mgr_config; printk(KERN_INFO "[HS_BOARD] (%s) Set MEMS config\n", __func__); } msm_device_i2c_init(); platform_add_devices(devices, ARRAY_SIZE(devices)); if (system_rev == 0) i2c_register_board_info(0, i2c_devices_XA, ARRAY_SIZE(i2c_devices_XA)); else i2c_register_board_info(0, i2c_devices_XB, ARRAY_SIZE(i2c_devices_XB)); chacha_init_panel(); chacha_init_keypad(); chacha_wifi_init(); msm_init_pmic_vibrator(3100); }
static void __init bahamas_init(void) { int rc; char *cid = NULL; printk("bahamas_init() revision = 0x%X\n", system_rev); printk(KERN_INFO "mfg_mode=%d\n", board_mfg_mode()); msm_clock_init(); board_get_cid_tag(&cid); /* * Setup common MSM GPIOS */ config_gpios(); gpio_request(BAHAMAS_GPIO_CABLE_IN2, "gpio_cable_in2"); gpio_request(BAHAMAS_GPIO_AUD_EXTMIC_SEL, "gpio_aud_extmic_sel"); gpio_request(BAHAMAS_GPIO_WFM_ANT_SW, "gpio_wfm_ant_sw"); msm_hw_reset_hook = bahamas_reset; msm_acpu_clock_init(&bahamas_clock_data); #if defined(CONFIG_PERFLOCK) perflock_init(&bahamas_perflock_data); #endif #if defined(CONFIG_MSM_SERIAL_DEBUGGER) if (!opt_disable_uart3) msm_serial_debug_init(MSM_UART3_PHYS, INT_UART3, &msm_device_uart3.dev, 1, MSM_GPIO_TO_INT(BAHAMAS_GPIO_UART3_RX)); #endif msm_add_devices(); #if defined(CONFIG_SERIAL_MSM_HS) msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata; msm_add_serial_devices(3); #else msm_add_serial_devices(0); #endif msm_add_serial_devices(2); #if defined(CONFIG_USB_FUNCTION) msm_register_usb_phy_init_seq(bahamas_phy_init_seq); msm_add_usb_devices(bahamas_phy_reset, NULL); #endif #if defined(CONFIG_USB_ANDROID) android_usb_pdata.products[0].product_id = android_usb_pdata.product_id; android_usb_pdata.serial_number = board_serialno(); msm_hsusb_pdata.serial_number = board_serialno(); msm_device_hsusb.dev.platform_data = &msm_hsusb_pdata; platform_device_register(&msm_device_hsusb); #if defined(CONFIG_USB_ANDROID_RNDIS) platform_device_register(&rndis_device); #endif platform_device_register(&usb_mass_storage_device); platform_device_register(&android_usb_device); #endif if (board_mcp_monodie()) msm_add_mem_devices(&pmem_setting_monodie); else msm_add_mem_devices(&pmem_setting_dualdie); bahamas_init_h2w_power_gpio(); rc = bahamas_init_mmc(system_rev); if (rc) printk(KERN_CRIT "%s: MMC init failure (%d)\n", __func__, rc); if(system_rev < 3) { if (panel_detect() == PANEL_WINTEK) { microp_data.num_pins = ARRAY_SIZE(microp_pins_0_wint); microp_data.pin_config = microp_pins_0_wint; } else { microp_data.num_pins = ARRAY_SIZE(microp_pins_0); microp_data.pin_config = microp_pins_0; } i2c_microp_devices.irq = 0; } else if (panel_detect() == PANEL_WINTEK) { microp_data.num_pins = ARRAY_SIZE(microp_pins_1_wint); microp_data.pin_config = microp_pins_1_wint; } msm_device_i2c_init(); platform_add_devices(devices, ARRAY_SIZE(devices)); if (system_rev >= 3) bahamas_h2w_data.flags |= _35MM_MIC_DET_L2H; i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices)); i2c_register_board_info(0 ,&i2c_microp_devices, 1); bahamas_init_keypad(); bahamas_init_panel(); msm_init_pmic_vibrator(3000); }
static void __init latte_init(void) { int rc; char *cid = NULL; printk("latte_init() revision = 0x%X\n", system_rev); board_get_cid_tag(&cid); /* * Setup common MSM GPIOS */ config_gpios(); /* We need to set this pin to 0 only once on power-up; we will * not actually enable the chip until we apply power to it via * vreg. */ gpio_request(LATTE_GPIO_LS_EN, "ls_en"); gpio_direction_output(LATTE_GPIO_LS_EN, 0); /* disable power for cm3602 chip */ /*__capella_cm3602_power(0);*/ msm_hw_reset_hook = latte_reset; msm_acpu_clock_init(&latte_clock_data); perflock_init(&latte_perflock_data); #if defined(CONFIG_MSM_SERIAL_DEBUGGER) if (!opt_disable_uart3) msm_serial_debug_init(MSM_UART3_PHYS, INT_UART3, &msm_device_uart3.dev, 1, MSM_GPIO_TO_INT(LATTE_GPIO_UART3_RX)); #endif msm_add_devices(); #ifdef CONFIG_SERIAL_MSM_HS msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata; #ifndef CONFIG_SERIAL_MSM_HS_PURE_ANDROID msm_device_uart_dm1.name = "msm_serial_hs_ti"; /* for ti */ #endif msm_add_serial_devices(3); #else msm_add_serial_devices(0); #endif msm_add_serial_devices(2); #ifdef CONFIG_USB_FUNCTION msm_register_usb_phy_init_seq(latte_phy_init_seq); msm_add_usb_id_pin_gpio(LATTE_GPIO_USB_ID_PIN); msm_add_usb_devices(latte_phy_reset, NULL); #endif #ifdef CONFIG_USB_ANDROID android_usb_pdata.products[0].product_id = android_usb_pdata.product_id; android_usb_pdata.serial_number = board_serialno(); msm_hsusb_pdata.serial_number = board_serialno(); msm_device_hsusb.dev.platform_data = &msm_hsusb_pdata; #ifdef CONFIG_USB_ANDROID_RNDIS platform_device_register(&rndis_device); #endif platform_device_register(&msm_device_hsusb); platform_device_register(&usb_mass_storage_device); platform_device_register(&android_usb_device); #endif msm_add_mem_devices(&pmem_setting); msm_init_pmic_vibrator(); #ifdef CONFIG_MICROP_COMMON latte_microp_init(); #endif rc = latte_init_mmc(system_rev); if (rc) printk(KERN_CRIT "%s: MMC init failure (%d)\n", __func__, rc); /* register flashlight at new-XA above */ platform_device_register(&latte_flashlight_device); /* probe camera driver */ i2c_register_board_info(0, i2c_camera_devices, ARRAY_SIZE(i2c_camera_devices)); msm_device_i2c_init(); platform_add_devices(devices, ARRAY_SIZE(devices)); i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices)); latte_init_keypad(); }