本文整理汇总了C++中socinfo_get_platform_subtype函数的典型用法代码示例。如果您正苦于以下问题:C++ socinfo_get_platform_subtype函数的具体用法?C++ socinfo_get_platform_subtype怎么用?C++ socinfo_get_platform_subtype使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了socinfo_get_platform_subtype函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: msm8960_init_cam
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);
}
开发者ID:PyYoshi,项目名称:android_kernel_kyocera_l02,代码行数:56,代码来源:board-8960-camera.c
示例2: msm_htc_8974_init_gpiomux
void __init msm_htc_8974_init_gpiomux(void)
{
int rc;
rc = msm_gpiomux_init_dt();
if (rc) {
pr_err("%s failed %d\n", __func__, rc);
return;
}
msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs));
msm_gpiomux_install(msm_blsp2_uart7_configs,
ARRAY_SIZE(msm_blsp2_uart7_configs));
msm_gpiomux_install(wcnss_5wire_interface,
ARRAY_SIZE(wcnss_5wire_interface));
msm_gpiomux_install(msm8974_slimbus_config,
ARRAY_SIZE(msm8974_slimbus_config));
msm_gpiomux_install(msm_touch_configs, ARRAY_SIZE(msm_touch_configs));
msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs));
if (of_machine_pid() == MEC_DWGL_PID || of_machine_pid() == MEC_TL_PID || of_machine_pid() == MEC_DUGL_PID)
msm_gpiomux_install(msm_sensor_configs_china_sku, ARRAY_SIZE(msm_sensor_configs_china_sku));
else
msm_gpiomux_install(msm_sensor_configs_non_china_sku, ARRAY_SIZE(msm_sensor_configs_non_china_sku));
msm_gpiomux_install(&nfc_irq_config, 1);
msm_gpiomux_install(&sd_card_det, 1);
msm_gpiomux_sdc4_install();
msm_gpiomux_install(msm_taiko_config, ARRAY_SIZE(msm_taiko_config));
msm_gpiomux_install_nowrite(msm_lcd_configs,
ARRAY_SIZE(msm_lcd_configs));
msm_gpiomux_install(msm_aud_configs,
ARRAY_SIZE(msm_aud_configs));
msm_gpiomux_install(msm_cir_configs, ARRAY_SIZE(msm_cir_configs));
if (of_machine_pid() == 268)
msm_gpiomux_install(msm_felica_configs, ARRAY_SIZE(msm_felica_configs));
if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_MDM)
msm_gpiomux_install(mdm_configs,
ARRAY_SIZE(mdm_configs));
msm_gpiomux_install(msm_blsp_rawchip_spi_configs, ARRAY_SIZE(msm_blsp_rawchip_spi_configs));
}
开发者ID:Soultwister,项目名称:kernel_kk444_sense_m8ace,代码行数:55,代码来源:board-mec-gpiomux.c
示例3: glu_init_gpiomux
void __init glu_init_gpiomux(void)
{
int rc;
rc = msm_gpiomux_init_dt();
if (rc) {
pr_err("%s failed %d\n", __func__, rc);
return;
}
pr_info("%s:%d socinfo_get_version %x\n", __func__, __LINE__,
socinfo_get_version());
if (socinfo_get_version() >= 0x20000)
msm_tlmm_misc_reg_write(TLMM_SPARE_REG, 0x5);
#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
msm_gpiomux_install(msm_eth_configs, ARRAY_SIZE(msm_eth_configs));
#endif
msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs));
msm_gpiomux_install(msm_blsp2_uart7_configs,
ARRAY_SIZE(msm_blsp2_uart7_configs));
msm_gpiomux_install(msm_blsp_rawchip_spi_configs, ARRAY_SIZE(msm_blsp_rawchip_spi_configs));
msm_gpiomux_install(wcnss_5wire_interface,
ARRAY_SIZE(wcnss_5wire_interface));
msm_gpiomux_install(msm8974_slimbus_config,
ARRAY_SIZE(msm8974_slimbus_config));
msm_gpiomux_install(msm_touch_configs, ARRAY_SIZE(msm_touch_configs));
msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs));
msm_gpiomux_install(&nfc_irq_config, 1);
msm_gpiomux_install(&sd_card_det, 1);
msm_gpiomux_sdc3_install();
msm_gpiomux_sdc4_install();
msm_gpiomux_install(msm_taiko_config, ARRAY_SIZE(msm_taiko_config));
msm_gpiomux_install(msm_hdmi_configs, ARRAY_SIZE(msm_hdmi_configs));
msm_gpiomux_install(msm_mhl_configs, ARRAY_SIZE(msm_mhl_configs));
msm_gpiomux_install(msm8974_pri_pri_auxpcm_configs,
ARRAY_SIZE(msm8974_pri_pri_auxpcm_configs));
msm_gpiomux_install_nowrite(msm_display_configs, ARRAY_SIZE(msm_display_configs));
msm_gpiomux_install(msm_aud_configs, ARRAY_SIZE(msm_aud_configs));
if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_MDM)
msm_gpiomux_install(mdm_configs,
ARRAY_SIZE(mdm_configs));
}
开发者ID:Arc-Team,项目名称:android_kernel_htc_a11,代码行数:54,代码来源:board-glu-gpiomux.c
示例4: msm_htc_8974_init_gpiomux
void __init msm_htc_8974_init_gpiomux(void)
{
int rc;
rc = msm_gpiomux_init_dt();
if (rc) {
pr_err("%s failed %d\n", __func__, rc);
return;
}
msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs));
msm_gpiomux_install(msm_blsp2_uart7_configs,
ARRAY_SIZE(msm_blsp2_uart7_configs));
msm_gpiomux_install(wcnss_5wire_interface,
ARRAY_SIZE(wcnss_5wire_interface));
msm_gpiomux_install(msm8974_slimbus_config,
ARRAY_SIZE(msm8974_slimbus_config));
msm_gpiomux_install(msm_touch_configs, ARRAY_SIZE(msm_touch_configs));
msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs));
msm_gpiomux_install(&nfc_irq_config, 1);
msm_gpiomux_install(&sd_card_det, 1);
msm_gpiomux_sdc4_install();
msm_gpiomux_install(msm_taiko_config, ARRAY_SIZE(msm_taiko_config));
msm_gpiomux_install(msm_hsic_configs, ARRAY_SIZE(msm_hsic_configs));
msm_gpiomux_install(msm_hdmi_configs, ARRAY_SIZE(msm_hdmi_configs));
msm_gpiomux_install(msm_mhl_configs, ARRAY_SIZE(msm_mhl_configs));
msm_gpiomux_install_nowrite(msm_lcd_configs,
ARRAY_SIZE(msm_lcd_configs));
msm_gpiomux_install(msm_aud_configs,
ARRAY_SIZE(msm_aud_configs));
msm_gpiomux_install(msm_cir_configs, ARRAY_SIZE(msm_cir_configs));
if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_MDM)
msm_gpiomux_install(mdm_configs,
ARRAY_SIZE(mdm_configs));
}
开发者ID:boa19861105,项目名称:B2_UHL,代码行数:49,代码来源:board-b2-gpiomux.c
示例5: msm8930_init_cam
void __init msm8930_init_cam(void)
{
msm_gpiomux_install(msm8930_cam_common_configs,
ARRAY_SIZE(msm8930_cam_common_configs));
#ifndef CONFIG_FIH_CAMERA
if (machine_is_msm8930_evt() &&
(socinfo_get_platform_subtype() ==
PLATFORM_SUBTYPE_SGLTE)) {
msm_gpiomux_install(msm8930_evt_cam_configs,
ARRAY_SIZE(msm8930_evt_cam_configs));
/* Load ov8825 & ov9724 only for SGLTE device */
msm8930_camera_board_info.board_info =
msm8930_evt_camera_i2c_boardinfo;
msm8930_camera_board_info.num_i2c_board_info =
ARRAY_SIZE(msm8930_evt_camera_i2c_boardinfo);
}
#endif
if (machine_is_msm8930_cdp()) {
#ifndef CONFIG_FIH_CAMERA
struct msm_camera_sensor_info *s_info;
s_info = &msm_camera_sensor_s5k3l1yx_data;
s_info->sensor_platform_info->mount_angle = 0;
#endif
#if defined(CONFIG_I2C) && (defined(CONFIG_GPIO_SX150X) || \
defined(CONFIG_GPIO_SX150X_MODULE))
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;
msm_flash_src._fsrc.ext_driver_src.expander_info =
cam_expander_info;
#endif
}
platform_device_register(&msm_camera_server);
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);
}
开发者ID:1n,项目名称:xperia-m-source,代码行数:47,代码来源:board-8930-camera.c
示例6: msm8960_ext_spk_power_amp_off
static void msm8960_ext_spk_power_amp_off(u32 spk)
{
int ret = 0;
if (spk & (SPK_AMP_POS | SPK_AMP_NEG)) {
if (!msm8930_ext_spk_pamp)
return;
if (socinfo_get_pmic_model() == PMIC_MODEL_PM8917) {
gpio_free(LEFT_SPKR_AMPL_GPIO);
msm8930_ext_spk_pamp = 0;
return;
}
if (machine_is_msm8930_mtp()
|| machine_is_msm8930_fluid()) {
pr_debug("%s: Free speaker boost gpio %u\n",
__func__, SPKR_BOOST_GPIO);
gpio_direction_output(SPKR_BOOST_GPIO, 0);
gpio_free(SPKR_BOOST_GPIO);
} else if (socinfo_get_platform_subtype() ==
PLATFORM_SUBTYPE_SGLTE) {
ret = pm8xxx_gpio_config(spkr_boost_enable_gpio,
&SPKR_OFF);
if (ret) {
pr_err("%s: Failure: spkr boost gpio OFF %u\n",
__func__, spkr_boost_enable_gpio);
return;
} else {
pr_debug("%s:Config PMIC8038 gpio for speaker" \
" OFF successfully\n", __func__);
}
}
pm8xxx_spk_enable(MSM8930_SPK_OFF);
msm8930_ext_spk_pamp = 0;
pr_debug("%s: slepping 4 ms after turning on external "
" Left Speaker Ampl\n", __func__);
usleep_range(4000, 4000);
} else {
pr_err("%s: ERROR : Invalid External Speaker Ampl. spk = 0x%08x\n",
__func__, spk);
return;
}
}
开发者ID:rspousta,项目名称:sony_xperia_m,代码行数:46,代码来源:msm8930.c
示例7: msm8930_audio_init
static int __init msm8930_audio_init(void)
{
int ret;
if (!soc_class_is_msm8930()) {
pr_err("%s: Not the right machine type\n", __func__);
return -ENODEV ;
}
mbhc_cfg.calibration = def_sitar_mbhc_cal();
if (!mbhc_cfg.calibration) {
pr_err("Calibration data allocation failed\n");
return -ENOMEM;
}
msm8930_snd_device = platform_device_alloc("soc-audio", 0);
if (!msm8930_snd_device) {
pr_err("Platform device allocation failed\n");
kfree(mbhc_cfg.calibration);
return -ENOMEM;
}
platform_set_drvdata(msm8930_snd_device, &snd_soc_card_msm8930);
ret = platform_device_add(msm8930_snd_device);
if (ret) {
platform_device_put(msm8930_snd_device);
kfree(mbhc_cfg.calibration);
return ret;
}
if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE)
us_euro_gpio = GPIO_HS_US_EURO_SEL_GPIO_SGLTE;
else
us_euro_gpio = GPIO_HS_US_EURO_SEL_GPIO;
if (msm8930_configure_headset_mic_gpios())
pr_err("%s Fail to configure headset mic gpios\n", __func__);
atomic_set(&auxpcm_rsc_ref, 0);
mutex_init(&cdc_mclk_mutex);
return ret;
}
开发者ID:rspousta,项目名称:sony_xperia_m,代码行数:42,代码来源:msm8930.c
示例8: msm8960_init_gpiomux
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;
}
开发者ID:Hybridmax,项目名称:I9505_Hybridmax-Stock_Kernel,代码行数:99,代码来源:board-8960-gpiomux.c
示例9: msm_htc_8974_init_gpiomux
void __init msm_htc_8974_init_gpiomux(void)
{
int rc;
rc = msm_gpiomux_init_dt();
if (rc) {
pr_err("%s failed %d\n", __func__, rc);
return;
}
msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs));
msm_gpiomux_install(msm_blsp2_uart7_configs,
ARRAY_SIZE(msm_blsp2_uart7_configs));
msm_gpiomux_install(wcnss_5wire_interface,
ARRAY_SIZE(wcnss_5wire_interface));
msm_gpiomux_install(msm8974_slimbus_config,
ARRAY_SIZE(msm8974_slimbus_config));
msm_gpiomux_install(msm_touch_configs, ARRAY_SIZE(msm_touch_configs));
msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs));
msm_gpiomux_install(msm_sensor_configs_non_common, ARRAY_SIZE(msm_sensor_configs_non_common));
//For china sku, GPIO 132 is for front cam ID, for non-china sku, GPIO 117 is for front cam ID
if (of_machine_pid() == m8_TL_PID || of_machine_pid() == m8_DUG_PID || of_machine_pid() == m8_DUGL_PID || of_machine_pid() == m8_DWG_PID || of_machine_pid() == m8_DWGL_PID || of_machine_pid() == m8_UHL_PID)
msm_gpiomux_install(msm_sensor_configs_china_sku, ARRAY_SIZE(msm_sensor_configs_china_sku));
else
msm_gpiomux_install(msm_sensor_configs_non_china_sku, ARRAY_SIZE(msm_sensor_configs_non_china_sku));
msm_gpiomux_install(&nfc_irq_config, 1);
msm_gpiomux_install(&sd_card_det, 1);
msm_gpiomux_sdc4_install();
msm_gpiomux_install(msm_taiko_config, ARRAY_SIZE(msm_taiko_config));
msm_gpiomux_install(msm_hsic_configs, ARRAY_SIZE(msm_hsic_configs));
msm_gpiomux_install(msm_hdmi_configs, ARRAY_SIZE(msm_hdmi_configs));
msm_gpiomux_install(msm_mhl_configs, ARRAY_SIZE(msm_mhl_configs));
msm_gpiomux_install_nowrite(msm_lcd_configs,
ARRAY_SIZE(msm_lcd_configs));
msm_gpiomux_install(msm_aud_configs,
ARRAY_SIZE(msm_aud_configs));
msm_gpiomux_install(msm_aud_spk_china_configs, ARRAY_SIZE(msm_aud_spk_china_configs));
msm_gpiomux_install(msm_cir_configs, ARRAY_SIZE(msm_cir_configs));
if (of_machine_pid() == 268 || of_board_is_m8wlj())
msm_gpiomux_install(msm_felica_configs, ARRAY_SIZE(msm_felica_configs));
if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_MDM)
msm_gpiomux_install(mdm_configs,
ARRAY_SIZE(mdm_configs));
msm_gpiomux_install(msm_blsp_rawchip_spi_configs, ARRAY_SIZE(msm_blsp_rawchip_spi_configs));
}
开发者ID:Bdaman80,项目名称:android_kernel_htc_a3ul,代码行数:63,代码来源:board-m8-gpiomux.c
示例10: apq8064_init_gpiomux
void __init apq8064_init_gpiomux(void)
{
int rc;
int platform_version = socinfo_get_platform_version();
rc = msm_gpiomux_init(NR_GPIO_IRQS);
if (rc) {
pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc);
return;
}
#ifdef CONFIG_MMC_MSM_SDC4_SUPPORT
if (system_rev < BOARD_REV09) {
msm_gpiomux_install(sdc4_interface,
ARRAY_SIZE(sdc4_interface));
msm_gpiomux_install(sd_ls_en_60_config,
ARRAY_SIZE(sd_ls_en_60_config));
} else {
msm_gpiomux_install(sdc2_interface,
ARRAY_SIZE(sdc2_interface));
msm_gpiomux_install(sd_ls_en_64_config,
ARRAY_SIZE(sd_ls_en_64_config));
}
#else
msm_gpiomux_install(wcnss_5wire_interface,
ARRAY_SIZE(wcnss_5wire_interface));
#endif
if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
machine_is_mpq8064_dtv()) {
msm_gpiomux_install(mpq8064_gsbi5_i2c_configs,
ARRAY_SIZE(mpq8064_gsbi5_i2c_configs));
#ifdef CONFIG_MSM_VCAP
msm_gpiomux_install(vcap_configs,
ARRAY_SIZE(vcap_configs));
#endif
msm_gpiomux_install(sx150x_int_configs,
ARRAY_SIZE(sx150x_int_configs));
} else {
#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
msm_gpiomux_install(apq8064_ethernet_configs,
ARRAY_SIZE(apq8064_ethernet_configs));
#endif
msm_gpiomux_install(apq8064_gsbi_configs,
ARRAY_SIZE(apq8064_gsbi_configs));
}
msm_gpiomux_install(apq8064_nc_configs,
ARRAY_SIZE(apq8064_nc_configs));
msm_gpiomux_install(sensorhub_configs,
ARRAY_SIZE(sensorhub_configs));
if (system_rev > BOARD_REV11)
msm_gpiomux_install(nfc_firmware_configs,
ARRAY_SIZE(nfc_firmware_configs));
msm_gpiomux_install(apq8064_slimbus_config,
ARRAY_SIZE(apq8064_slimbus_config));
msm_gpiomux_install(apq8064_audio_codec_configs,
ARRAY_SIZE(apq8064_audio_codec_configs));
if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
machine_is_mpq8064_dtv()) {
msm_gpiomux_install(mpq8064_spkr_i2s_config,
ARRAY_SIZE(mpq8064_spkr_i2s_config));
}
pr_debug("%s(): audio-auxpcm: Include GPIO configs"
" as audio is not the primary user"
" for these GPIO Pins\n", __func__);
msm_gpiomux_install(apq8064_auxpcm_configs,
ARRAY_SIZE(apq8064_auxpcm_configs));
if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
machine_is_mpq8064_dtv())
msm_gpiomux_install(mpq8064_mi2s_configs,
ARRAY_SIZE(mpq8064_mi2s_configs));
if (machine_is_apq8064_mtp()|| machine_is_JF()) {
if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_DSDA2) {
msm_gpiomux_install(amdm_configs,
ARRAY_SIZE(amdm_configs));
msm_gpiomux_install(bmdm_configs,
ARRAY_SIZE(bmdm_configs));
} else if (socinfo_get_platform_subtype() ==
PLATFORM_SUBTYPE_SGLTE2) {
msm_gpiomux_install(mdm_configs,
ARRAY_SIZE(mdm_configs));
msm_gpiomux_install(sglte2_qsc_configs,
ARRAY_SIZE(sglte2_qsc_configs));
/* GSBI4 UART GPIOs for Primary IPC */
msm_gpiomux_install(apq8064_uartdm_gsbi4_configs,
ARRAY_SIZE(apq8064_uartdm_gsbi4_configs));
} else if (SOCINFO_VERSION_MINOR(platform_version) == 1) {
msm_gpiomux_install(mdm_i2s_configs,
ARRAY_SIZE(mdm_i2s_configs));
//.........这里部分代码省略.........
开发者ID:Hybridmax,项目名称:I9505_Hybridmax-Stock_Kernel,代码行数:101,代码来源:board-jf_vzw-gpiomux.c
示例11: msm_8974_init_gpiomux
void __init msm_8974_init_gpiomux(void)
{
int rc;
rc = msm_gpiomux_init_dt();
if (rc) {
pr_err("%s failed %d\n", __func__, rc);
return;
}
pr_err("%s:%d socinfo_get_version %x\n", __func__, __LINE__,
socinfo_get_version());
if (socinfo_get_version() >= 0x20000)
msm_tlmm_misc_reg_write(TLMM_SPARE_REG, 0xf);
#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
if (!(of_board_is_dragonboard() && machine_is_apq8074()))
msm_gpiomux_install(msm_eth_configs, \
ARRAY_SIZE(msm_eth_configs));
#endif
msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs));
#if !defined(CONFIG_BT_BCM4335) && !defined(CONFIG_BT_BCM4339)
msm_gpiomux_install(msm_blsp2_uart7_configs,
ARRAY_SIZE(msm_blsp2_uart7_configs));
#endif
#if 0 //defined(CONFIG_BT_BCM4335) || defined(CONFIG_BT_BCM4339)
msm_gpiomux_btuart_install();
#endif
msm_gpiomux_install(msm8974_slimbus_config,
ARRAY_SIZE(msm8974_slimbus_config));
msm_gpiomux_install(msm_touch_configs, ARRAY_SIZE(msm_touch_configs));
#if !defined(CONFIG_SENSORS_SSP)
msm_gpiomux_install(hap_lvl_shft_config,
ARRAY_SIZE(hap_lvl_shft_config));
#endif
msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs));
msm_gpiomux_install(&sd_card_det, 1);
msm_gpiomux_sdc3_install();
msm_gpiomux_sdc4_install();
msm_gpiomux_install(msm_taiko_config, ARRAY_SIZE(msm_taiko_config));
msm_gpiomux_install(fuel_i2c_config, ARRAY_SIZE(fuel_i2c_config));
#if !defined(CONFIG_SENSORS_SSP)
msm_gpiomux_install(msm_hsic_hub_configs,
ARRAY_SIZE(msm_hsic_hub_configs));
#endif
#if defined(CONFIG_SENSORS_SSP)
msm_gpiomux_install(ssp_configs,
ARRAY_SIZE(ssp_configs));
#endif
msm_gpiomux_install(msm_hdmi_configs, ARRAY_SIZE(msm_hdmi_configs));
#if defined(CONFIG_BCM2079X_NFC_I2C) || defined(CONFIG_NFC_PN547)
msm_gpiomux_install(msm_nfc_configs,
ARRAY_SIZE(msm_nfc_configs));
#endif
msm_gpiomux_install(msm8974_pri_pri_auxpcm_configs,
ARRAY_SIZE(msm8974_pri_pri_auxpcm_configs));
#if defined(CONFIG_BCM4335) || defined(CONFIG_BCM4335_MODULE) || defined(CONFIG_BCM4339) || defined(CONFIG_BCM4339_MODULE)
msm_gpiomux_wlan_host_wakeup_install();
#endif /* defined(CONFIG_BCM4335) || defined(CONFIG_BCM4335_MODULE) || defined(CONFIG_BCM4339) || defined(CONFIG_BCM4339_MODULE) */
#if defined(CONFIG_LEDS_AN30259A)
if (system_rev < 7) {
msm_gpiomux_install(an30259a_led_config,
ARRAY_SIZE(an30259a_led_config));
}
else
{
msm_gpiomux_install(an30259a_led_config_rev7,
ARRAY_SIZE(an30259a_led_config_rev7));
}
#endif
msm_gpiomux_install_nowrite(msm_lcd_configs,
ARRAY_SIZE(msm_lcd_configs));
#if !defined(CONFIG_BT_BCM4335) && !defined(CONFIG_BT_BCM4339)
if (of_board_is_rumi())
msm_gpiomux_install(msm_rumi_blsp_configs,
ARRAY_SIZE(msm_rumi_blsp_configs));
#endif
if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_MDM)
msm_gpiomux_install(mdm_configs,
ARRAY_SIZE(mdm_configs));
if (of_board_is_dragonboard() && machine_is_apq8074())
msm_gpiomux_install(apq8074_dragonboard_ts_config,
ARRAY_SIZE(apq8074_dragonboard_ts_config));
#ifdef CONFIG_SENSORS_HALL
//.........这里部分代码省略.........
开发者ID:adis1313,项目名称:android_kernel_samsung_msm8974,代码行数:101,代码来源:board-8974-sec-ks01-gpiomux.c
示例12: apq8064_init_gpiomux
void __init apq8064_init_gpiomux(void)
{
int rc;
rc = msm_gpiomux_init(NR_GPIO_IRQS);
if (rc) {
pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc);
return;
}
#ifdef CONFIG_SWITCH_MAX1462X
msm_gpiomux_install(apq8064_earjack_configs,
ARRAY_SIZE(apq8064_earjack_configs));
#endif
#ifndef CONFIG_MMC_MSM_SDC4_SUPPORT
msm_gpiomux_install(wcnss_5wire_interface,
ARRAY_SIZE(wcnss_5wire_interface));
#endif
if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
machine_is_mpq8064_dtv()) {
#ifdef CONFIG_MSM_VCAP
msm_gpiomux_install(vcap_configs,
ARRAY_SIZE(vcap_configs));
#endif
msm_gpiomux_install(sx150x_int_configs,
ARRAY_SIZE(sx150x_int_configs));
} else {
#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
msm_gpiomux_install(apq8064_ethernet_configs,
ARRAY_SIZE(apq8064_ethernet_configs));
#endif
msm_gpiomux_install(apq8064_gsbi_configs,
ARRAY_SIZE(apq8064_gsbi_configs));
}
msm_gpiomux_install(apq8064_slimbus_config,
ARRAY_SIZE(apq8064_slimbus_config));
#if defined(CONFIG_ANDROID_IRRC)
msm_gpiomux_install(apq8064_irrc_tx_configs,
ARRAY_SIZE(apq8064_irrc_tx_configs));
#endif
#ifdef CONFIG_SND_SOC_TPA2028D_DUAL_SPEAKER
msm_gpiomux_install(apq8064_gsbi7_i2c_8ma_configs,
ARRAY_SIZE(apq8064_gsbi7_i2c_8ma_configs));
#endif
msm_gpiomux_install(apq8064_audio_codec_configs,
ARRAY_SIZE(apq8064_audio_codec_configs));
if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
machine_is_mpq8064_dtv()) {
msm_gpiomux_install(mpq8064_spkr_i2s_config,
ARRAY_SIZE(mpq8064_spkr_i2s_config));
}
pr_debug("%s(): audio-auxpcm: Include GPIO configs"
" as audio is not the primary user"
" for these GPIO Pins\n", __func__);
#if defined(CONFIG_MODEM_SUPPORT)
if (machine_is_apq8064_mtp()) {
if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_DSDA2) {
msm_gpiomux_install(amdm_configs,
ARRAY_SIZE(amdm_configs));
msm_gpiomux_install(bmdm_configs,
ARRAY_SIZE(bmdm_configs));
} else if (SOCINFO_VERSION_MINOR(platform_version) == 1)
msm_gpiomux_install(mdm_i2s_configs,
ARRAY_SIZE(mdm_i2s_configs));
else
msm_gpiomux_install(mdm_configs,
ARRAY_SIZE(mdm_configs));
}
#endif
#ifdef CONFIG_USB_EHCI_MSM_HSIC
if (machine_is_apq8064_mtp()) {
if (SOCINFO_VERSION_MINOR(platform_version) == 1) {
msm_gpiomux_install(cyts_gpio_alt_config,
ARRAY_SIZE(cyts_gpio_alt_config));
} else {
msm_gpiomux_install(cyts_gpio_configs,
ARRAY_SIZE(cyts_gpio_configs));
}
}
if (machine_is_apq8064_mtp())
msm_gpiomux_install(apq8064_hsic_configs,
ARRAY_SIZE(apq8064_hsic_configs));
#endif
if (machine_is_apq8064_cdp() || machine_is_apq8064_liquid())
msm_gpiomux_install(apq8064_mxt_configs,
ARRAY_SIZE(apq8064_mxt_configs));
msm_gpiomux_install(apq8064_hdmi_configs,
ARRAY_SIZE(apq8064_hdmi_configs));
#if defined (CONFIG_SLIMPORT_ANX7808)
//.........这里部分代码省略.........
开发者ID:jonacx,项目名称:cyanogenmod12,代码行数:101,代码来源:board-palman-gpiomux.c
示例13: msm_8974_init_gpiomux
//.........这里部分代码省略.........
#endif
#if defined(CONFIG_MACH_KS01SKT) || defined(CONFIG_MACH_KS01KTT)\
|| defined(CONFIG_MACH_KS01LGT) && defined(CONFIG_BT_BCM4335)
msm_gpiomux_btuart_install();
#endif
msm_gpiomux_install(msm8974_slimbus_config,
ARRAY_SIZE(msm8974_slimbus_config));
msm_gpiomux_install(msm_touch_configs, ARRAY_SIZE(msm_touch_configs));
#if !defined(CONFIG_SENSORS_SSP)
msm_gpiomux_install(hap_lvl_shft_config,
ARRAY_SIZE(hap_lvl_shft_config));
#endif
msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs));
#ifdef CONFIG_MACH_KS01
msm_gpiomux_install(&sd_card_det, 1);
if(system_rev < 3)
msm_gpiomux_install(wcnss_5wire_interface,
ARRAY_SIZE(wcnss_5wire_interface));
else
msm_gpiomux_sdc3_install();
#else
msm_gpiomux_sdc3_install();
#endif
msm_gpiomux_sdc4_install();
msm_gpiomux_install(msm_taiko_config, ARRAY_SIZE(msm_taiko_config));
#if !defined(CONFIG_SENSORS_SSP)
msm_gpiomux_install(msm_hsic_hub_configs,
ARRAY_SIZE(msm_hsic_hub_configs));
#endif
#if defined(CONFIG_SENSORS_SSP)
msm_gpiomux_install(ssp_configs,
ARRAY_SIZE(ssp_configs));
#endif
msm_gpiomux_install(msm_hdmi_configs, ARRAY_SIZE(msm_hdmi_configs));
#if defined(CONFIG_BCM2079X_NFC_I2C)
msm_gpiomux_install(msm_nfc_configs,
ARRAY_SIZE(msm_nfc_configs));
#endif
#if defined(CONFIG_BCM4335) || defined(CONFIG_BCM4335_MODULE)
msm_gpiomux_wlan_host_wakeup_install();
#endif /* defined(CONFIG_BCM4335) || defined(CONFIG_BCM4335_MODULE) */
#if defined(CONFIG_LEDS_AN30259A)
#if defined(CONFIG_MACH_KS01SKT) || defined(CONFIG_MACH_KS01KTT)\
|| defined(CONFIG_MACH_KS01LGT)
if (system_rev < 7) {
msm_gpiomux_install(an30259a_led_config,
ARRAY_SIZE(an30259a_led_config));
}
else
{
msm_gpiomux_install(an30259a_led_config_rev7,
ARRAY_SIZE(an30259a_led_config_rev7));
}
#else
msm_gpiomux_install(an30259a_led_config,
ARRAY_SIZE(an30259a_led_config));
#endif
#endif
msm_gpiomux_install(msm8974_pri_auxpcm_configs,
ARRAY_SIZE(msm8974_pri_auxpcm_configs));
if (of_board_is_rumi())
msm_gpiomux_install(msm_rumi_blsp_configs,
ARRAY_SIZE(msm_rumi_blsp_configs));
if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_MDM)
msm_gpiomux_install(mdm_configs,
ARRAY_SIZE(mdm_configs));
if (of_board_is_dragonboard() && machine_is_apq8074())
msm_gpiomux_install(apq8074_dragonboard_ts_config,
ARRAY_SIZE(apq8074_dragonboard_ts_config));
#ifdef CONFIG_SENSORS_HALL
msm_gpiomux_install(msm8974_hall_configs, ARRAY_SIZE(msm8974_hall_configs));
#endif
#ifdef CONFIG_KEYBOARD_CYPRESS_TOUCH
msm_gpiomux_install(cypress_touch_configs, ARRAY_SIZE(cypress_touch_configs));
#endif
msm_gpiomux_install(fpga_tflash, ARRAY_SIZE(fpga_tflash));
msm_gpiomux_install(nc_configs,
ARRAY_SIZE(nc_configs));
}
开发者ID:Hypercore,项目名称:leanKernel-note3,代码行数:101,代码来源:board-8974-sec-j-gpiomux.c
示例14: msm8930_audrx_init
static int msm8930_audrx_init(struct snd_soc_pcm_runtime *rtd)
{
int err, ret;
struct snd_soc_codec *codec = rtd->codec;
struct snd_soc_dapm_context *dapm = &codec->dapm;
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
pr_debug("%s()\n", __func__);
snd_soc_dapm_new_controls(dapm, msm8930_dapm_widgets,
ARRAY_SIZE(msm8930_dapm_widgets));
if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE)
snd_soc_dapm_add_routes(dapm, common_audio_map_sglte,
ARRAY_SIZE(common_audio_map_sglte));
else
snd_soc_dapm_add_routes(dapm, common_audio_map,
ARRAY_SIZE(common_audio_map));
snd_soc_dapm_enable_pin(dapm, "Ext Spk Left Pos");
snd_soc_dapm_enable_pin(dapm, "Ext Spk Left Neg");
snd_soc_dapm_sync(dapm);
err = snd_soc_jack_new(codec, "Headset Jack",
MSM8930_JACK_TYPES,
&hs_jack);
if (err) {
pr_err("failed to create new jack\n");
return err;
}
err = snd_soc_jack_new(codec, "Button Jack",
SITAR_JACK_BUTTON_MASK, &button_jack);
if (err) {
pr_err("failed to create new jack\n");
return err;
}
ret = snd_jack_set_key(button_jack.jack,
SND_JACK_BTN_0,
KEY_MEDIA);
if (ret) {
pr_err("%s: Failed to set code for btn-0\n", __func__);
return err;
}
codec_clk = clk_get(cpu_dai->dev, "osr_clk");
/*
* Switch is present only in 8930 CDP and SGLTE
*/
if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE ||
machine_is_msm8930_cdp())
mbhc_cfg.swap_gnd_mic = msm8930_swap_gnd_mic;
if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE) {
mbhc_cfg.gpio = GPIO_HS_DET_SGLTE;
mbhc_cfg.gpio_level_insert = 0;
} else
mbhc_cfg.gpio = GPIO_HS_DET;
/*
* GPIO for headset detect is present in all devices
* MTP/Fluid/CDP/SGLTE
*/
err = gpio_request(mbhc_cfg.gpio, "HEADSET_DETECT");
if (err) {
pr_err("%s: Failed to request gpio %d\n",
__func__, mbhc_cfg.gpio);
return err;
}
mbhc_cfg.gpio_irq = gpio_to_irq(mbhc_cfg.gpio);
sitar_hs_detect(codec, &mbhc_cfg);
if (socinfo_get_pmic_model() != PMIC_MODEL_PM8917) {
/* Initialize default PMIC speaker gain */
pm8xxx_spk_gain(DEFAULT_PMIC_SPK_GAIN);
}
return 0;
}
开发者ID:rspousta,项目名称:sony_xperia_m,代码行数:83,代码来源:msm8930.c
示例15: smd_tty_init
static int __init smd_tty_init(void)
{
int ret;
int n;
int idx;
smd_tty_driver = alloc_tty_driver(MAX_SMD_TTYS);
if (smd_tty_driver == 0)
return -ENOMEM;
smd_tty_driver->owner = THIS_MODULE;
smd_tty_driver->driver_name = "smd_tty_driver";
smd_tty_driver->name = "smd";
smd_tty_driver->major = 0;
smd_tty_driver->minor_start = 0;
smd_tty_driver->type = TTY_DRIVER_TYPE_SERIAL;
smd_tty_driver->subtype = SERIAL_TYPE_NORMAL;
smd_tty_driver->init_termios = tty_std_termios;
smd_tty_driver->init_termios.c_iflag = 0;
smd_tty_driver->init_termios.c_oflag = 0;
smd_tty_driver->init_termios.c_cflag = B38400 | CS8 | CREAD;
smd_tty_driver->init_termios.c_lflag = 0;
smd_tty_driver->flags = TTY_DRIVER_RESET_TERMIOS |
TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
tty_set_operations(smd_tty_driver, &smd_tty_ops);
ret = tty_register_driver(smd_tty_driver);
if (ret) {
put_tty_driver(smd_tty_driver);
pr_err("%s: driver registration failed %d\n", __func__, ret);
return ret;
}
for (n = 0; n < ARRAY_SIZE(smd_configs); ++n) {
idx = smd_configs[n].tty_dev_index;
if (smd_configs[n].dev_name == NULL)
smd_configs[n].dev_name = smd_configs[n].port_name;
if (idx == DS_IDX) {
/*
* DS port uses the kernel API starting with
* 8660 Fusion. Only register the userspace
* platform device for older targets.
*/
int legacy_ds = 0;
legacy_ds |= cpu_is_msm7x01() || cpu_is_msm7x25();
legacy_ds |= cpu_is_msm7x27() || cpu_is_msm7x30();
legacy_ds |= cpu_is_qsd8x50() || cpu_is_msm8x55();
/*
* use legacy mode for 8660 Standalone (subtype 0)
*/
legacy_ds |= cpu_is_msm8x60() &&
(socinfo_get_platform_subtype() == 0x0);
if (!legacy_ds)
continue;
}
tty_register_device(smd_tty_driver, idx, 0);
init_completion(&smd_tty[idx].ch_allocated);
/* register platform device */
smd_tty[idx].driver.probe = smd_tty_dummy_probe;
smd_tty[idx].driver.driver.name = smd_configs[n].dev_name;
smd_tty[idx].driver.driver.owner = THIS_MODULE;
spin_lock_init(&smd_tty[idx].reset_lock);
smd_tty[idx].is_open = 0;
init_waitqueue_head(&smd_tty[idx].ch_opened_wait_queue);
ret = platform_driver_register(&smd_tty[idx].driver);
if (ret) {
pr_err("%s: init failed %d (%d)\n", __func__, idx, ret);
smd_tty[idx].driver.probe = NULL;
goto out;
}
smd_tty[idx].smd = &smd_configs[n];
}
INIT_DELAYED_WORK(&loopback_work, loopback_probe_worker);
return 0;
out:
/* unregister platform devices */
for (n = 0; n < ARRAY_SIZE(smd_configs); ++n) {
idx = smd_configs[n].tty_dev_index;
if (smd_tty[idx].driver.probe) {
platform_driver_unregister(&smd_tty[idx].driver);
tty_unregister_device(smd_tty_driver, idx);
}
}
tty_unregister_driver(smd_tty_driver);
put_tty_driver(smd_tty_driver);
return ret;
}
开发者ID:NooNameR,项目名称:QSD3.0,代码行数:97,代码来源:smd_tty.c
示例16: msm8930_configure_headset_mic_gpios
/* ZTE_Audio_LCX_130325, lichaoxia, 2013-03-25, end */
static int msm8930_configure_headset_mic_gpios(void)
{
int ret;
/* ZTE_Audio_LCX_130325, lichaoxia, 2013-03-25, start */
#if defined(CONFIG_US_EURO_SWITCH)
struct pm_gpio param = {
.direction = PM_GPIO_DIR_OUT,
.output_buffer = PM_GPIO_OUT_BUF_CMOS,
.output_value = 1,
.pull = PM_GPIO_PULL_NO,
.vin_sel = PM_GPIO_VIN_S4,
.out_strength = PM_GPIO_STRENGTH_MED,
.function = PM_GPIO_FUNC_NORMAL,
};
ret = gpio_request(us_euro_sel_gpio, "US_EURO_SWITCH");
if (ret) {
pr_err("%s: Failed to request gpio %d\n", __func__,
us_euro_sel_gpio);
return ret;
}
ret = pm8xxx_gpio_config(us_euro_sel_gpio, ¶m);
if (ret)
pr_err("%s: Failed to configure gpio %d\n", __func__,
us_euro_sel_gpio);
else
gpio_direction_output(us_euro_sel_gpio, 0);
#else
if (!us_euro_gpio)
return 0;
ret = gpio_request(80, "US_EURO_SWITCH");
if (ret) {
pr_err("%s: Failed to request gpio 80\n", __func__);
return ret;
}
ret = gpio_direction_output(80, 0);
if (ret) {
pr_err("%s: Unable to set direction\n", __func__);
gpio_free(80);
return ret;
}
#endif
/* ZTE_Audio_LCX_130325, lichaoxia, 2013-03-25, end */
msm8930_useuro_gpio_requested = 1;
return 0;
}
static void msm8930_free_headset_mic_gpios(void)
{
if (msm8930_useuro_gpio_requested) {
/* ZTE_Audio_LCX_130325, lichaoxia, 2013-03-25, start */
#if defined(CONFIG_US_EURO_SWITCH)
gpio_free(us_euro_sel_gpio);
#else
gpio_free(80);
#endif
/* ZTE_Audio_LCX_130325, lichaoxia, 2013-03-25, end */
msm8930_useuro_gpio_requested = 0;
}
}
static int __init msm8930_audio_init(void)
{
int ret;
if (!soc_class_is_msm8930()) {
pr_err("%s: Not the right machine type\n", __func__);
return -ENODEV ;
}
mbhc_cfg.calibration = def_sitar_mbhc_cal();
if (!mbhc_cfg.calibration) {
pr_err("Calibration data allocation failed\n");
return -ENOMEM;
}
msm8930_snd_device = platform_device_alloc("soc-audio", 0);
if (!msm8930_snd_device) {
pr_err("Platform device allocation failed\n");
kfree(mbhc_cfg.calibration);
return -ENOMEM;
}
platform_set_drvdata(msm8930_snd_device, &snd_soc_card_msm8930);
ret = platform_device_add(msm8930_snd_device);
if (ret) {
platform_device_put(msm8930_snd_device);
kfree(mbhc_cfg.calibration);
return ret;
}
if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE)
us_euro_gpio = GPIO_HS_US_EURO_SEL_GPIO_SGLTE;
else
us_euro_gpio = GPIO_HS_US_EURO_SEL_GPIO;
if (msm8930_configure_headset_mic_gpios())
pr_err("%s Fail to configure headset mic gpios\n", __func__);
//.........这里部分代码省略.........
开发者ID:phenomx4,项目名称:android_kernel_n9510_n9520,代码行数:101,代码来源:msm8930.c
示例17: smd_tty_init
static int __init smd_tty_init(void)
{
int ret;
int n;
int idx;
smd_tty_driver = alloc_tty_driver(MAX_SMD_TTYS);
if (smd_tty_driver == 0)
return -ENOMEM;
smd_tty_driver->owner = THIS_MODULE;
smd_tty_driver->driver_name = "smd_tty_driver";
smd_tty_driver->name = "smd";
smd_tty_driver->major = 0;
smd_tty_driver->minor_start = 0;
smd_tty_driver->type = TTY_DRIVER_TYPE_SERIAL;
smd_tty_driver->subtype = SERIAL_TYPE_NORMAL;
smd_tty_driver->init_termios = tty_std_termios;
smd_tty_driver->init_termios.c_iflag = 0;
smd_tty_driver->init_termios.c_oflag = 0;
smd_tty_driver->init_termios.c_cflag = B38400 | CS8 | CREAD;
smd_tty_driver->init_termios.c_lflag = 0;
smd_tty_driver->flags = TTY_DRIVER_RESET_TERMIOS |
TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
tty_set_operations(smd_tty_driver, &smd_tty_ops);
ret = tty_register_driver(smd_tty_driver);
if (ret) {
put_tty_driver(smd_tty_driver);
pr_err("%s: driver registration failed %d\n", __func__, ret);
return ret;
}
for (n = 0; n < ARRAY_SIZE(smd_configs); ++n) {
idx = smd_configs[n].tty_dev_index;
if (smd_configs[n].dev_name == NULL)
smd_configs[n].dev_name = smd_configs[n].port_name;
if (idx == DS_IDX) {
int legacy_ds = 0;
legacy_ds |= cpu_is_msm7x01() || cpu_is_msm7x25();
legacy_ds |= cpu_is_msm7x27() || cpu_is_msm7x30();
legacy_ds |= cpu_is_qsd8x50() || cpu_is_msm8x55();
legacy_ds |= (cpu_is_msm8960() || cpu_is_msm8930() || cpu_is_msm8930aa()) && (board_mfg_mode() == 8);
legacy_ds |= cpu_is_msm8x60() &&
(socinfo_get_platform_subtype() == 0x0);
#ifdef CONFIG_MACH_DUMMY
legacy_ds = 1;
#endif
if (!legacy_ds)
continue;
}
tty_register_device(smd_tty_driver, idx, 0);
init_completion(&smd_tty[idx].ch_allocated);
smd_tty[idx].driver.probe = smd_tty_dummy_probe;
smd_tty[idx].driver.driver.name = smd_configs[n].dev_name;
smd_tty[idx].driver.driver.owner = THIS_MODULE;
spin_lock_init(&smd_tty[idx].reset_lock);
smd_tty[idx].is_open = 0;
setup_timer(&smd_tty[idx].buf_req_timer, buf_req_retry,
(unsigned long)&smd_tty[idx]);
init_waitqueue_head(&smd_tty[idx].ch_opened_wait_queue);
ret = platform_driver_register(&smd_tty[idx].driver);
if (ret) {
pr_err("%s: init failed %d (%d)\n", __func__, idx, ret);
smd_tty[idx].driver.probe = NULL;
goto out;
}
smd_tty[idx].smd = &smd_configs[n];
}
INIT_DELAYED_WORK(&loopback_work, loopback_probe_worker);
return 0;
out:
for (n = 0; n < ARRAY_SIZE(smd_configs); ++n) {
idx = smd_configs[n].tty_dev_index;
if (smd_tty[idx].driver.probe) {
platform_driver_unregister(&smd_tty[idx].driver);
tty_unregister_device(smd_tty_driver, idx);
}
}
tty_unregister_driver(smd_tty_driver);
put_tty_driver(smd_tty_driver);
return ret;
}
开发者ID:JmzTaylor,项目名称:Evita-Jellybean,代码行数:95,代码来源:smd_tty.c
-
六六分期app的软件客服如何联系?不知道吗?加qq群【895510560】即可!标题:六六分期
阅读:19128|2023-10-27
-
今天小编告诉大家如何处理win10系统火狐flash插件总是崩溃的问题,可能很多用户都不知
阅读:9971|2022-11-06
-
今天小编告诉大家如何对win10系统删除桌面回收站图标进行设置,可能很多用户都不知道
阅读:8317|2022-11-06
-
今天小编告诉大家如何对win10系统电脑设置节能降温的设置方法,想必大家都遇到过需要
阅读:8686|2022-11-06
-
我们在使用xp系统的过程中,经常需要对xp系统无线网络安装向导设置进行设置,可能很多
阅读:8626|2022-11-06
-
今天小编告诉大家如何处理win7系统玩cf老是与主机连接不稳定的问题,可能很多用户都不
阅读:9643|2022-11-06
-
电脑对日常生活的重要性小编就不多说了,可是一旦碰到win7系统设置cf烟雾头的问题,很
阅读:8611|2022-11-06
-
我们在日常使用电脑的时候,有的小伙伴们可能在打开应用的时候会遇见提示应用程序无法
阅读:7991|2022-11-06
-
今天小编告诉大家如何对win7系统打开vcf文件进行设置,可能很多用户都不知道怎么对win
阅读:8641|2022-11-06
-
今天小编告诉大家如何对win10系统s4开启USB调试模式进行设置,可能很多用户都不知道怎
阅读:7527|2022-11-06
|
请发表评论