/* * Fix up regulator consumer data that moves to a different regulator based on * the current target. */ void __init configure_msm8960_power_grid(void) { static struct rpm_regulator_init_data *rpm_data; int i; if (machine_is_msm8960_cdp() || cpu_is_msm8960ab()) { /* Only modify LVS6 consumers for CDP targets. */ for (i = 0; i < ARRAY_SIZE(msm_rpm_regulator_init_data); i++) { rpm_data = &msm_rpm_regulator_init_data[i]; if (machine_is_msm8960_cdp() && rpm_data->id == RPM_VREG_ID_PM8921_LVS6) { rpm_data->init_data.consumer_supplies = vreg_consumers_CDP_LVS6; rpm_data->init_data.num_consumer_supplies = ARRAY_SIZE(vreg_consumers_CDP_LVS6); } if (cpu_is_msm8960ab() && rpm_data->id == RPM_VREG_ID_PM8921_S7) { rpm_data->init_data.constraints.min_uV = 1275000; rpm_data->init_data.constraints.max_uV = 1275000; rpm_data->init_data.constraints.input_uV = 1275000; rpm_data->default_uV = 1275000; } } } if (msm8960_oem_funcs.msm_regulator_init) msm8960_oem_funcs.msm_regulator_init(&msm8960_oem_funcs); }
void __init msm8960_init_mmc(void) { #ifdef CONFIG_MMC_MSM_SDC1_SUPPORT /* * When eMMC runs in DDR mode on CDP platform, we have * seen instability due to DATA CRC errors. These errors are * attributed to long physical path between MSM and eMMC on CDP. * So let's not enable the DDR mode on CDP platform but let other * platforms take advantage of eMMC DDR mode. */ if (!machine_is_msm8960_cdp()) msm8960_sdc1_data.uhs_caps |= (MMC_CAP_1_8V_DDR | MMC_CAP_UHS_DDR50); /* SDC1 : eMMC card connected */ msm_add_sdcc(1, &msm8960_sdc1_data); #endif #ifdef CONFIG_MMC_MSM_SDC2_SUPPORT /* SDC2: SDIO slot for WLAN*/ msm_add_sdcc(2, &msm8960_sdc2_data); #endif #ifdef CONFIG_MMC_MSM_SDC3_SUPPORT /* SDC3: External card slot */ msm_add_sdcc(3, &msm8960_sdc3_data); #endif #ifdef CONFIG_MMC_MSM_SDC4_SUPPORT /* SDC4: SDIO slot for WLAN */ msm_add_sdcc(4, &msm8960_sdc4_data); #endif }
void __init msm8960_init_cam(void) { //ASUS_BSP +++ Stimber "[A60K][8M][NA][Others]Full porting for 8M camera with ISP" #if 0 //ASUS_BSP +++ Stimber "No need for camera, move to a60k_gpio_pinmux.c" msm_gpiomux_install(msm8960_cam_common_configs, ARRAY_SIZE(msm8960_cam_common_configs)); #endif if (machine_is_msm8960_cdp()) { #if 0 //ASUS_BSP +++ Stimber "No need for camera, move to a60k_gpio_pinmux.c" msm_gpiomux_install(msm8960_cdp_flash_configs, ARRAY_SIZE(msm8960_cdp_flash_configs)); #endif #ifdef CONFIG_IMX074 //ASUS_BSP Stimber "Disable imx074 part" msm_flash_src._fsrc.ext_driver_src.led_en = GPIO_CAM_GP_LED_EN1; msm_flash_src._fsrc.ext_driver_src.led_flash_en = GPIO_CAM_GP_LED_EN2; #if defined(CONFIG_I2C) && (defined(CONFIG_GPIO_SX150X) || \ defined(CONFIG_GPIO_SX150X_MODULE)) msm_flash_src._fsrc.ext_driver_src.expander_info = cam_expander_info; #endif #endif //End of CONFIG_IMX074 //ASUS_BSP Stimber "Disable imx074 part" } if (machine_is_msm8960_liquid()) { struct msm_camera_sensor_info *s_info; #ifdef CONFIG_IMX074 s_info = &msm_camera_sensor_imx074_data; s_info->sensor_platform_info->mount_angle = 180; #endif //End of CONFIG_IMX074 #ifdef CONFIG_OV2720 s_info = &msm_camera_sensor_ov2720_data; #endif //End of CONFIG_OV2720 //ASUS_BSP --- Stimber "[A60K][8M][NA][Others]Full porting for 8M camera with ISP" s_info->sensor_platform_info->ext_power_ctrl = msm_camera_8960_ext_power_ctrl; } #ifdef CONFIG_IMX091 //Asus BSP +++ if (machine_is_msm8960_fluid()) { msm_camera_sensor_imx091_data.sensor_platform_info-> mount_angle = 270; } #endif //Asus BSP --- platform_device_register(&msm_camera_server); platform_device_register(&msm8960_device_csiphy0); platform_device_register(&msm8960_device_csiphy1); platform_device_register(&msm8960_device_csiphy2); platform_device_register(&msm8960_device_csid0); platform_device_register(&msm8960_device_csid1); platform_device_register(&msm8960_device_csid2); platform_device_register(&msm8960_device_ispif); platform_device_register(&msm8960_device_vfe); platform_device_register(&msm8960_device_vpe); }
int __init msm8960_init_gpiomux(void) { int rc = msm_gpiomux_init(NR_GPIO_IRQS); if (rc) { pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc); return rc; } #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) msm_gpiomux_install(msm8960_ethernet_configs, ARRAY_SIZE(msm8960_ethernet_configs)); #endif msm_gpiomux_install(msm8960_gsbi_configs, ARRAY_SIZE(msm8960_gsbi_configs)); msm_gpiomux_install(msm8960_cyts_configs, ARRAY_SIZE(msm8960_cyts_configs)); msm_gpiomux_install(msm8960_slimbus_config, ARRAY_SIZE(msm8960_slimbus_config)); msm_gpiomux_install(msm8960_audio_codec_configs, ARRAY_SIZE(msm8960_audio_codec_configs)); msm_gpiomux_install(msm8960_audio_auxpcm_configs, ARRAY_SIZE(msm8960_audio_auxpcm_configs)); msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); if (machine_is_msm8960_mtp() || machine_is_msm8960_fluid() || machine_is_msm8960_liquid() || machine_is_msm8960_cdp()) msm_gpiomux_install(hap_lvl_shft_config, ARRAY_SIZE(hap_lvl_shft_config)); if (PLATFORM_IS_CHARM25()) msm_gpiomux_install(mdm_configs, ARRAY_SIZE(mdm_configs)); #ifdef CONFIG_USB_EHCI_MSM_HSIC if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) != 1) && (PLATFORM_IS_CHARM25() || machine_is_msm8960_liquid())) msm_gpiomux_install(msm8960_hsic_configs, ARRAY_SIZE(msm8960_hsic_configs)); #endif #ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL msm_gpiomux_install(msm8960_hdmi_configs, ARRAY_SIZE(msm8960_hdmi_configs)); #endif msm_gpiomux_install(msm8960_mdp_vsync_configs, ARRAY_SIZE(msm8960_mdp_vsync_configs)); return 0; }
void __init msm8960_init_cam(void) { if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE) { msm_8960_front_cam_gpio_conf.cam_gpiomux_conf_tbl = msm8960_cam_2d_configs_sglte; msm_8960_front_cam_gpio_conf.cam_gpiomux_conf_tbl_size = ARRAY_SIZE(msm8960_cam_2d_configs_sglte); msm_8960_back_cam_gpio_conf.cam_gpiomux_conf_tbl = msm8960_cam_2d_configs_sglte; msm_8960_back_cam_gpio_conf.cam_gpiomux_conf_tbl_size = ARRAY_SIZE(msm8960_cam_2d_configs_sglte); } msm_gpiomux_install(msm8960_cam_common_configs, ARRAY_SIZE(msm8960_cam_common_configs)); if (machine_is_msm8960_cdp()) { msm_gpiomux_install(msm8960_cdp_flash_configs, ARRAY_SIZE(msm8960_cdp_flash_configs)); #ifdef CONFIG_MSM_CAMERA_FLASH msm_flash_src._fsrc.ext_driver_src.led_en = GPIO_CAM_GP_LED_EN1; msm_flash_src._fsrc.ext_driver_src.led_flash_en = GPIO_CAM_GP_LED_EN2; #if defined(CONFIG_I2C) && (defined(CONFIG_GPIO_SX150X) || \ defined(CONFIG_GPIO_SX150X_MODULE)) msm_flash_src._fsrc.ext_driver_src.expander_info = cam_expander_info; #endif #endif } if (machine_is_msm8960_liquid()) { struct msm_camera_sensor_info *s_info; s_info = &msm_camera_sensor_imx074_data; s_info->sensor_platform_info->mount_angle = 180; s_info = &msm_camera_sensor_ov2720_data; s_info->sensor_platform_info->ext_power_ctrl = msm_camera_8960_ext_power_ctrl; } if (machine_is_msm8960_fluid()) { msm_camera_sensor_imx091_data.sensor_platform_info-> mount_angle = 270; } platform_device_register(&msm_camera_server); platform_device_register(&msm8960_device_csiphy0); platform_device_register(&msm8960_device_csiphy1); platform_device_register(&msm8960_device_csiphy2); platform_device_register(&msm8960_device_csid0); platform_device_register(&msm8960_device_csid1); platform_device_register(&msm8960_device_csid2); platform_device_register(&msm8960_device_ispif); platform_device_register(&msm8960_device_vfe); platform_device_register(&msm8960_device_vpe); }
void __init msm8960_init_cam(void) { msm_gpiomux_install(msm8960_cam_common_configs, ARRAY_SIZE(msm8960_cam_common_configs)); #if !defined(CONFIG_MACH_LGE) if (machine_is_msm8960_cdp()) { msm_gpiomux_install(msm8960_cdp_flash_configs, ARRAY_SIZE(msm8960_cdp_flash_configs)); msm_flash_src._fsrc.ext_driver_src.led_en = GPIO_CAM_GP_LED_EN1; msm_flash_src._fsrc.ext_driver_src.led_flash_en = GPIO_CAM_GP_LED_EN2; #if defined(CONFIG_I2C) && (defined(CONFIG_GPIO_SX150X) || \ defined(CONFIG_GPIO_SX150X_MODULE)) msm_flash_src._fsrc.ext_driver_src.expander_info = cam_expander_info; #endif } #endif /* * QCT Original * * mount_angle change is not required. * privacy_light is related to front cam indicator LED. (NOT USED) * */ #if !defined(CONFIG_MACH_LGE) if (machine_is_msm8960_liquid()) { struct msm_camera_sensor_info *s_info; s_info = &msm_camera_sensor_imx111_data; s_info->sensor_platform_info->mount_angle = 180; s_info = &msm_camera_sensor_imx119_data; s_info->sensor_platform_info->ext_power_ctrl = msm_camera_8960_ext_power_ctrl; } if (machine_is_msm8960_fluid()) { msm_camera_sensor_imx119_data.sensor_platform_info-> mount_angle = 270; } #endif platform_device_register(&msm_camera_server); platform_device_register(&msm8960_device_csiphy0); platform_device_register(&msm8960_device_csiphy1); platform_device_register(&msm8960_device_csiphy2); platform_device_register(&msm8960_device_csid0); platform_device_register(&msm8960_device_csid1); platform_device_register(&msm8960_device_csid2); platform_device_register(&msm8960_device_ispif); platform_device_register(&msm8960_device_vfe); platform_device_register(&msm8960_device_vpe); }
void __init msm8960_init_cam(void) { msm_gpiomux_install(msm8960_cam_common_configs, ARRAY_SIZE(msm8960_cam_common_configs)); #ifdef CONFIG_PANTECH_CAMERA_FLASH i2c_register_board_info(MSM_8960_GSBI1_QUP_I2C_BUS_ID, msm_i2c_camera_flash_device, ARRAY_SIZE(msm_i2c_camera_flash_device)); #endif if (machine_is_msm8960_cdp()) { #ifndef CONFIG_PANTECH_CAMERA_FLASH #if !defined(CONFIG_MACH_MSM8960_STARQ) msm_gpiomux_install(msm8960_cdp_flash_configs, ARRAY_SIZE(msm8960_cdp_flash_configs)); msm_flash_src._fsrc.ext_driver_src.led_en = GPIO_CAM_GP_LED_EN1; msm_flash_src._fsrc.ext_driver_src.led_flash_en = GPIO_CAM_GP_LED_EN2; #if defined(CONFIG_I2C) && (defined(CONFIG_GPIO_SX150X) || \ defined(CONFIG_GPIO_SX150X_MODULE)) msm_flash_src._fsrc.ext_driver_src.expander_info = cam_expander_info; #endif #endif #endif } #ifndef CONFIG_PANTECH_CAMERA if (machine_is_msm8960_liquid()) { struct msm_camera_sensor_info *s_info; s_info = &msm_camera_sensor_imx074_data; s_info->sensor_platform_info->mount_angle = 180; s_info = &msm_camera_sensor_ov2720_data; s_info->sensor_platform_info->ext_power_ctrl = msm_camera_8960_ext_power_ctrl; } if (machine_is_msm8960_fluid()) { msm_camera_sensor_imx091_data.sensor_platform_info-> mount_angle = 270; } #endif platform_device_register(&msm_camera_server); platform_device_register(&msm8960_device_csiphy0); platform_device_register(&msm8960_device_csiphy1); platform_device_register(&msm8960_device_csiphy2); platform_device_register(&msm8960_device_csid0); platform_device_register(&msm8960_device_csid1); platform_device_register(&msm8960_device_csid2); platform_device_register(&msm8960_device_ispif); platform_device_register(&msm8960_device_vfe); platform_device_register(&msm8960_device_vpe); }
static int msm8960_audrx_init(struct snd_soc_pcm_runtime *rtd) { int err; struct snd_soc_codec *codec = rtd->codec; struct snd_soc_dapm_context *dapm = &codec->dapm; pr_debug("%s()\n", __func__); err = snd_soc_add_controls(codec, tabla_msm8960_controls, ARRAY_SIZE(tabla_msm8960_controls)); if (err < 0) return err; snd_soc_dapm_new_controls(dapm, msm8960_dapm_widgets, ARRAY_SIZE(msm8960_dapm_widgets)); snd_soc_dapm_add_routes(dapm, common_audio_map, ARRAY_SIZE(common_audio_map)); if (machine_is_msm8960_cdp()) snd_soc_dapm_add_routes(dapm, cdp_audio_map, ARRAY_SIZE(cdp_audio_map)); else if (machine_is_msm8960_mtp()) snd_soc_dapm_add_routes(dapm, cdp_audio_map, ARRAY_SIZE(cdp_audio_map)); else if (machine_is_msm8960_fluid()) snd_soc_dapm_add_routes(dapm, fluid_audio_map, ARRAY_SIZE(fluid_audio_map)); snd_soc_dapm_enable_pin(dapm, "Ext Spk"); snd_soc_dapm_sync(dapm); err = snd_soc_jack_new(codec, "Headset Jack", SND_JACK_HEADSET, &hs_jack); if (err) { pr_err("failed to create new jack\n"); return err; } err = snd_soc_jack_new(codec, "Button Jack", SND_JACK_BTN_0, &button_jack); if (err) { pr_err("failed to create new jack\n"); return err; } tabla_hs_detect(codec, &hs_jack, &button_jack, &tabla_cal); return 0; }
/* * Fix up regulator consumer data that moves to a different regulator based on * the current target. */ void __init configure_msm8960_power_grid(void) { static struct rpm_regulator_init_data *rpm_data; int i; if (machine_is_msm8960_cdp()) { /* Only modify LVS6 consumers for CDP targets. */ for (i = 0; i < ARRAY_SIZE(msm_rpm_regulator_init_data); i++) { rpm_data = &msm_rpm_regulator_init_data[i]; if (rpm_data->id == RPM_VREG_ID_PM8921_LVS6) { rpm_data->init_data.consumer_supplies = vreg_consumers_CDP_LVS6; rpm_data->init_data.num_consumer_supplies = ARRAY_SIZE(vreg_consumers_CDP_LVS6); } } } }
void __init msm8960_init_cam(void) { msm_gpiomux_install(msm8960_cam_common_configs, ARRAY_SIZE(msm8960_cam_common_configs)); if (machine_is_msm8960_cdp()) { msm_gpiomux_install(msm8960_cdp_flash_configs, ARRAY_SIZE(msm8960_cdp_flash_configs)); msm_flash_src._fsrc.ext_driver_src.led_en = GPIO_CAM_GP_LED_EN1; msm_flash_src._fsrc.ext_driver_src.led_flash_en = GPIO_CAM_GP_LED_EN2; #if defined(CONFIG_I2C) && (defined(CONFIG_GPIO_SX150X) || \ defined(CONFIG_GPIO_SX150X_MODULE)) msm_flash_src._fsrc.ext_driver_src.expander_info = cam_expander_info; #endif } if (machine_is_msm8960_liquid()) { struct msm_camera_sensor_info *s_info; s_info = &msm_camera_sensor_imx074_data; s_info->sensor_platform_info->mount_angle = 180; s_info = &msm_camera_sensor_ov2720_data; s_info->sensor_platform_info->ext_power_ctrl = msm_camera_8960_ext_power_ctrl; } if (machine_is_msm8960_fluid()) { msm_camera_sensor_imx091_data.sensor_platform_info-> mount_angle = 270; } platform_device_register(&msm_camera_server); platform_device_register(&msm8960_device_csiphy0); platform_device_register(&msm8960_device_csiphy1); platform_device_register(&msm8960_device_csiphy2); platform_device_register(&msm8960_device_csid0); platform_device_register(&msm8960_device_csid1); platform_device_register(&msm8960_device_csid2); platform_device_register(&msm8960_device_ispif); platform_device_register(&msm8960_device_vfe); platform_device_register(&msm8960_device_vpe); }
void __init msm8960_init_cam(void) { #if defined(CONFIG_SONY_CAM_MAIN_V4L2) || defined(CONFIG_SONY_CAM_SUB_V4L2) msm_gpiomux_install(msm8960_cam_2d_configs, ARRAY_SIZE(msm8960_cam_2d_configs)); #else msm_gpiomux_install(msm8960_cam_common_configs, ARRAY_SIZE(msm8960_cam_common_configs)); if (machine_is_msm8960_cdp()) { msm_gpiomux_install(msm8960_cdp_flash_configs, ARRAY_SIZE(msm8960_cdp_flash_configs)); } if (machine_is_msm8960_liquid()) { struct msm_camera_sensor_info *s_info; s_info = &msm_camera_sensor_imx074_data; s_info->sensor_platform_info->mount_angle = 180; s_info = &msm_camera_sensor_ov2720_data; s_info->sensor_platform_info->ext_power_ctrl = msm_camera_8960_ext_power_ctrl; } #endif platform_device_register(&msm_camera_server); platform_device_register(&msm8960_device_csiphy0); platform_device_register(&msm8960_device_csiphy1); platform_device_register(&msm8960_device_csiphy2); platform_device_register(&msm8960_device_csid0); platform_device_register(&msm8960_device_csid1); platform_device_register(&msm8960_device_csid2); platform_device_register(&msm8960_device_ispif); platform_device_register(&msm8960_device_vfe); #if defined(CONFIG_SONY_VPE) platform_device_register(&sony_vpe_device); #else platform_device_register(&msm8960_device_vpe); #endif }
int __init msm8960_init_gpiomux(void) { int rc = msm_gpiomux_init(NR_GPIO_IRQS); if (rc) { pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc); return rc; } #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) msm_gpiomux_install(msm8960_ethernet_configs, ARRAY_SIZE(msm8960_ethernet_configs)); #endif msm_gpiomux_install(msm8960_gsbi_configs, ARRAY_SIZE(msm8960_gsbi_configs)); /* LGE_CHANGE * to suppply VDD3V touch power * exactly according to board revision * 2012-02-11, [email protected] */ if (lge_get_board_revno() >= HW_REV_B) { msm_gpiomux_install(msm8960_cyts_configs, ARRAY_SIZE(msm8960_cyts_configs)); } else { msm_gpiomux_install(msm8960_cyts_configs_revA, ARRAY_SIZE(msm8960_cyts_configs_revA)); } msm_gpiomux_install(msm8960_slimbus_config, ARRAY_SIZE(msm8960_slimbus_config)); msm_gpiomux_install(msm8960_audio_codec_configs, ARRAY_SIZE(msm8960_audio_codec_configs)); #ifdef CONFIG_LGE_AUDIO /* LGE_CHANGE * 2012-01-30, [email protected] * do not configurate gpio of auxpcm * configurated in bootloader (sbl3) */ rc = (ARRAY_SIZE(msm8960_audio_auxpcm_configs))?rc:0; #else msm_gpiomux_install(msm8960_audio_auxpcm_configs, ARRAY_SIZE(msm8960_audio_auxpcm_configs)); #endif //20110725, [email protected], NFC GPIO Setting [START] #if defined(CONFIG_LGE_NFC_PN544) msm_gpiomux_install(msm8960_nfc_configs, ARRAY_SIZE(msm8960_nfc_configs)); #endif //20110725, [email protected], NFC GPIO Setting [END] // msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); /* * QCT Original * * NOT USED * */ #if !defined(CONFIG_MACH_LGE) if (machine_is_msm8960_mtp() || machine_is_msm8960_fluid() || machine_is_msm8960_liquid() || machine_is_msm8960_cdp()) msm_gpiomux_install(hap_lvl_shft_config, ARRAY_SIZE(hap_lvl_shft_config)); #endif /* QCT Original */ if (PLATFORM_IS_CHARM25()) msm_gpiomux_install(mdm_configs, ARRAY_SIZE(mdm_configs)); #ifdef CONFIG_USB_EHCI_MSM_HSIC if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) != 1) && (PLATFORM_IS_CHARM25() || machine_is_msm8960_liquid())) msm_gpiomux_install(msm8960_hsic_configs, ARRAY_SIZE(msm8960_hsic_configs)); #endif #ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL msm_gpiomux_install(msm8960_hdmi_configs, ARRAY_SIZE(msm8960_hdmi_configs)); #endif msm_gpiomux_install(msm8960_mdp_vsync_configs, ARRAY_SIZE(msm8960_mdp_vsync_configs)); return 0; }
int __init msm8960_init_gpiomux(void) { int rc = msm_gpiomux_init(NR_GPIO_IRQS); if (rc) { pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc); return rc; } #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) if (socinfo_get_platform_subtype() != PLATFORM_SUBTYPE_SGLTE) msm_gpiomux_install(msm8960_ethernet_configs, ARRAY_SIZE(msm8960_ethernet_configs)); #endif msm_gpiomux_install(msm8960_gsbi_configs, ARRAY_SIZE(msm8960_gsbi_configs)); msm_gpiomux_install(msm8960_cyts_configs, ARRAY_SIZE(msm8960_cyts_configs)); msm_gpiomux_install(msm8960_slimbus_config, ARRAY_SIZE(msm8960_slimbus_config)); msm_gpiomux_install(msm8960_audio_codec_configs, ARRAY_SIZE(msm8960_audio_codec_configs)); msm_gpiomux_install(msm8960_audio_auxpcm_configs, ARRAY_SIZE(msm8960_audio_auxpcm_configs)); msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); #ifdef CONFIG_MMC_MSM_SDC4_SUPPORT msm_gpiomux_install(msm8960_sdcc4_configs, ARRAY_SIZE(msm8960_sdcc4_configs)); #endif if (machine_is_msm8960_mtp() || machine_is_msm8960_fluid() || machine_is_msm8960_liquid() || machine_is_msm8960_cdp()) { if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE) msm_gpiomux_install(hap_lvl_shft_config_sglte, ARRAY_SIZE(hap_lvl_shft_config_sglte)); else msm_gpiomux_install(hap_lvl_shft_config, ARRAY_SIZE(hap_lvl_shft_config)); } #ifdef CONFIG_USB_EHCI_MSM_HSIC if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) != 1) && machine_is_msm8960_liquid()) msm_gpiomux_install(msm8960_hsic_configs, ARRAY_SIZE(msm8960_hsic_configs)); if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) != 1) && machine_is_msm8960_liquid()) msm_gpiomux_install(msm8960_hsic_hub_configs, ARRAY_SIZE(msm8960_hsic_hub_configs)); #endif #ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL msm_gpiomux_install(msm8960_hdmi_configs, ARRAY_SIZE(msm8960_hdmi_configs)); #endif msm_gpiomux_install(msm8960_mdp_vsync_configs, ARRAY_SIZE(msm8960_mdp_vsync_configs)); if (socinfo_get_platform_subtype() != PLATFORM_SUBTYPE_SGLTE) msm_gpiomux_install(msm8960_gsbi8_uartdm_configs, ARRAY_SIZE(msm8960_gsbi8_uartdm_configs)); if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE) msm_gpiomux_install(msm8960_gsbi8_uart_configs, ARRAY_SIZE(msm8960_gsbi8_uart_configs)); else msm_gpiomux_install(msm8960_gsbi5_uart_configs, ARRAY_SIZE(msm8960_gsbi5_uart_configs)); if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE) { /* For 8960 Fusion 2.2 Primary IPC */ msm_gpiomux_install(msm8960_fusion_gsbi_configs, ARRAY_SIZE(msm8960_fusion_gsbi_configs)); /* For SGLTE 8960 Fusion External VFR */ msm_gpiomux_install(msm8960_external_vfr_configs, ARRAY_SIZE(msm8960_external_vfr_configs)); } #ifdef CONFIG_MMC_MSM_SDC2_SUPPORT msm_gpiomux_install(msm8960_sdcc2_configs, ARRAY_SIZE(msm8960_sdcc2_configs)); #endif if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE) msm_gpiomux_install(sglte_configs, ARRAY_SIZE(sglte_configs)); return 0; }
int __init msm8960_init_gpiomux(void) { int rc = msm_gpiomux_init(NR_GPIO_IRQS); if (rc) { pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc); return rc; } #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) msm_gpiomux_install(msm8960_ethernet_configs, ARRAY_SIZE(msm8960_ethernet_configs)); #endif msm_gpiomux_install(msm8960_gsbi_configs, ARRAY_SIZE(msm8960_gsbi_configs)); /* */ if (lge_get_board_revno() >= HW_REV_B) { msm_gpiomux_install(msm8960_cyts_configs, ARRAY_SIZE(msm8960_cyts_configs)); } else { msm_gpiomux_install(msm8960_cyts_configs_revA, ARRAY_SIZE(msm8960_cyts_configs_revA)); } msm_gpiomux_install(msm8960_slimbus_config, ARRAY_SIZE(msm8960_slimbus_config)); msm_gpiomux_install(msm8960_audio_codec_configs, ARRAY_SIZE(msm8960_audio_codec_configs)); #ifdef CONFIG_LGE_AUDIO /* */ rc = (ARRAY_SIZE(msm8960_audio_auxpcm_configs))?rc:0; #else msm_gpiomux_install(msm8960_audio_auxpcm_configs, ARRAY_SIZE(msm8960_audio_auxpcm_configs)); #endif // #if defined(CONFIG_LGE_NFC_PN544) msm_gpiomux_install(msm8960_nfc_configs, ARRAY_SIZE(msm8960_nfc_configs)); #endif // // msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); /* * QCT Original * * NOT USED * */ #if !defined(CONFIG_MACH_LGE) if (machine_is_msm8960_mtp() || machine_is_msm8960_fluid() || machine_is_msm8960_liquid() || machine_is_msm8960_cdp()) msm_gpiomux_install(hap_lvl_shft_config, ARRAY_SIZE(hap_lvl_shft_config)); #endif /* QCT Original */ if (PLATFORM_IS_CHARM25()) msm_gpiomux_install(mdm_configs, ARRAY_SIZE(mdm_configs)); #ifdef CONFIG_USB_EHCI_MSM_HSIC if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) != 1) && (PLATFORM_IS_CHARM25() || machine_is_msm8960_liquid())) msm_gpiomux_install(msm8960_hsic_configs, ARRAY_SIZE(msm8960_hsic_configs)); #endif #ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL msm_gpiomux_install(msm8960_hdmi_configs, ARRAY_SIZE(msm8960_hdmi_configs)); #endif msm_gpiomux_install(msm8960_mdp_vsync_configs, ARRAY_SIZE(msm8960_mdp_vsync_configs)); return 0; }
int __init msm8960_init_gpiomux(void) { int rc = msm_gpiomux_init(NR_GPIO_IRQS); if (rc) { pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc); return rc; } #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) msm_gpiomux_install(msm8960_ethernet_configs, ARRAY_SIZE(msm8960_ethernet_configs)); #endif msm_gpiomux_install(msm8960_gsbi_configs, ARRAY_SIZE(msm8960_gsbi_configs)); msm_gpiomux_install(msm8960_cyts_configs, ARRAY_SIZE(msm8960_cyts_configs)); msm_gpiomux_install(msm8960_slimbus_config, ARRAY_SIZE(msm8960_slimbus_config)); msm_gpiomux_install(msm8960_audio_codec_configs, ARRAY_SIZE(msm8960_audio_codec_configs)); // LGE_BSP_AUDIO, [email protected], 2012-09-20, Broadcom Bluetooth RF Silicon Audio. #if defined(CONFIG_BROADCOM_BT_AUDIO) msm_gpiomux_install(msm8960_audio_auxpcm_configs, ARRAY_SIZE(msm8960_audio_auxpcm_configs)); #elif CONFIG_LGE_AUDIO /* LGE_CHANGE * 2012-01-30, [email protected] * do not configurate gpio of auxpcm * configurated in bootloader (sbl3) */ rc = (ARRAY_SIZE(msm8960_audio_auxpcm_configs))?rc:0; #else msm_gpiomux_install(msm8960_audio_auxpcm_configs, ARRAY_SIZE(msm8960_audio_auxpcm_configs)); #endif //20110725, [email protected], NFC GPIO Setting [START] #if defined(CONFIG_LGE_NFC_PN544) msm_gpiomux_install(msm8960_nfc_configs, ARRAY_SIZE(msm8960_nfc_configs)); #endif //20110725, [email protected], NFC GPIO Setting [END] // #ifdef CONFIG_MMC_MSM_SDC4_SUPPORT msm_gpiomux_install(sdc4_interface, ARRAY_SIZE(sdc4_interface)); #else /* CONFIG_MMC_MSM_SDC4_SUPPORT */ msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); #endif /* CONFIG_MMC_MSM_SDC4_SUPPORT */ //BEGIN: 0019632 [email protected] 2012-05-31 //ADD: 0019632: [F200][BT] Bluetooth board bring-up msm_gpiomux_install(bt_rfkill_interface, ARRAY_SIZE(bt_rfkill_interface)); msm_gpiomux_install(gsbi6_uart_configs, ARRAY_SIZE(gsbi6_uart_configs)); #ifdef CONFIG_LGE_BLUESLEEP msm_gpiomux_install(msm8960_bt_host_wakeup_configs, ARRAY_SIZE(msm8960_bt_host_wakeup_configs)); msm_gpiomux_install(msm8960_bt_wakeup_configs, ARRAY_SIZE(msm8960_bt_wakeup_configs)); #endif //END: 0019632 [email protected] 2012-05-31 /* * QCT Original * * NOT USED * */ #if !defined(CONFIG_MACH_LGE) if (machine_is_msm8960_mtp() || machine_is_msm8960_fluid() || machine_is_msm8960_liquid() || machine_is_msm8960_cdp()) msm_gpiomux_install(hap_lvl_shft_config, ARRAY_SIZE(hap_lvl_shft_config)); #endif /* QCT Original */ #ifdef CONFIG_USB_EHCI_MSM_HSIC if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) != 1) && machine_is_msm8960_liquid()) msm_gpiomux_install(msm8960_hsic_configs, ARRAY_SIZE(msm8960_hsic_configs)); if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) != 1) && machine_is_msm8960_liquid()) msm_gpiomux_install(msm8960_hsic_hub_configs, ARRAY_SIZE(msm8960_hsic_hub_configs)); #endif #ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL msm_gpiomux_install(msm8960_hdmi_configs, ARRAY_SIZE(msm8960_hdmi_configs)); #endif msm_gpiomux_install(msm8960_mdp_vsync_configs, ARRAY_SIZE(msm8960_mdp_vsync_configs)); #if !defined(CONFIG_MACH_LGE) if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE) msm_gpiomux_install(msm8960_gsbi8_uart_configs, ARRAY_SIZE(msm8960_gsbi8_uart_configs)); else msm_gpiomux_install(msm8960_gsbi5_uart_configs, ARRAY_SIZE(msm8960_gsbi5_uart_configs)); if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE) { /* For 8960 Fusion 2.2 Primary IPC */ msm_gpiomux_install(msm8960_fusion_gsbi_configs, ARRAY_SIZE(msm8960_fusion_gsbi_configs)); /* For SGLTE 8960 Fusion External VFR */ msm_gpiomux_install(msm8960_external_vfr_configs, ARRAY_SIZE(msm8960_external_vfr_configs)); } #ifdef CONFIG_MMC_MSM_SDC2_SUPPORT msm_gpiomux_install(msm8960_sdcc2_configs, ARRAY_SIZE(msm8960_sdcc2_configs)); #endif if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE) msm_gpiomux_install(sglte_configs, ARRAY_SIZE(sglte_configs)); #endif return 0; }
int __init msm8960_init_gpiomux(void) { int rc = msm_gpiomux_init(NR_GPIO_IRQS); if (rc) { pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc); return rc; } #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) msm_gpiomux_install(msm8960_ethernet_configs, ARRAY_SIZE(msm8960_ethernet_configs)); #endif msm_gpiomux_install(msm8960_gsbi_configs, ARRAY_SIZE(msm8960_gsbi_configs)); msm_gpiomux_install(msm8960_cyts_configs, ARRAY_SIZE(msm8960_cyts_configs)); #ifdef CONFIG_TOUCHSCREEN_QT602240_MSM8960 msm_gpiomux_install(msm8960_qt602240_configs, ARRAY_SIZE(msm8960_qt602240_configs)); #endif #ifdef CONFIG_TOUCHSCREEN_MELFAS_TS //dhyang msm_gpiomux_install(msm8960_melfas_configs, ARRAY_SIZE(msm8960_melfas_configs)); #endif msm_gpiomux_install(msm8960_slimbus_config, ARRAY_SIZE(msm8960_slimbus_config)); msm_gpiomux_install(msm8960_audio_codec_configs, ARRAY_SIZE(msm8960_audio_codec_configs)); #ifndef CONFIG_PN544 msm_gpiomux_install(msm8960_audio_auxpcm_configs, ARRAY_SIZE(msm8960_audio_auxpcm_configs)); #endif msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); if (machine_is_msm8960_mtp() || machine_is_msm8960_fluid() || machine_is_msm8960_liquid() || machine_is_msm8960_cdp()) msm_gpiomux_install(hap_lvl_shft_config, ARRAY_SIZE(hap_lvl_shft_config)); if (PLATFORM_IS_CHARM25()) msm_gpiomux_install(mdm_configs, ARRAY_SIZE(mdm_configs)); #ifdef CONFIG_USB_EHCI_MSM_HSIC if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) != 1) && (PLATFORM_IS_CHARM25() || machine_is_msm8960_liquid())) msm_gpiomux_install(msm8960_hsic_configs, ARRAY_SIZE(msm8960_hsic_configs)); #endif #ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL msm_gpiomux_install(msm8960_hdmi_configs, ARRAY_SIZE(msm8960_hdmi_configs)); #endif msm_gpiomux_install(msm8960_mdp_vsync_configs, ARRAY_SIZE(msm8960_mdp_vsync_configs)); #ifdef CONFIG_PANTECH_CHARGER_WIRELESS msm_gpiomux_install(msm8960_wireless_charger_configs, ARRAY_SIZE(msm8960_wireless_charger_configs)); #endif #ifdef CONFIG_PANTECH_PMIC // gpio-config for QC recommendation (pull-up) msm_gpiomux_install(msm8960_pm_irq_configs, ARRAY_SIZE(msm8960_pm_irq_configs)); #endif #ifdef CONFIG_PANTECH_SND //kdkim #if defined(T_STARQ) || defined(T_OSCAR) || defined(T_EF45K) || defined(T_EF46L) || defined(T_EF47S) msm_gpiomux_install(headset_detect_irq_configs, ARRAY_SIZE(headset_detect_irq_configs)); #endif #endif #ifdef CONFIG_CXD2235AGC_NFC_FELICA msm_gpiomux_install(nfcf_gpio_configs, ARRAY_SIZE(nfcf_gpio_configs)); #endif #ifdef CONFIG_PANTECH_GPIO_SLEEP_CONFIG #if (defined(CONFIG_MACH_MSM8960_STARQ) || defined(CONFIG_MACH_MSM8960_OSCAR)) msm_gpiomux_install(msm8960_sleep_gpio_gpio_configs, ARRAY_SIZE(msm8960_sleep_gpio_gpio_configs)); #endif #endif return 0; }
int __init msm8960_init_gpiomux(void) { int rc = msm_gpiomux_init(NR_GPIO_IRQS); if (rc) { pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc); return rc; } #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) msm_gpiomux_install(msm8960_ethernet_configs, ARRAY_SIZE(msm8960_ethernet_configs)); #endif msm_gpiomux_install(msm8960_gsbi_configs, ARRAY_SIZE(msm8960_gsbi_configs)); msm_gpiomux_install(msm8960_cyts_configs, ARRAY_SIZE(msm8960_cyts_configs)); msm_gpiomux_install(msm8960_slimbus_config, ARRAY_SIZE(msm8960_slimbus_config)); msm_gpiomux_install(msm8960_audio_codec_configs, ARRAY_SIZE(msm8960_audio_codec_configs)); #ifdef CONFIG_LGE_AUDIO /* LGE_CHANGE * 2012-01-30, [email protected] * do not configurate gpio of auxpcm * configurated in bootloader (sbl3) */ rc = (ARRAY_SIZE(msm8960_audio_auxpcm_configs))?rc:0; #else msm_gpiomux_install(msm8960_audio_auxpcm_configs, ARRAY_SIZE(msm8960_audio_auxpcm_configs)); #endif //20110725, [email protected], NFC GPIO Setting [START] #if defined(CONFIG_NFC_DEVICES) msm_gpiomux_install(msm8960_nfc_configs, ARRAY_SIZE(msm8960_nfc_configs)); #endif //20110725, [email protected], NFC GPIO Setting [END] msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); #ifdef CONFIG_MMC_MSM_SDC4_SUPPORT msm_gpiomux_install(msm8960_sdcc4_configs, ARRAY_SIZE(msm8960_sdcc4_configs)); #endif if (machine_is_msm8960_mtp() || machine_is_msm8960_fluid() || machine_is_msm8960_liquid() || machine_is_msm8960_cdp()) msm_gpiomux_install(hap_lvl_shft_config, ARRAY_SIZE(hap_lvl_shft_config)); #ifdef CONFIG_USB_EHCI_MSM_HSIC if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) != 1) && machine_is_msm8960_liquid()) msm_gpiomux_install(msm8960_hsic_configs, ARRAY_SIZE(msm8960_hsic_configs)); if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) != 1) && machine_is_msm8960_liquid()) msm_gpiomux_install(msm8960_hsic_hub_configs, ARRAY_SIZE(msm8960_hsic_hub_configs)); #endif #ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL msm_gpiomux_install(msm8960_hdmi_configs, ARRAY_SIZE(msm8960_hdmi_configs)); #endif msm_gpiomux_install(msm8960_mdp_vsync_configs, ARRAY_SIZE(msm8960_mdp_vsync_configs)); if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE) msm_gpiomux_install(msm8960_gsbi8_uart_configs, ARRAY_SIZE(msm8960_gsbi8_uart_configs)); else msm_gpiomux_install(msm8960_gsbi5_uart_configs, ARRAY_SIZE(msm8960_gsbi5_uart_configs)); if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE) { /* For 8960 Fusion 2.2 Primary IPC */ msm_gpiomux_install(msm8960_fusion_gsbi_configs, ARRAY_SIZE(msm8960_fusion_gsbi_configs)); /* For SGLTE 8960 Fusion External VFR */ msm_gpiomux_install(msm8960_external_vfr_configs, ARRAY_SIZE(msm8960_external_vfr_configs)); } #ifdef CONFIG_MMC_MSM_SDC2_SUPPORT msm_gpiomux_install(msm8960_sdcc2_configs, ARRAY_SIZE(msm8960_sdcc2_configs)); #endif if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE) msm_gpiomux_install(sglte_configs, ARRAY_SIZE(sglte_configs)); return 0; }
static int msm8960_audrx_init(struct snd_soc_pcm_runtime *rtd) { int err; struct snd_soc_codec *codec = rtd->codec; struct snd_soc_dapm_context *dapm = &codec->dapm; struct snd_soc_dai *cpu_dai = rtd->cpu_dai; struct pm_gpio jack_gpio_cfg = { .direction = PM_GPIO_DIR_IN, .pull = PM_GPIO_PULL_UP_1P5, .function = PM_GPIO_FUNC_NORMAL, .vin_sel = 2, .inv_int_pol = 0, }; pr_debug("%s(), dev_name%s\n", __func__, dev_name(cpu_dai->dev)); if (machine_is_msm8960_liquid()) { top_spk_pamp_gpio = (PM8921_GPIO_PM_TO_SYS(19)); bottom_spk_pamp_gpio = (PM8921_GPIO_PM_TO_SYS(18)); } snd_soc_dapm_new_controls(dapm, msm8960_dapm_widgets, ARRAY_SIZE(msm8960_dapm_widgets)); snd_soc_dapm_add_routes(dapm, common_audio_map, ARRAY_SIZE(common_audio_map)); snd_soc_dapm_enable_pin(dapm, "Ext Spk Bottom Pos"); snd_soc_dapm_enable_pin(dapm, "Ext Spk Bottom Neg"); snd_soc_dapm_enable_pin(dapm, "Ext Spk Top Pos"); snd_soc_dapm_enable_pin(dapm, "Ext Spk Top Neg"); snd_soc_dapm_sync(dapm); err = snd_soc_jack_new(codec, "Headset Jack", (SND_JACK_HEADSET | SND_JACK_OC_HPHL | SND_JACK_OC_HPHR | SND_JACK_UNSUPPORTED), &hs_jack); if (err) { pr_err("failed to create new jack\n"); return err; } err = snd_soc_jack_new(codec, "Button Jack", TABLA_JACK_BUTTON_MASK, &button_jack); if (err) { pr_err("failed to create new jack\n"); return err; } codec_clk = clk_get(cpu_dai->dev, "osr_clk"); if (machine_is_msm8960_cdp()) mbhc_cfg.swap_gnd_mic = msm8960_swap_gnd_mic; if (hs_detect_use_gpio) { mbhc_cfg.gpio = PM8921_GPIO_PM_TO_SYS(JACK_DETECT_GPIO); mbhc_cfg.gpio_irq = JACK_DETECT_INT; } if (mbhc_cfg.gpio) { err = pm8xxx_gpio_config(mbhc_cfg.gpio, &jack_gpio_cfg); if (err) { pr_err("%s: pm8xxx_gpio_config JACK_DETECT failed %d\n", __func__, err); return err; } } mbhc_cfg.read_fw_bin = hs_detect_use_firmware; err = tabla_hs_detect(codec, &mbhc_cfg); return err; } static int msm8960_slim_0_rx_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params) { struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); struct snd_interval *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); pr_debug("%s()\n", __func__); rate->min = rate->max = 48000; channels->min = channels->max = msm8960_slim_0_rx_ch; return 0; } static int msm8960_slim_0_tx_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params) { struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); struct snd_interval *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); pr_debug("%s()\n", __func__); rate->min = rate->max = 48000; channels->min = channels->max = msm8960_slim_0_tx_ch; return 0; } static int msm8960_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params) { struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); pr_debug("%s()\n", __func__); rate->min = rate->max = 48000; return 0; } static int msm8960_hdmi_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params) { struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); struct snd_interval *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); pr_debug("%s channels->min %u channels->max %u ()\n", __func__, channels->min, channels->max); rate->min = rate->max = 48000; return 0; } static int msm8960_btsco_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params) { struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); struct snd_interval *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); rate->min = rate->max = msm8960_btsco_rate; channels->min = channels->max = msm8960_btsco_ch; return 0; } static int msm8960_auxpcm_be_params_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params) { struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); struct snd_interval *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); rate->min = rate->max = msm8960_auxpcm_rate; /* PCM only supports mono output */ channels->min = channels->max = 1; return 0; } static int msm8960_proxy_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params) { struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); pr_debug("%s()\n", __func__); rate->min = rate->max = 48000; return 0; } static int msm8960_aux_pcm_get_gpios(void) { int ret = 0; pr_debug("%s\n", __func__); ret = gpio_request(GPIO_AUX_PCM_DOUT, "AUX PCM DOUT"); if (ret < 0) { pr_err("%s: Failed to request gpio(%d): AUX PCM DOUT", __func__, GPIO_AUX_PCM_DOUT); goto fail_dout; } ret = gpio_request(GPIO_AUX_PCM_DIN, "AUX PCM DIN"); if (ret < 0) { pr_err("%s: Failed to request gpio(%d): AUX PCM DIN", __func__, GPIO_AUX_PCM_DIN); goto fail_din; } ret = gpio_request(GPIO_AUX_PCM_SYNC, "AUX PCM SYNC"); if (ret < 0) { pr_err("%s: Failed to request gpio(%d): AUX PCM SYNC", __func__, GPIO_AUX_PCM_SYNC); goto fail_sync; } ret = gpio_request(GPIO_AUX_PCM_CLK, "AUX PCM CLK"); if (ret < 0) { pr_err("%s: Failed to request gpio(%d): AUX PCM CLK", __func__, GPIO_AUX_PCM_CLK); goto fail_clk; } return 0; fail_clk: gpio_free(GPIO_AUX_PCM_SYNC); fail_sync: gpio_free(GPIO_AUX_PCM_DIN); fail_din: gpio_free(GPIO_AUX_PCM_DOUT); fail_dout: return ret; }
int __init msm8960_init_gpiomux(void) { int rc = msm_gpiomux_init(NR_GPIO_IRQS); if (rc) { pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc); return rc; } #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) msm_gpiomux_install(msm8960_ethernet_configs, ARRAY_SIZE(msm8960_ethernet_configs)); #endif msm_gpiomux_install(msm8960_gsbi_configs, ARRAY_SIZE(msm8960_gsbi_configs)); msm8960_gpio_key_configs[0].gpio = gpio_rev(VOLUME_UP); msm8960_gpio_key_configs[1].gpio = gpio_rev(VOLUME_DOWN); msm_gpiomux_install(msm8960_gpio_key_configs, ARRAY_SIZE(msm8960_gpio_key_configs)); msm_gpiomux_install(msm8960_sec_ts_configs, ARRAY_SIZE(msm8960_sec_ts_configs)); msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); #ifndef CONFIG_SLIMBUS_MSM_CTRL msm_gpiomux_install(msm8960_audio_i2s_rx_codec_configs, ARRAY_SIZE(msm8960_audio_i2s_tx_codec_configs)); msm_gpiomux_install(msm8960_audio_i2s_tx_codec_configs, ARRAY_SIZE(msm8960_audio_i2s_tx_codec_configs)); #else msm_gpiomux_install(msm8960_slimbus_config, ARRAY_SIZE(msm8960_slimbus_config)); msm_gpiomux_install(msm8960_audio_codec_configs, ARRAY_SIZE(msm8960_audio_codec_configs)); #endif msm_gpiomux_install(nc_configs, ARRAY_SIZE(nc_configs)); #ifdef CONFIG_USB_SWITCH_FSA9485 msm_gpiomux_install(msm8960_fsa9485_configs, ARRAY_SIZE(msm8960_fsa9485_configs)); #endif if (machine_is_msm8960_mtp() || machine_is_msm8960_fluid() || machine_is_msm8960_liquid() || machine_is_msm8960_cdp()) msm_gpiomux_install(hap_lvl_shft_config, ARRAY_SIZE(hap_lvl_shft_config)); if (PLATFORM_IS_CHARM25()) msm_gpiomux_install(mdm_configs, ARRAY_SIZE(mdm_configs)); #ifdef CONFIG_USB_EHCI_MSM_HSIC if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) != 1) && (PLATFORM_IS_CHARM25() || machine_is_msm8960_liquid())) msm_gpiomux_install(msm8960_hsic_configs, ARRAY_SIZE(msm8960_hsic_configs)); #endif msm_gpiomux_install(msm8960_hdmi_configs, ARRAY_SIZE(msm8960_hdmi_configs)); msm_gpiomux_install(msm8960_mdp_vsync_configs, ARRAY_SIZE(msm8960_mdp_vsync_configs)); return 0; }
int __init msm8960_init_gpiomux(void) { int rc = msm_gpiomux_init(NR_GPIO_IRQS); if (rc) { pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc); return rc; } #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) msm_gpiomux_install(msm8960_ethernet_configs, ARRAY_SIZE(msm8960_ethernet_configs)); #endif msm_gpiomux_install(msm8960_gsbi_configs, ARRAY_SIZE(msm8960_gsbi_configs)); #ifdef CONFIG_VP_A2220 msm_gpiomux_install(audience_suspend_configs, ARRAY_SIZE(audience_suspend_configs)); #endif msm8960_gpio_key_configs[0].gpio = gpio_rev(VOLUME_UP); msm8960_gpio_key_configs[1].gpio = gpio_rev(VOLUME_DOWN); if (system_rev < BOARD_REV13) msm_gpiomux_install(msm8960_gpio_key_configs, 2); else msm_gpiomux_install(msm8960_gpio_key_configs, ARRAY_SIZE(msm8960_gpio_key_configs)); msm_gpiomux_install(msm8960_sec_ts_configs, ARRAY_SIZE(msm8960_sec_ts_configs)); msm_gpiomux_install(msm8960_sec_sensor_configs, ARRAY_SIZE(msm8960_sec_sensor_configs)); msm_gpiomux_install(msm8960_audio_codec_configs, ARRAY_SIZE(msm8960_audio_codec_configs)); #ifdef CONFIG_MMC_MSM_SDC4_SUPPORT if (system_rev >= BOARD_REV09) msm_gpiomux_install(sdc4_interface, ARRAY_SIZE(sdc4_interface)); else #endif msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); msm_gpiomux_install(msm8960_audio_i2s_rx_codec_configs, ARRAY_SIZE(msm8960_audio_i2s_tx_codec_configs)); msm_gpiomux_install(msm8960_audio_i2s_tx_codec_configs, ARRAY_SIZE(msm8960_audio_i2s_tx_codec_configs)); #ifdef CONFIG_USB_SWITCH_FSA9485 msm_gpiomux_install(msm8960_fsa9485_configs, ARRAY_SIZE(msm8960_fsa9485_configs)); #endif if (machine_is_msm8960_mtp() || machine_is_msm8960_fluid() || machine_is_msm8960_liquid() || machine_is_msm8960_cdp()) msm_gpiomux_install(hap_lvl_shft_config, ARRAY_SIZE(hap_lvl_shft_config)); if (PLATFORM_IS_CHARM25()) msm_gpiomux_install(mdm_configs, ARRAY_SIZE(mdm_configs)); #ifdef CONFIG_USB_EHCI_MSM_HSIC if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) != 1) && (PLATFORM_IS_CHARM25() || machine_is_msm8960_liquid())) msm_gpiomux_install(msm8960_hsic_configs, ARRAY_SIZE(msm8960_hsic_configs)); #endif #ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL msm_gpiomux_install(msm8960_hdmi_configs, ARRAY_SIZE(msm8960_hdmi_configs)); #endif #if defined(CONFIG_VIDEO_MHL_V1) || defined(CONFIG_VIDEO_MHL_V2) msm_gpiomux_install(msm8960_mhl_configs, ARRAY_SIZE(msm8960_mhl_configs)); #endif msm_gpiomux_install(msm8960_mdp_vsync_configs, ARRAY_SIZE(msm8960_mdp_vsync_configs)); return 0; }
void __init msm8960_init_cam(void) { #if defined(CONFIG_MACH_MSM8960_L0) /* */ if (lge_get_board_revno() < HW_REV_B) msm_gpiomux_install(msm8960_cam_common_configs_a, ARRAY_SIZE(msm8960_cam_common_configs_a)); else msm_gpiomux_install(msm8960_cam_common_configs, ARRAY_SIZE(msm8960_cam_common_configs)); #elif defined(CONFIG_MACH_MSM8960_L1A) /* */ msm_gpiomux_install(msm8960_cam_common_configs_a, ARRAY_SIZE(msm8960_cam_common_configs_a)); #else msm_gpiomux_install(msm8960_cam_common_configs, ARRAY_SIZE(msm8960_cam_common_configs)); #endif #if !defined(CONFIG_MACH_LGE) if (machine_is_msm8960_cdp()) { msm_gpiomux_install(msm8960_cdp_flash_configs, ARRAY_SIZE(msm8960_cdp_flash_configs)); msm_flash_src._fsrc.ext_driver_src.led_en = GPIO_CAM_GP_LED_EN1; msm_flash_src._fsrc.ext_driver_src.led_flash_en = GPIO_CAM_GP_LED_EN2; #if defined(CONFIG_I2C) && (defined(CONFIG_GPIO_SX150X) || \ defined(CONFIG_GPIO_SX150X_MODULE)) msm_flash_src._fsrc.ext_driver_src.expander_info = cam_expander_info; #endif } #endif /* * QCT Original * * mount_angle change is not required. * privacy_light is related to front cam indicator LED. (NOT USED) * */ #if !defined(CONFIG_MACH_LGE) if (machine_is_msm8960_liquid()) { struct msm_camera_sensor_info *s_info; s_info = &msm_camera_sensor_s5k4e1_data; s_info->sensor_platform_info->mount_angle = 180; #ifdef CONFIG_MT9V113 s_info = &msm_camera_sensor_mt9v113_data; #elif defined(CONFIG_IMX119) /* */ s_info = &msm_camera_sensor_imx119_data; #endif s_info->sensor_platform_info->ext_power_ctrl = msm_camera_8960_ext_power_ctrl; } #endif platform_device_register(&msm8960_device_csiphy0); platform_device_register(&msm8960_device_csiphy1); platform_device_register(&msm8960_device_csid0); platform_device_register(&msm8960_device_csid1); platform_device_register(&msm8960_device_ispif); platform_device_register(&msm8960_device_vfe); platform_device_register(&msm8960_device_vpe); }
void __init msm8960_init_cam(void) { msm_gpiomux_install(msm8960_cam_common_configs, ARRAY_SIZE(msm8960_cam_common_configs)); if (machine_is_msm8960_cdp()) { } if (machine_is_msm8960_liquid()) { struct msm_camera_sensor_info *s_info; s_info = &msm_camera_sensor_mt9e013_data; s_info = &msm_camera_sensor_mt9m113_data; s_info->sensor_platform_info->ext_power_ctrl = msm_camera_8960_ext_power_ctrl; } if (machine_is_msm8960_fluid()) { msm_camera_sensor_imx091_data.sensor_platform_info-> mount_angle = 270; } platform_device_register(&msm_camera_server); platform_device_register(&msm8960_device_csiphy0); platform_device_register(&msm8960_device_csiphy1); platform_device_register(&msm8960_device_csiphy2); platform_device_register(&msm8960_device_csid0); platform_device_register(&msm8960_device_csid1); platform_device_register(&msm8960_device_csid2); platform_device_register(&msm8960_device_ispif); platform_device_register(&msm8960_device_vfe); platform_device_register(&msm8960_device_vpe); }
int __init msm8960_init_gpiomux(void) { int rc = msm_gpiomux_init(NR_GPIO_IRQS); if (rc) { pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc); return rc; } #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) msm_gpiomux_install(msm8960_ethernet_configs, ARRAY_SIZE(msm8960_ethernet_configs)); #endif msm_gpiomux_install(msm8960_gsbi_configs, ARRAY_SIZE(msm8960_gsbi_configs)); msm_gpiomux_install(msm8960_cyts_configs, ARRAY_SIZE(msm8960_cyts_configs)); msm_gpiomux_install(msm8960_slimbus_config, ARRAY_SIZE(msm8960_slimbus_config)); msm_gpiomux_install(msm8960_audio_codec_configs, ARRAY_SIZE(msm8960_audio_codec_configs)); // #if defined(CONFIG_BROADCOM_BT_AUDIO) msm_gpiomux_install(msm8960_audio_auxpcm_configs, ARRAY_SIZE(msm8960_audio_auxpcm_configs)); #elif CONFIG_LGE_AUDIO /* */ rc = (ARRAY_SIZE(msm8960_audio_auxpcm_configs))?rc:0; #else msm_gpiomux_install(msm8960_audio_auxpcm_configs, ARRAY_SIZE(msm8960_audio_auxpcm_configs)); #endif // #if defined(CONFIG_LGE_NFC) msm_gpiomux_install(msm8960_nfc_configs, ARRAY_SIZE(msm8960_nfc_configs)); #endif // // #ifdef CONFIG_MMC_MSM_SDC4_SUPPORT msm_gpiomux_install(sdc4_interface, ARRAY_SIZE(sdc4_interface)); #else /* CONFIG_MMC_MSM_SDC4_SUPPORT */ msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); #endif /* CONFIG_MMC_MSM_SDC4_SUPPORT */ // //ADD: 0019632: [F200][BT] Bluetooth board bring-up msm_gpiomux_install(bt_rfkill_interface, ARRAY_SIZE(bt_rfkill_interface)); msm_gpiomux_install(gsbi6_uart_configs, ARRAY_SIZE(gsbi6_uart_configs)); #ifdef CONFIG_LGE_BLUESLEEP msm_gpiomux_install(msm8960_bt_host_wakeup_configs, ARRAY_SIZE(msm8960_bt_host_wakeup_configs)); msm_gpiomux_install(msm8960_bt_wakeup_configs, ARRAY_SIZE(msm8960_bt_wakeup_configs)); #endif if (machine_is_msm8960_mtp() || machine_is_msm8960_fluid() || machine_is_msm8960_liquid() || machine_is_msm8960_cdp()) msm_gpiomux_install(hap_lvl_shft_config, ARRAY_SIZE(hap_lvl_shft_config)); #ifdef CONFIG_USB_EHCI_MSM_HSIC if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) != 1) && machine_is_msm8960_liquid()) msm_gpiomux_install(msm8960_hsic_configs, ARRAY_SIZE(msm8960_hsic_configs)); if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) != 1) && machine_is_msm8960_liquid()) msm_gpiomux_install(msm8960_hsic_hub_configs, ARRAY_SIZE(msm8960_hsic_hub_configs)); #endif #ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL msm_gpiomux_install(msm8960_hdmi_configs, ARRAY_SIZE(msm8960_hdmi_configs)); #endif msm_gpiomux_install(msm8960_mdp_vsync_configs, ARRAY_SIZE(msm8960_mdp_vsync_configs)); if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE) msm_gpiomux_install(msm8960_gsbi8_uart_configs, ARRAY_SIZE(msm8960_gsbi8_uart_configs)); else msm_gpiomux_install(msm8960_gsbi5_uart_configs, ARRAY_SIZE(msm8960_gsbi5_uart_configs)); if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE) { /* For 8960 Fusion 2.2 Primary IPC */ msm_gpiomux_install(msm8960_fusion_gsbi_configs, ARRAY_SIZE(msm8960_fusion_gsbi_configs)); /* For SGLTE 8960 Fusion External VFR */ msm_gpiomux_install(msm8960_external_vfr_configs, ARRAY_SIZE(msm8960_external_vfr_configs)); } #ifdef CONFIG_MMC_MSM_SDC2_SUPPORT msm_gpiomux_install(msm8960_sdcc2_configs, ARRAY_SIZE(msm8960_sdcc2_configs)); #endif if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE) msm_gpiomux_install(sglte_configs, ARRAY_SIZE(sglte_configs)); return 0; }