void __init msm_8974_moto_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)); if (of_board_is_liquid()) msm_gpiomux_install_nowrite(ath_gpio_configs, ARRAY_SIZE(ath_gpio_configs)); 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_blsp12_fps_spi_configs, ARRAY_SIZE(msm_blsp12_fps_spi_configs)); msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs)); msm_gpiomux_sdc3_install(); msm_gpiomux_sdc4_install(); msm_gpiomux_install(msm_taiko_config, ARRAY_SIZE(msm_taiko_config)); msm_gpiomux_install(stm401_configs, ARRAY_SIZE(stm401_configs)); if (of_board_is_fluid()) msm_gpiomux_install(msm_mhl_configs, ARRAY_SIZE(msm_mhl_configs)); msm_gpiomux_install(c55_i2s_configs, ARRAY_SIZE(c55_i2s_configs)); msm_gpiomux_install(msm_lcd_configs, ARRAY_SIZE(msm_lcd_configs)); if (of_board_is_rumi()) msm_gpiomux_install(msm_rumi_blsp_configs, ARRAY_SIZE(msm_rumi_blsp_configs)); msm_gpiomux_install(&vib_en_gpio, 1); msm_gpiomux_install(c55_configs, ARRAY_SIZE(c55_configs)); msm_gpiomux_install(cycapsence_issp_gpio_configs, ARRAY_SIZE(cycapsence_issp_gpio_configs)); msm_gpiomux_install(wm5110_spi_configs, ARRAY_SIZE(wm5110_spi_configs)); }
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)); #ifdef CONFIG_MFD_MAX77888 #if 0 // MCU Pin msm_gpiomux_install(msm8974_muic_configs, ARRAY_SIZE(msm8974_muic_configs)); #endif #endif #ifdef CONFIG_W1_SLAVE_DS28EL15 msm_gpiomux_install(msm8974_cover_id_config, ARRAY_SIZE(msm8974_cover_id_config)); #endif #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 if (of_board_is_liquid()) msm_gpiomux_install_nowrite(ath_gpio_configs, ARRAY_SIZE(ath_gpio_configs)); msm_gpiomux_install(msm8974_slimbus_config, ARRAY_SIZE(msm8974_slimbus_config)); msm_gpiomux_install(hw_rev_configs, ARRAY_SIZE(hw_rev_configs)); msm_gpiomux_install(gpio_nc_configs, ARRAY_SIZE(gpio_nc_configs)); #if 0//!defined(CONFIG_SENSORS_SSP) msm_gpiomux_install(hap_lvl_shft_config, ARRAY_SIZE(hap_lvl_shft_config)); #endif if (of_board_is_dragonboard() && machine_is_apq8074()) msm_gpiomux_install(msm_sensor_configs_dragonboard, \ ARRAY_SIZE(msm_sensor_configs_dragonboard)); else msm_gpiomux_install(msm_sensor_configs, \ ARRAY_SIZE(msm_sensor_configs)); msm_gpiomux_install(&sd_card_det, 1); msm_gpiomux_sdc3_install(); if (!(of_board_is_dragonboard() && machine_is_apq8074())) msm_gpiomux_sdc4_install(); msm_gpiomux_install(msm_taiko_config, ARRAY_SIZE(msm_taiko_config)); msm_gpiomux_install(es325_config, ARRAY_SIZE(es325_config)); msm_gpiomux_install(msm8974_audio_configs, ARRAY_SIZE(msm8974_audio_configs)); msm_gpiomux_install(msm8974_pri_pri_auxpcm_configs, ARRAY_SIZE(msm8974_pri_pri_auxpcm_configs)); #if 0 // MCU pin 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 #if defined(CONFIG_SENSORS) msm_gpiomux_install(msm_sensors_configs, ARRAY_SIZE(msm_sensors_configs)); #endif msm_gpiomux_install(msm_hdmi_configs, ARRAY_SIZE(msm_hdmi_configs)); if (system_rev > 5) msm_gpiomux_install(msm_hdmi_ddc_configs, ARRAY_SIZE(msm_hdmi_ddc_configs)); #ifdef CONFIG_VIDEO_MHL_V2 if(system_rev > 1) msm_gpiomux_install(mhl_configs, ARRAY_SIZE(mhl_configs)); #endif #if 0 msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); #endif #if defined(CONFIG_SEC_NFC_I2C) || defined(CONFIG_NFC_PN547) msm_gpiomux_install(msm_nfc_configs, ARRAY_SIZE(msm_nfc_configs)); #endif if (of_board_is_liquid() || (of_board_is_dragonboard() && machine_is_apq8074())) msm_gpiomux_install(msm8974_pri_ter_auxpcm_configs, ARRAY_SIZE(msm8974_pri_ter_auxpcm_configs)); else 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) */ #ifdef CONFIG_USB_SWITCH_FSA9485 if (system_rev >= 10) msm_gpiomux_install(vienna_r10_muic_configs, ARRAY_SIZE(vienna_r10_muic_configs)); else msm_gpiomux_install(vienna_muic_configs, ARRAY_SIZE(vienna_muic_configs)); #endif if (of_board_is_cdp()) { #if 0 /* Not used at Mondrian */ msm_gpiomux_install(msm8974_sec_auxpcm_configs, ARRAY_SIZE(msm8974_sec_auxpcm_configs)); #endif } else if (of_board_is_liquid() || of_board_is_fluid() || of_board_is_mtp()) msm_gpiomux_install(msm_epm_configs, ARRAY_SIZE(msm_epm_configs)); 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 defined(CONFIG_LEDS_AN30259A) msm_gpiomux_install(an30259a_led_config, ARRAY_SIZE(an30259a_led_config)); #endif #ifdef CONFIG_INPUT_WACOM_HL msm_gpiomux_install(msm8974_wacom_configs, ARRAY_SIZE(msm8974_wacom_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)); }
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; } #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(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); if (of_board_is_liquid()) msm_gpiomux_install_nowrite(ath_gpio_configs, ARRAY_SIZE(ath_gpio_configs)); 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(hap_lvl_shft_config, ARRAY_SIZE(hap_lvl_shft_config)); 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(msm_hsic_configs, ARRAY_SIZE(msm_hsic_configs)); msm_gpiomux_install(msm_hsic_hub_configs, ARRAY_SIZE(msm_hsic_hub_configs)); msm_gpiomux_install(msm_hdmi_configs, ARRAY_SIZE(msm_hdmi_configs)); if (of_board_is_fluid()) msm_gpiomux_install(msm_mhl_configs, ARRAY_SIZE(msm_mhl_configs)); if (of_board_is_liquid()) msm_gpiomux_install(msm8974_pri_ter_auxpcm_configs, ARRAY_SIZE(msm8974_pri_ter_auxpcm_configs)); else msm_gpiomux_install(msm8974_pri_pri_auxpcm_configs, ARRAY_SIZE(msm8974_pri_pri_auxpcm_configs)); msm_gpiomux_install(msm8974_sec_auxpcm_configs, ARRAY_SIZE(msm8974_sec_auxpcm_configs)); msm_gpiomux_install_nowrite(msm_lcd_configs, ARRAY_SIZE(msm_lcd_configs)); if (of_board_is_rumi()) msm_gpiomux_install(msm_rumi_blsp_configs, ARRAY_SIZE(msm_rumi_blsp_configs)); }
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; } #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_BCM4354) msm_gpiomux_install(msm_blsp2_uart7_configs, ARRAY_SIZE(msm_blsp2_uart7_configs)); #endif #if defined(CONFIG_BT_BCM4354) msm_gpiomux_btuart_install(); #endif #if defined(CONFIG_WCNSS_CORE) msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); #endif if (of_board_is_liquid()) msm_gpiomux_install_nowrite(ath_gpio_configs, ARRAY_SIZE(ath_gpio_configs)); msm_gpiomux_install(msm8974_slimbus_config, ARRAY_SIZE(msm8974_slimbus_config)); if (system_rev >= 4) msm_gpiomux_install(es705_config, ARRAY_SIZE(es705_config)); msm_gpiomux_install(msm_touch_configs, ARRAY_SIZE(msm_touch_configs)); msm_gpiomux_install(hap_lvl_shft_config, ARRAY_SIZE(hap_lvl_shft_config)); if (of_board_is_dragonboard() && machine_is_apq8074()) msm_gpiomux_install(msm_sensor_configs_dragonboard, \ ARRAY_SIZE(msm_sensor_configs_dragonboard)); else msm_gpiomux_install(msm_sensor_configs, \ ARRAY_SIZE(msm_sensor_configs)); msm_gpiomux_install(&sd_card_det, 1); if (machine_is_apq8074() && (of_board_is_liquid() || \ of_board_is_dragonboard())) msm_gpiomux_sdc3_install(); #if !defined(CONFIG_WCNSS_CORE) msm_gpiomux_sdc3_install(); #endif if (!(of_board_is_dragonboard() && machine_is_apq8074())) msm_gpiomux_sdc4_install(); msm_gpiomux_install(msm_taiko_config, ARRAY_SIZE(msm_taiko_config)); if (system_rev < 4) msm_gpiomux_install(msm_es705_config, ARRAY_SIZE(msm_es705_config)); #if !defined(CONFIG_TDMB) msm_gpiomux_install(msm_hsic_hub_configs, ARRAY_SIZE(msm_hsic_hub_configs)); #endif #ifdef CONFIG_GPIO_MC5587 msm_gpiomux_install(msm8974_gpioexpander_configs, ARRAY_SIZE(msm8974_gpioexpander_configs)); #endif msm_gpiomux_install(msm_hdmi_configs, ARRAY_SIZE(msm_hdmi_configs)); #ifdef CONFIG_VIDEO_MHL_V2 msm_gpiomux_install(mhl_configs, ARRAY_SIZE(mhl_configs)); #endif #ifdef CONFIG_FB_MSM_MDSS_HDMI_MHL_SII8334 if (of_board_is_fluid()) msm_gpiomux_install(msm_mhl_configs, ARRAY_SIZE(msm_mhl_configs)); #endif if (of_board_is_liquid() || (of_board_is_dragonboard() && machine_is_apq8074())) msm_gpiomux_install(msm8974_pri_ter_auxpcm_configs, ARRAY_SIZE(msm8974_pri_ter_auxpcm_configs)); else msm_gpiomux_install(msm8974_pri_pri_auxpcm_configs, ARRAY_SIZE(msm8974_pri_pri_auxpcm_configs)); if (of_board_is_cdp()) msm_gpiomux_install(msm8974_sec_auxpcm_configs, ARRAY_SIZE(msm8974_sec_auxpcm_configs)); else if (of_board_is_liquid() || of_board_is_fluid() || of_board_is_mtp()) msm_gpiomux_install(msm_epm_configs, ARRAY_SIZE(msm_epm_configs)); msm_gpiomux_install_nowrite(msm_lcd_configs, ARRAY_SIZE(msm_lcd_configs)); #if !defined(CONFIG_BT_BCM4354) 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)); msm_gpiomux_install(fuel_i2c_config, ARRAY_SIZE(fuel_i2c_config)); #if defined(CONFIG_SENSORS_SSP) msm_gpiomux_install(ssp_configs, ARRAY_SIZE(ssp_configs)); #endif #ifdef CONFIG_SENSORS_VFS61XX msm_gpiomux_install(msm8974_fingerprint_configs, ARRAY_SIZE(msm8974_fingerprint_configs)); #endif #if defined(CONFIG_NFC_PN547) || defined(CONFIG_BCM2079X_NFC_I2C) msm_gpiomux_install(msm_nfc_configs, ARRAY_SIZE(msm_nfc_configs)); #endif msm_gpiomux_install(msm_cis_spi_configs, ARRAY_SIZE(msm_cis_spi_configs)); msm_gpiomux_install(msm_af_configs, ARRAY_SIZE(msm_af_configs)); msm_gpiomux_install(gpio_nc_configs, ARRAY_SIZE(gpio_nc_configs)); }
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_debug("%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)); msm_gpiomux_install(msm_blsp2_uart7_configs, ARRAY_SIZE(msm_blsp2_uart7_configs)); msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); if (of_board_is_liquid()) msm_gpiomux_install_nowrite(ath_gpio_configs, ARRAY_SIZE(ath_gpio_configs)); msm_gpiomux_install(msm8974_slimbus_config, ARRAY_SIZE(msm8974_slimbus_config)); msm_gpiomux_install(msm_touch_configs, ARRAY_SIZE(msm_touch_configs)); if (of_board_is_liquid()) msm_gpiomux_install(msm_touch_i2cmode_configs, ARRAY_SIZE(msm_touch_i2cmode_configs)); msm_gpiomux_install(hap_lvl_shft_config, ARRAY_SIZE(hap_lvl_shft_config)); if (of_board_is_dragonboard() && machine_is_apq8074()) msm_gpiomux_install(msm_sensor_configs_dragonboard, \ ARRAY_SIZE(msm_sensor_configs_dragonboard)); else msm_gpiomux_install(msm_sensor_configs, \ ARRAY_SIZE(msm_sensor_configs)); msm_gpiomux_install(&sd_card_det, 1); if (machine_is_apq8074() && (of_board_is_liquid() || \ of_board_is_dragonboard())) msm_gpiomux_sdc3_install(); if (!(of_board_is_dragonboard() && machine_is_apq8074())) 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_hsic_hub_configs, ARRAY_SIZE(msm_hsic_hub_configs)); msm_gpiomux_install(msm_hdmi_configs, ARRAY_SIZE(msm_hdmi_configs)); if (of_board_is_fluid()) msm_gpiomux_install(msm_mhl_configs, ARRAY_SIZE(msm_mhl_configs)); if (of_board_is_liquid() || (of_board_is_dragonboard() && machine_is_apq8074())) msm_gpiomux_install(msm8974_pri_ter_auxpcm_configs, ARRAY_SIZE(msm8974_pri_ter_auxpcm_configs)); else msm_gpiomux_install(msm8974_pri_pri_auxpcm_configs, ARRAY_SIZE(msm8974_pri_pri_auxpcm_configs)); if (of_board_is_cdp()) msm_gpiomux_install(msm8974_sec_auxpcm_configs, ARRAY_SIZE(msm8974_sec_auxpcm_configs)); else if (of_board_is_liquid() || of_board_is_fluid() || of_board_is_mtp()) msm_gpiomux_install(msm_epm_configs, ARRAY_SIZE(msm_epm_configs)); msm_gpiomux_install_nowrite(msm_lcd_configs, ARRAY_SIZE(msm_lcd_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)); if ((socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_INTERPOSERV3) && of_board_is_cdp()) msm_gpiomux_install(apq8074_interposer_config, ARRAY_SIZE(apq8074_interposer_config)); }
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; } #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)); #ifndef CONFIG_MACH_LGE msm_gpiomux_install(msm_blsp2_uart7_configs, ARRAY_SIZE(msm_blsp2_uart7_configs)); #endif 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(hap_lvl_shft_config, ARRAY_SIZE(hap_lvl_shft_config)); msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs)); msm_gpiomux_install(&sd_card_det, 1); if (machine_is_apq8074() && (of_board_is_liquid() || \ of_board_is_dragonboard())) msm_gpiomux_sdc3_install(); 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_hsic_hub_configs, ARRAY_SIZE(msm_hsic_hub_configs)); msm_gpiomux_install(msm_hdmi_configs, ARRAY_SIZE(msm_hdmi_configs)); if (of_board_is_fluid()) msm_gpiomux_install(msm_mhl_configs, ARRAY_SIZE(msm_mhl_configs)); msm_gpiomux_install(msm8974_pri_auxpcm_configs, ARRAY_SIZE(msm8974_pri_auxpcm_configs)); msm_gpiomux_install_nowrite(msm_lcd_configs, ARRAY_SIZE(msm_lcd_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 defined(CONFIG_MACH_LGE) msm_gpiomux_install(slimport_configs_rev_b, ARRAY_SIZE(slimport_configs_rev_b)); printk(KERN_INFO "slimport gpio configs for rev.B upper\n"); msm_gpiomux_install(msm_display_configs, ARRAY_SIZE(msm_display_configs)); #endif #if 0 /* disable sensor GPIO setting (enable ADSP)*/ msm_gpiomux_install(sensor_configs, ARRAY_SIZE(sensor_configs)); #endif #if defined(CONFIG_LGE_SM100) || defined(CONFIG_TSPDRV) msm_gpiomux_install(vibrator_configs, ARRAY_SIZE(vibrator_configs)); #endif #ifdef CONFIG_EARJACK_DEBUGGER msm_gpiomux_install(msm_earjack_debugger_configs, ARRAY_SIZE(msm_earjack_debugger_configs)); #endif if (of_board_is_dragonboard() && machine_is_apq8074()) msm_gpiomux_install(apq8074_dragonboard_ts_config, ARRAY_SIZE(apq8074_dragonboard_ts_config)); }
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)); #ifdef CONFIG_MFD_MAX77888 msm_gpiomux_install(msm8974_muic_configs, ARRAY_SIZE(msm8974_muic_configs)); #endif msm_gpiomux_install(msm_battery_configs, ARRAY_SIZE(msm_battery_configs)); #if !defined(CONFIG_MACH_LT03_LTE) msm_gpiomux_install(msm_batteryotg_configs, ARRAY_SIZE(msm_batteryotg_configs)); #endif #if !defined(CONFIG_BT_BCM4335) && !defined(CONFIG_BT_BCM4339) msm_gpiomux_install(msm_blsp2_uart7_configs, ARRAY_SIZE(msm_blsp2_uart7_configs)); #endif #if defined(CONFIG_BT_BCM4335) || defined(CONFIG_BT_BCM4339) msm_gpiomux_btuart_install(); msm_gpiomux_btwake_install(); #endif if (of_board_is_liquid()) msm_gpiomux_install_nowrite(ath_gpio_configs, ARRAY_SIZE(ath_gpio_configs)); msm_gpiomux_install(msm8974_slimbus_config, ARRAY_SIZE(msm8974_slimbus_config)); msm_gpiomux_install(hap_lvl_shft_config, ARRAY_SIZE(hap_lvl_shft_config)); if (of_board_is_dragonboard() && machine_is_apq8074()) msm_gpiomux_install(msm_sensor_configs_dragonboard, \ ARRAY_SIZE(msm_sensor_configs_dragonboard)); else msm_gpiomux_install(msm_sensor_configs, \ ARRAY_SIZE(msm_sensor_configs)); msm_gpiomux_install(hw_rev_configs, ARRAY_SIZE(hw_rev_configs)); msm_gpiomux_install(&sd_card_det, 1); msm_gpiomux_sdc3_install(); if (!(of_board_is_dragonboard() && machine_is_apq8074())) msm_gpiomux_sdc4_install(); msm_gpiomux_install(msm_taiko_config, ARRAY_SIZE(msm_taiko_config)); msm_gpiomux_install(ear_send_end_config, ARRAY_SIZE(ear_send_end_config)); #if defined(CONFIG_MACH_LT03_VZW) || defined(CONFIG_MACH_LT03_EUR) || defined(CONFIG_MACH_LT03_TMO) \ || defined(CONFIG_MACH_LT03SKT) || defined(CONFIG_MACH_LT03KTT) || defined(CONFIG_MACH_LT03LGT) msm_gpiomux_install(spk_ext_config, ARRAY_SIZE(spk_ext_config)); #endif msm_gpiomux_install(msm_hsic_hub_configs, ARRAY_SIZE(msm_hsic_hub_configs)); msm_gpiomux_install(msm_hdmi_configs, ARRAY_SIZE(msm_hdmi_configs)); #ifdef CONFIG_VIDEO_MHL_V2 msm_gpiomux_install(mhl_configs, ARRAY_SIZE(mhl_configs)); #endif #if 0 msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); #endif if (of_board_is_liquid() || (of_board_is_dragonboard() && machine_is_apq8074())) msm_gpiomux_install(msm8974_pri_ter_auxpcm_configs, ARRAY_SIZE(msm8974_pri_ter_auxpcm_configs)); else 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) */ #ifdef CONFIG_USB_SWITCH_FSA9485 if (system_rev >= 7) msm_gpiomux_install(lt03_r04_muic_configs, ARRAY_SIZE(lt03_r04_muic_configs)); else msm_gpiomux_install(lt03_muic_configs, ARRAY_SIZE(lt03_muic_configs)); #endif if (of_board_is_cdp()) { #if 0 /* Not used at Mondrian */ msm_gpiomux_install(msm8974_sec_auxpcm_configs, ARRAY_SIZE(msm8974_sec_auxpcm_configs)); #endif } else if (of_board_is_liquid() || of_board_is_fluid() || of_board_is_mtp()) msm_gpiomux_install(msm_epm_configs, ARRAY_SIZE(msm_epm_configs)); 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_FB_MSM_EDP_SAMSUNG msm_gpiomux_install(msm8974_lcd_config, ARRAY_SIZE(msm8974_lcd_config)); #endif #ifdef CONFIG_INPUT_WACOM msm_gpiomux_install(msm8974_wacom_configs, ARRAY_SIZE(msm8974_wacom_configs)); #endif msm_gpiomux_install(msm_grip_configs, ARRAY_SIZE(msm_grip_configs)); msm_gpiomux_install(msm_sensors_configs, ARRAY_SIZE(msm_sensors_configs)); #if defined(CONFIG_MACH_LT03_VZW) || defined(CONFIG_MACH_LT03SKT) || defined(CONFIG_MACH_LT03KTT) || defined(CONFIG_MACH_LT03LGT) msm_gpiomux_install(ext_buck_configs, ARRAY_SIZE(ext_buck_configs)); #endif #if defined(CONFIG_MACH_LT03_LTE) msm_gpiomux_install(gpio_nc_configs,ARRAY_SIZE(gpio_nc_configs)); #endif }
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 defined(CONFIG_BT_BCM4335) || defined(CONFIG_BT_BCM4339) msm_gpiomux_btuart_install(); #endif if (of_board_is_liquid()) msm_gpiomux_install_nowrite(ath_gpio_configs, ARRAY_SIZE(ath_gpio_configs)); msm_gpiomux_install(msm8974_slimbus_config, ARRAY_SIZE(msm8974_slimbus_config)); #ifdef CONFIG_SENSORS_GP2A_IIO_PROX msm_gpiomux_install(msm_proximity_configs, ARRAY_SIZE(msm_proximity_configs)); #endif msm_gpiomux_install(msm_mag_sensor_configs, ARRAY_SIZE(msm_mag_sensor_configs)); msm_gpiomux_install(hap_lvl_shft_config, ARRAY_SIZE(hap_lvl_shft_config)); if (of_board_is_dragonboard() && machine_is_apq8074()) msm_gpiomux_install(msm_sensor_configs_dragonboard, \ ARRAY_SIZE(msm_sensor_configs_dragonboard)); else msm_gpiomux_install(msm_sensor_configs, \ ARRAY_SIZE(msm_sensor_configs)); msm_gpiomux_install(&sd_card_det, 1); msm_gpiomux_install(msm_disp_configs, ARRAY_SIZE(msm_disp_configs)); if (machine_is_apq8074() && (of_board_is_liquid() || \ of_board_is_dragonboard())) msm_gpiomux_sdc3_install(); if (!(of_board_is_dragonboard() && machine_is_apq8074())) msm_gpiomux_sdc4_install(); msm_gpiomux_install(msm_taiko_config, ARRAY_SIZE(msm_taiko_config)); msm_gpiomux_install(tx_gtr_thres_enable_config, ARRAY_SIZE(tx_gtr_thres_enable_config)); msm_gpiomux_install(speaker_enable_config, ARRAY_SIZE(speaker_enable_config)); msm_gpiomux_install(ear_send_end_config, ARRAY_SIZE(ear_send_end_config)); msm_gpiomux_install(msm_hsic_hub_configs, ARRAY_SIZE(msm_hsic_hub_configs)); msm_gpiomux_install(msm_hdmi_configs, ARRAY_SIZE(msm_hdmi_configs)); msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); if (of_board_is_liquid() || (of_board_is_dragonboard() && machine_is_apq8074())) msm_gpiomux_install(msm8974_pri_ter_auxpcm_configs, ARRAY_SIZE(msm8974_pri_ter_auxpcm_configs)); else msm_gpiomux_install(msm8974_pri_pri_auxpcm_configs, ARRAY_SIZE(msm8974_pri_pri_auxpcm_configs)); if (of_board_is_cdp()) { #if 0 /* Not used at Mondrian */ msm_gpiomux_install(msm8974_sec_auxpcm_configs, ARRAY_SIZE(msm8974_sec_auxpcm_configs)); #endif } else if (of_board_is_liquid() || of_board_is_fluid() || of_board_is_mtp()) msm_gpiomux_install(msm_epm_configs, ARRAY_SIZE(msm_epm_configs)); 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)); msm_gpiomux_install(gpio_nc_configs, ARRAY_SIZE(gpio_nc_configs)); }