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 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)); }
void __init msm8226_htc_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_slimbus_config, ARRAY_SIZE(msm_slimbus_config)); msm_gpiomux_install(msm_aud_configs, ARRAY_SIZE(msm_aud_configs)); if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_blsp_configs, ARRAY_SIZE(msm_skuf_blsp_configs)); else msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs)); msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); msm_gpiomux_install(&sd_card_det, 1); if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_nfc_configs, ARRAY_SIZE(msm_skuf_nfc_configs)); msm_gpiomux_install_nowrite(msm_lcd_configs, ARRAY_SIZE(msm_lcd_configs)); msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs)); if (of_board_is_skuf()) msm_gpiomux_install(msm_sensor_configs_skuf_plus, ARRAY_SIZE(msm_sensor_configs_skuf_plus)); msm_gpiomux_sdc3_install(); #ifdef CONFIG_USB_EHCI_MSM_HSIC if (machine_is_msm8926()) { msm_hsic_configs[0].gpio = 119; msm_hsic_configs[1].gpio = 120; } msm_gpiomux_install(msm_hsic_configs, ARRAY_SIZE(msm_hsic_configs)); #endif }
void __init msm8226_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_keypad_configs, ARRAY_SIZE(msm_keypad_configs)); if (of_board_is_qrd()) msm_gpiomux_install(msm_qrd_blsp_configs, ARRAY_SIZE(msm_qrd_blsp_configs)); else msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs)); msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); msm_gpiomux_install(&sd_card_det, 1); if (of_board_is_qrd()) msm_gpiomux_install(msm_qrd_goodix_configs, ARRAY_SIZE(msm_qrd_goodix_configs)); else msm_gpiomux_install(msm_synaptics_configs, ARRAY_SIZE(msm_synaptics_configs)); if (of_board_is_qrd()) msm_gpiomux_install(msm_qrd_nfc_configs, ARRAY_SIZE(msm_qrd_nfc_configs)); msm_gpiomux_install_nowrite(msm_lcd_configs, ARRAY_SIZE(msm_lcd_configs)); msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs)); msm_gpiomux_install(msm_auxpcm_configs, ARRAY_SIZE(msm_auxpcm_configs)); if (of_board_is_cdp() || of_board_is_mtp() || of_board_is_xpm()) msm_gpiomux_install(usb_otg_sw_configs, ARRAY_SIZE(usb_otg_sw_configs)); msm_gpiomux_sdc3_install(); }
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)); 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 (machine_is_msm8974_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)); if (machine_is_msm8974_rumi()) msm_gpiomux_install(msm_rumi_blsp_configs, ARRAY_SIZE(msm_rumi_blsp_configs)); }
void __init msm8226_init_gpiomux(void) { int rc; rc = msm_gpiomux_init_dt(); if (rc) { pr_err("%s failed %d\n", __func__, rc); return; } if (lge_uart_console_enabled()) msm_gpiomux_install(msm_console_uart_configs, ARRAY_SIZE(msm_console_uart_configs)); else msm_gpiomux_install(msm_console_uart_disabled_configs, ARRAY_SIZE(msm_console_uart_disabled_configs)); msm_gpiomux_install(msm_keypad_configs, ARRAY_SIZE(msm_keypad_configs)); msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs)); msm_gpiomux_install(msm_touch_configs, ARRAY_SIZE(msm_touch_configs)); msm_gpiomux_install_nowrite(msm_lcd_configs, ARRAY_SIZE(msm_lcd_configs)); msm_gpiomux_install(msm_lcd_te_configs, ARRAY_SIZE(msm_lcd_te_configs)); msm_gpiomux_sdc3_install(); msm_gpiomux_install(msm_fuel_gauge_configs, ARRAY_SIZE(msm_fuel_gauge_configs)); #if defined(CONFIG_MSM_PWM_VIBRATOR) msm_gpiomux_install(vibrator_configs, ARRAY_SIZE(vibrator_configs)); msm_gpiomux_install(vibrator_pwm_config, ARRAY_SIZE(vibrator_pwm_config)); #endif bluetooth_msm_gpiomux_install(); }
void __init msm8226_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_keypad_configs, ARRAY_SIZE(msm_keypad_configs)); #if defined(CONFIG_MACH_MS01_EUR_3G) || defined(CONFIG_MACH_MS01_LTE) || defined(CONFIG_MACH_MILLET3G_EUR) || defined(CONFIG_MACH_MS01_CHN_CTC) \ || defined(CONFIG_MACH_MS01_LTE_KOR) || defined(CONFIG_MACH_CRATERVE_CHN_CTC) msm_gpiomux_install(msm_hall_configs, ARRAY_SIZE(msm_hall_configs)); #endif if (of_board_is_qrd()) msm_gpiomux_install(msm_qrd_blsp_configs, ARRAY_SIZE(msm_qrd_blsp_configs)); else msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs)); msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); msm_gpiomux_install(&sd_card_det, 1); #if defined(CONFIG_MACH_MS01_EUR_3G) || defined(CONFIG_MACH_CRATERQ) || defined(CONFIG_MACH_MS01_LTE) || defined(CONFIG_MACH_MS01_CHN_CTC) \ || defined(CONFIG_MACH_MS01_LTE_KOR) || defined(CONFIG_MACH_CRATERVE_CHN_CTC) msm_gpiomux_install(msm8226_tx_gtr_configs, ARRAY_SIZE(msm8226_tx_gtr_configs)); msm_gpiomux_install(muic_i2c_configs, ARRAY_SIZE(muic_i2c_configs)); #endif if (of_board_is_qrd()) msm_gpiomux_install(msm_qrd_goodix_configs, ARRAY_SIZE(msm_qrd_goodix_configs)); else #if defined(CONFIG_TOUCHSCREEN_ZINITIX_BT531) msm_gpiomux_install(msm_zinitixs_configs, ARRAY_SIZE(msm_zinitixs_configs)); #elif defined(CONFIG_TOUCHSCREEN_ATMEL_MXTS) msm_gpiomux_install(msm_atmel_configs, ARRAY_SIZE(msm_atmel_configs)); #elif defined(CONFIG_TOUCHSCREEN_MMS144) msm_gpiomux_install(msm_melfas_configs, ARRAY_SIZE(msm_melfas_configs)); #else msm_gpiomux_install(msm_synaptics_configs, ARRAY_SIZE(msm_synaptics_configs)); #endif if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_nfc_configs, ARRAY_SIZE(msm_skuf_nfc_configs)); #if defined(CONFIG_FB_MSM_MDSS_SHARP_HD_PANEL)\ || defined(CONFIG_MACH_MILLET3G_EUR) msm_gpiomux_install_nowrite(msm_lcd_configs, ARRAY_SIZE(msm_lcd_configs)); #endif msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs)); /* if (of_board_is_skuf()) msm_gpiomux_install(msm_sensor_configs_skuf_plus, ARRAY_SIZE(msm_sensor_configs_skuf_plus)); */ #if defined(CONFIG_MACH_MILLET3G_EUR) msm_gpiomux_install(msm_speaker_enable_gpio_configs, ARRAY_SIZE(msm_speaker_enable_gpio_configs)); #endif #if defined(CONFIG_SEC_NFC_I2C) || defined(CONFIG_BCM2079X_NFC_I2C) || defined(CONFIG_NFC_PN547) msm_gpiomux_install(msm_nfc_configs, ARRAY_SIZE(msm_nfc_configs)); #else msm_gpiomux_install(msm_nc_configs, ARRAY_SIZE(msm_nc_configs)); #endif #if defined(CONFIG_YAS_ACC_DRIVER_BMA250) || defined(CONFIG_INPUT_MPU6500) || \ defined(CONFIG_PROXIMITY_SENSOR) || defined (CONFIG_SENSORS_HSCDTD008A) msm_gpiomux_install(msm_sensors_configs, ARRAY_SIZE(msm_sensors_configs)); #endif if (of_board_is_cdp() || of_board_is_mtp() || of_board_is_xpm()) msm_gpiomux_install(usb_otg_sw_configs, ARRAY_SIZE(usb_otg_sw_configs)); msm_gpiomux_sdc3_install(); /* * HSIC STROBE gpio is also used by the ethernet. Install HSIC * gpio mux config only when HSIC is enabled. HSIC config will * be disabled when ethernet config is enabled. */ #ifdef CONFIG_USB_EHCI_MSM_HSIC if (machine_is_msm8926()) { msm_hsic_configs[0].gpio = 119; /* STROBE */ msm_hsic_configs[1].gpio = 120; /* DATA */ } msm_gpiomux_install(msm_hsic_configs, ARRAY_SIZE(msm_hsic_configs)); #endif #if defined(CONFIG_LEDS_AN30259A) msm_gpiomux_install(an30259a_led_config, ARRAY_SIZE(an30259a_led_config)); #endif #if defined(CONFIG_MACH_MS01_CHN_CTC) || defined(CONFIG_MACH_CRATERVE_CHN_CTC)||defined(CONFIG_MACH_MS01_EUR_3G) || defined(CONFIG_MACH_CRATERQ) msm_gpiomux_install(msm8226_nc_gpio_cfgs, ARRAY_SIZE(msm8226_nc_gpio_cfgs)); #endif #if defined(CONFIG_SAMSUNG_JACK) msm_gpiomux_install(msm_earjack_gpio_configs, ARRAY_SIZE(msm_earjack_gpio_configs)); #endif #if defined(CONFIG_MACH_MS01_EUR_3G) msm_gpiomux_install(ms01_nc_gpio_cfgs, ARRAY_SIZE(ms01_nc_gpio_cfgs)); #endif #if defined(CONFIG_MACH_MS01_CHN_CTC) || defined(CONFIG_MACH_CRATERVE_CHN_CTC) if ( system_rev >= 4 ) { msm_gpiomux_install(ms01_ctc_nc_gpio_cfgs, ARRAY_SIZE(ms01_ctc_nc_gpio_cfgs)); } #elif defined(CONFIG_MACH_CRATERQ) msm_gpiomux_install(craterq_gpio_configs, ARRAY_SIZE(craterq_gpio_configs)); #endif }
void __init msm8226_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_keypad_configs, ARRAY_SIZE(msm_keypad_configs)); if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_blsp_configs, ARRAY_SIZE(msm_skuf_blsp_configs)); else msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs)); msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); msm_gpiomux_install(&sd_card_det, 1); if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_goodix_configs, ARRAY_SIZE(msm_skuf_goodix_configs)); else msm_gpiomux_install(msm_synaptics_configs, ARRAY_SIZE(msm_synaptics_configs)); if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_nfc_configs, ARRAY_SIZE(msm_skuf_nfc_configs)); msm_gpiomux_install_nowrite(msm_lcd_configs, ARRAY_SIZE(msm_lcd_configs)); msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs)); if (of_board_is_skuf()) msm_gpiomux_install(msm_sensor_configs_skuf_plus, ARRAY_SIZE(msm_sensor_configs_skuf_plus)); msm_gpiomux_install(msm_auxpcm_configs, ARRAY_SIZE(msm_auxpcm_configs)); if (of_board_is_cdp() || of_board_is_mtp() || of_board_is_xpm()) msm_gpiomux_install(usb_otg_sw_configs, ARRAY_SIZE(usb_otg_sw_configs)); msm_gpiomux_install(hs_uart_sw_configs, ARRAY_SIZE(hs_uart_sw_configs)); msm_gpiomux_sdc3_install(); msm_gpiomux_extovp_install(); /* * HSIC STROBE gpio is also used by the ethernet. Install HSIC * gpio mux config only when HSIC is enabled. HSIC config will * be disabled when ethernet config is enabled. */ #ifdef CONFIG_USB_EHCI_MSM_HSIC if (machine_is_msm8926()) { msm_hsic_configs[0].gpio = 119; /* STROBE */ msm_hsic_configs[1].gpio = 120; /* DATA */ } msm_gpiomux_install(msm_hsic_configs, ARRAY_SIZE(msm_hsic_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; } #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 msm8226_init_gpiomux(void) { int rc; #ifdef CONFIG_MACH_LGE int gpio_index = 0; hw_rev_type hw_rev; hw_rev = lge_get_board_revno(); #endif // Device Tree Initailize rc = msm_gpiomux_init_dt(); if (rc) { pr_err("%s failed %d\n", __func__, rc); return; } #ifdef CONFIG_MACH_LGE //-------------------------------------------- // MSM8X26 GPIO Confiuration via X5 //-------------------------------------------- // GPIO related function <<0.Resreved Pin>> // GPIO related function <<1.SENSOR>> // GPIO related function <<2.I2C>> // GPIO related function <<3.UART>> // GPIO related function <<4.TOUCH>> // GPIO related function <<5.NFC>> // GPIO related function <<6.LCD>> // GPIO related function <<7.CAMERA>> // GPIO related function <<8.FLASH LED>> // GPIO related function <<9.IRRC>> // GPIO related function <<10.AUDIO>> // GPIO related function <<11.SD CARD>> // GPIO related function <<12.BATTERY>> // GPIO related function <<13.BT>> // GPIO related function <<14.WIFI>> // GPIO related function <<15.FM>> // GPIO related function <<16.WLC>> // GPIO related function <<17.SIM>> // GPIO related function <<18.SLIMBUS>> // GPIO related function <<19.RF>> // GPIO related function <<20.KEY PAD>> // GPIO related function <<21.LOGIC>> // GPIO related function <<0.Resreved Pin>> switch ( hw_rev ){ case HW_REV_0 : for ( gpio_index = 0 ; gpio_reserved_pin_rev_0[gpio_index] < MSM8x26_GPIO_END ; gpio_index++ ){ gpio_func_reserved_pin_config.gpio = gpio_reserved_pin_rev_0[gpio_index]; msm_gpiomux_install(&gpio_func_reserved_pin_config, 1); } break; case HW_REV_A : for ( gpio_index = 0 ; gpio_reserved_pin_rev_A[gpio_index] < MSM8x26_GPIO_END ; gpio_index++ ){ gpio_func_reserved_pin_config.gpio = gpio_reserved_pin_rev_A[gpio_index]; msm_gpiomux_install(&gpio_func_reserved_pin_config, 1); } break; case HW_REV_B : for ( gpio_index = 0 ; gpio_reserved_pin_rev_B[gpio_index] < MSM8x26_GPIO_END ; gpio_index++ ){ gpio_func_reserved_pin_config.gpio = gpio_reserved_pin_rev_B[gpio_index]; msm_gpiomux_install(&gpio_func_reserved_pin_config, 1); } break; case HW_REV_C : case HW_REV_D : case HW_REV_E : case HW_REV_1_0 : case HW_REV_1_1 : default : for ( gpio_index = 0 ; gpio_reserved_pin_rev_B[gpio_index] < MSM8x26_GPIO_END ; gpio_index++ ){ gpio_func_reserved_pin_config.gpio = gpio_reserved_pin_rev_B[gpio_index]; msm_gpiomux_install(&gpio_func_reserved_pin_config, 1); } break; } // GPIO related function <<1.SENSOR>> msm_gpiomux_install(gpio_func_sensor_configs, ARRAY_SIZE(gpio_func_sensor_configs)); msm_gpiomux_install(msm_hall_ic_configs, ARRAY_SIZE(msm_hall_ic_configs)); // GPIO related function <<2.I2C>> msm_gpiomux_install(gpio_func_i2c_configs, ARRAY_SIZE(gpio_func_i2c_configs)); // GPIO related function <<3.UART>> msm_gpiomux_install(gpio_func_uart_configs, ARRAY_SIZE(gpio_func_uart_configs)); // GPIO related function <<4.TOUCH>> if(hw_rev == HW_REV_0) { msm_gpiomux_install(msm_synaptics_configs, ARRAY_SIZE(msm_synaptics_configs)); printk(KERN_ERR "[Touch] synaptics msm_gpiomux_install HW_REV_A configs rev : %d\n", hw_rev); } else { msm_gpiomux_install(msm_atmel_s540_configs, ARRAY_SIZE(msm_atmel_s540_configs)); printk(KERN_ERR "[Touch] atmel msm_gpiomux_install HW_REV_A configs rev : %d\n", hw_rev); } // GPIO related function <<5.NFC>> /* LGE_CHANGE_S, [NFC][[email protected]], NFC Bring up */ #ifdef CONFIG_LGE_NFC_PN547_C2 msm_gpiomux_install(msm_nfc_configs, ARRAY_SIZE(msm_nfc_configs)); #endif /* LGE_CHANGE_E, [NFC][[email protected]], NFC Bring up */ // GPIO related function <<6.LCD>> msm_gpiomux_install(gpio_func_lcd_configs, ARRAY_SIZE(gpio_func_lcd_configs)); msm_gpiomux_install_nowrite(msm_lcd_configs, ARRAY_SIZE(msm_lcd_configs)); // GPIO related function <<7.CAMERA>> msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs)); // GPIO related function <<8.FLASH LED>> msm_gpiomux_install(gpio_func_flash_led_configs, ARRAY_SIZE(gpio_func_flash_led_configs)); // GPIO related function <<10.AUDIO>> // GPIO related function <<11.SD CARD>> msm_gpiomux_install(&sd_card_det, 1); // GPIO related function <<12.BATTERY>> msm_gpiomux_install(gpio_func_battery_configs, ARRAY_SIZE(gpio_func_battery_configs)); // GPIO related function <<13.BT>> msm_gpiomux_install(gpio_func_bt_configs, ARRAY_SIZE(gpio_func_bt_configs)); // GPIO related function <<14.WIFI>> #if defined ( CONFIG_BCMDHD ) || defined ( CONFIG_BCMDHD_MODULE ) #else msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); #endif // GPIO related function <<15.FM>> msm_gpiomux_install(gpio_func_fm_configs, ARRAY_SIZE(gpio_func_fm_configs)); // GPIO related function <<16.WLC>> msm_gpiomux_install(gpio_func_wlc_configs, ARRAY_SIZE(gpio_func_wlc_configs)); // GPIO related function <<17.SIM>> msm_gpiomux_install(gpio_func_sim_configs, ARRAY_SIZE(gpio_func_sim_configs)); // GPIO related function <<18.SLIMBUS>> msm_gpiomux_install(gpio_func_slimbus_configs, ARRAY_SIZE(gpio_func_slimbus_configs)); // GPIO related function <<19.RF>> msm_gpiomux_install(gpio_func_rf_configs, ARRAY_SIZE(gpio_func_rf_configs)); // GPIO related function <<20.KEY PAD>> msm_gpiomux_install(msm_keypad_configs, ARRAY_SIZE(msm_keypad_configs)); // GPIO related function <<21.LOGIC>> msm_gpiomux_install(gpio_func_logic_configs, ARRAY_SIZE(gpio_func_logic_configs)); #endif #ifndef CONFIG_MACH_LGE #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)); if (of_board_is_cdp() || of_board_is_mtp() || of_board_is_xpm()) msm_gpiomux_install(usb_otg_sw_configs, ARRAY_SIZE(usb_otg_sw_configs)); #endif /* LGE_CHANGE_S, [BT][[email protected]], 2013-05-13 */ #ifdef CONFIG_LGE_BLUETOOTH bluetooth_msm_gpiomux_install(); #endif /* CONFIG_LGE_BLUETOOTH */ /* LGE_CHANGE_E, [BT][[email protected]], 2013-05-13 */ msm_gpiomux_install(msm_auxpcm_configs, ARRAY_SIZE(msm_auxpcm_configs)); #if 0//defined(CONFIG_TSPDRV) msm_gpiomux_install(vibrator_configs, ARRAY_SIZE(vibrator_configs)); #endif msm_gpiomux_sdc3_install(); }
void __init msm8226_init_gpiomux(void) { int rc; rc = msm_gpiomux_init_dt(); if (rc) { pr_err("%s failed %d\n", __func__, rc); return; } /* Battery charging and BMS GPIO */ msm_gpiomux_install(msm_ta_nchg_configs, ARRAY_SIZE(msm_ta_nchg_configs)); msm_gpiomux_install(msm_hrm_configs, ARRAY_SIZE(msm_hrm_configs)); msm_gpiomux_install(msm_sensorhub_configs, ARRAY_SIZE(msm_sensorhub_configs)); msm_gpiomux_install(msm_nfc_configs, ARRAY_SIZE(msm_nfc_configs)); #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) msm_gpiomux_install(msm_eth_configs, ARRAY_SIZE(msm_eth_configs)); #endif msm_gpiomux_install(msm_keypad_configs, ARRAY_SIZE(msm_keypad_configs)); if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_blsp_configs, ARRAY_SIZE(msm_skuf_blsp_configs)); else msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs)); msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_goodix_configs, ARRAY_SIZE(msm_skuf_goodix_configs)); msm_gpiomux_install(msm_synaptics_configs, ARRAY_SIZE(msm_synaptics_configs)); if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_nfc_configs, ARRAY_SIZE(msm_skuf_nfc_configs)); msm_gpiomux_install_nowrite(msm_lcd_configs, ARRAY_SIZE(msm_lcd_configs)); msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs)); if (of_board_is_skuf()) msm_gpiomux_install(msm_sensor_configs_skuf_plus, ARRAY_SIZE(msm_sensor_configs_skuf_plus)); msm_gpiomux_install(msm_auxpcm_configs, ARRAY_SIZE(msm_auxpcm_configs)); if (of_board_is_cdp() || of_board_is_mtp() || of_board_is_xpm()) msm_gpiomux_install(usb_otg_sw_configs, ARRAY_SIZE(usb_otg_sw_configs)); /* * gpio mux settings for the NC GPIOs */ msm_gpiomux_install(nc_gpio_cfgs, ARRAY_SIZE(nc_gpio_cfgs)); msm_gpiomux_install(hw_chkbits_cfg, ARRAY_SIZE(hw_chkbits_cfg)); msm_gpiomux_sdc3_install(); /* * HSIC STROBE gpio is also used by the ethernet. Install HSIC * gpio mux config only when HSIC is enabled. HSIC config will * be disabled when ethernet config is enabled. */ #ifdef CONFIG_USB_EHCI_MSM_HSIC if (machine_is_msm8926()) { msm_hsic_configs[0].gpio = 119; /* STROBE */ msm_hsic_configs[1].gpio = 120; /* DATA */ } msm_gpiomux_install(msm_hsic_configs, ARRAY_SIZE(msm_hsic_configs)); #endif #if defined(CONFIG_SAMSUNG_JACK) msm_gpiomux_install(msm_earjack_gpio_configs, ARRAY_SIZE(msm_earjack_gpio_configs)); #endif #ifdef CONFIG_SND_SOC_MAX98504 msm_gpiomux_install(msm8226_tertiary_mi2s_configs,ARRAY_SIZE(msm8226_tertiary_mi2s_configs)); #endif }
void __init msm8226_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_keypad_configs, ARRAY_SIZE(msm_keypad_configs)); if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_blsp_configs, ARRAY_SIZE(msm_skuf_blsp_configs)); else msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs)); msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); msm_gpiomux_install(&sd_card_det, 1); if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_goodix_configs, ARRAY_SIZE(msm_skuf_goodix_configs)); else msm_gpiomux_install(msm_synaptics_configs, ARRAY_SIZE(msm_synaptics_configs)); if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_nfc_configs, ARRAY_SIZE(msm_skuf_nfc_configs)); else msm_gpiomux_install(msm_nfc_configs, ARRAY_SIZE(msm_nfc_configs)); msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs)); if (of_board_is_skuf()) msm_gpiomux_install(msm_sensor_configs_skuf_plus, ARRAY_SIZE(msm_sensor_configs_skuf_plus)); msm_gpiomux_sdc3_install(); msm_gpiomux_install(msm_nativesensors_configs,ARRAY_SIZE(msm_nativesensors_configs)); msm_gpiomux_install(hw_rev_configs, ARRAY_SIZE(hw_rev_configs)); msm_gpiomux_install(gpio_nc_configs, ARRAY_SIZE(gpio_nc_configs)); msm_gpiomux_install(muic_gpio_config, ARRAY_SIZE(muic_gpio_config)); msm_gpiomux_install(msm_codec_int_gpio_configs, ARRAY_SIZE(msm_codec_int_gpio_configs)); #if defined(CONFIG_SAMSUNG_JACK) msm_gpiomux_install(msm_earjack_gpio_configs, ARRAY_SIZE(msm_earjack_gpio_configs)); #endif msm_gpiomux_install(chg_pm8226_configs, ARRAY_SIZE(chg_pm8226_configs)); if(!poweroff_charging) msm_gpiomux_install(wcdcodec_reset_cfg, ARRAY_SIZE(wcdcodec_reset_cfg)); msm_gpiomux_install(msm_lcd_det_configs, ARRAY_SIZE(msm_lcd_det_configs)); msm_gpiomux_install_nowrite(msm_lcd_configs,ARRAY_SIZE(msm_lcd_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; } 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 msm8226_init_gpiomux(void) { int rc; int gpio_index = 0; hw_rev_type hw_rev; hw_rev = lge_get_board_revno(); // Device Tree Initailize rc = msm_gpiomux_init_dt(); if (rc) { pr_err("%s failed %d\n", __func__, rc); return; } //-------------------------------------------- // MSM8X26 GPIO Confiuration via JAGUAR //-------------------------------------------- // GPIO related function <<0.Resreved Pin>> // GPIO related function <<1.SENSOR>> // GPIO related function <<2.I2C>> // GPIO related function <<3.UART>> // GPIO related function <<4.TOUCH>> // GPIO related function <<5.NFC>> // GPIO related function <<6.LCD>> // GPIO related function <<7.CAMERA>> // GPIO related function <<8.FLASH LED>> // GPIO related function <<9.IRRC>> // GPIO related function <<10.AUDIO>> // GPIO related function <<11.SD CARD>> // GPIO related function <<12.BATTERY>> // GPIO related function <<13.BT>> // GPIO related function <<14.WIFI>> // GPIO related function <<15.FM>> // GPIO related function <<16.WLC>> // GPIO related function <<17.SIM>> // GPIO related function <<18.SLIMBUS>> // GPIO related function <<19.RF>> // GPIO related function <<20.KEY PAD>> // GPIO related function <<21.LOGIC>> // GPIO related function <<0.Resreved Pin>> switch ( hw_rev ){ case HW_REV_0 : for ( gpio_index = 0 ; gpio_reserved_pin_rev_zero[gpio_index] < MSM8x26_GPIO_END ; gpio_index++ ){ gpio_func_reserved_pin_config.gpio = gpio_reserved_pin_rev_zero[gpio_index]; msm_gpiomux_install(&gpio_func_reserved_pin_config, 1); } break; case HW_REV_A : for ( gpio_index = 0 ; gpio_reserved_pin_rev_A[gpio_index] < MSM8x26_GPIO_END ; gpio_index++ ){ gpio_func_reserved_pin_config.gpio = gpio_reserved_pin_rev_A[gpio_index]; msm_gpiomux_install(&gpio_func_reserved_pin_config, 1); } break; case HW_REV_B : for ( gpio_index = 0 ; gpio_reserved_pin_rev_B[gpio_index] < MSM8x26_GPIO_END ; gpio_index++ ){ gpio_func_reserved_pin_config.gpio = gpio_reserved_pin_rev_B[gpio_index]; msm_gpiomux_install(&gpio_func_reserved_pin_config, 1); } break; case HW_REV_C : case HW_REV_D : case HW_REV_E : case HW_REV_1_0 : case HW_REV_1_1 : default : for ( gpio_index = 0 ; gpio_reserved_pin_rev_B[gpio_index] < MSM8x26_GPIO_END ; gpio_index++ ){ gpio_func_reserved_pin_config.gpio = gpio_reserved_pin_rev_B[gpio_index]; msm_gpiomux_install(&gpio_func_reserved_pin_config, 1); } break; } // GPIO related function <<1.SENSOR>> msm_gpiomux_install(msm_sensor_ic_configs, ARRAY_SIZE(msm_sensor_ic_configs)); // GPIO related function <<2.I2C>> msm_gpiomux_install(msm_i2c_configs, ARRAY_SIZE(msm_i2c_configs)); // GPIO related function <<3.UART>> msm_gpiomux_install(gpio_func_uart_configs, ARRAY_SIZE(gpio_func_uart_configs)); // GPIO related function <<4.TOUCH>> if (hw_rev == HW_REV_0) { msm_gpiomux_install(msm_atmel_configs, ARRAY_SIZE(msm_atmel_configs)); printk(KERN_ERR "[Touch] HW_REV_0 configs \n"); } else { msm_gpiomux_install(msm_synaptics_configs_rev_b, ARRAY_SIZE(msm_synaptics_configs_rev_b)); printk(KERN_ERR "[Touch] HW_REV_A.. configs \n"); } // GPIO related function <<5.NFC>> /* */ #ifdef CONFIG_LGE_NFC_PN547_C2 msm_gpiomux_install(msm_nfc_configs, ARRAY_SIZE(msm_nfc_configs)); #endif /* */ // GPIO related function <<6.LCD>> if (hw_rev <= HW_REV_A) msm_gpiomux_install_nowrite(msm_lcd_configs_A, ARRAY_SIZE(msm_lcd_configs_A)); else msm_gpiomux_install_nowrite(msm_lcd_configs_B, ARRAY_SIZE(msm_lcd_configs_B)); // GPIO related function <<7.CAMERA>> msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs)); // GPIO related function <<8.FLASH LED>> msm_gpiomux_install(gpio_func_flash_led_configs, ARRAY_SIZE(gpio_func_flash_led_configs)); // GPIO related function <<10.AUDIO>> // GPIO related function <<11.SD CARD>> msm_gpiomux_sdc3_install(); // GPIO related function <<12.BATTERY>> msm_gpiomux_install(power_configs, ARRAY_SIZE(power_configs)); // GPIO related function <<13.BT>> #ifdef CONFIG_LGE_BLUETOOTH bluetooth_msm_gpiomux_install(); #endif /* */ // GPIO related function <<14.WIFI>> #if defined (CONFIG_BCMDHD) || defined (CONFIG_BCMDHD_MODULE) #else if (hw_rev == HW_REV_0) msm_gpiomux_install(wcnss_5wire_interface_zero, ARRAY_SIZE(wcnss_5wire_interface_zero)); else msm_gpiomux_install(wcnss_5wire_interface_A, ARRAY_SIZE(wcnss_5wire_interface_A)); #endif // GPIO related function <<15.FM>> msm_gpiomux_install(msm_auxpcm_configs, ARRAY_SIZE(msm_auxpcm_configs)); // GPIO related function <<16.WLC>> // GPIO related function <<17.SIM>> msm_gpiomux_install(gpio_func_sim_configs, ARRAY_SIZE(gpio_func_sim_configs)); // GPIO related function <<18.SLIMBUS>> msm_gpiomux_install(gpio_func_slimbus_configs, ARRAY_SIZE(gpio_func_slimbus_configs)); // GPIO related function <<19.RF>> msm_gpiomux_install(gpio_func_rf_configs, ARRAY_SIZE(gpio_func_rf_configs)); // GPIO related function <<20.KEY PAD>> msm_gpiomux_install(msm_keypad_configs, ARRAY_SIZE(msm_keypad_configs)); // GPIO related function <<21.LOGIC>> logic_msm_gpiomux_install(); /* */ #if defined(CONFIG_LGE_BROADCAST_TDMB) msm_gpiomux_install(msm8926_tdmb_configs, ARRAY_SIZE(msm8926_tdmb_configs)); #endif /* */ #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) msm_gpiomux_install(msm_eth_configs, ARRAY_SIZE(msm_eth_configs)); #endif #ifndef CONFIG_MACH_LGE if (of_board_is_cdp() || of_board_is_mtp() || of_board_is_xpm()) msm_gpiomux_install(usb_otg_sw_configs, ARRAY_SIZE(usb_otg_sw_configs)); #endif }
void __init msm8226_init_gpiomux(void) { int rc; rc = msm_gpiomux_init_dt(); if (rc) { pr_err("%s failed %d\n", __func__, rc); return; } #if defined (CONFIG_MACH_MILLETLTE_VZW) msm_gpiomux_install(milletltevzw_gpio_10, ARRAY_SIZE(milletltevzw_gpio_10)); #endif #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) msm_gpiomux_install(msm_eth_configs, ARRAY_SIZE(msm_eth_configs)); #endif msm_gpiomux_install(msm_keypad_configs, ARRAY_SIZE(msm_keypad_configs)); if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_blsp_configs, ARRAY_SIZE(msm_skuf_blsp_configs)); else msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs)); msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); msm_gpiomux_install(&sd_card_det, 1); if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_goodix_configs, ARRAY_SIZE(msm_skuf_goodix_configs)); else #if defined (CONFIG_MACH_BERLUTI3G_EUR) msm_gpiomux_install(msm_cypress_configs, ARRAY_SIZE(msm_cypress_configs)); msm_gpiomux_install(msm_keyboad_cypress_configs, ARRAY_SIZE(msm_keyboad_cypress_configs)); #elif defined(CONFIG_SEC_MILLET_PROJECT) msm_gpiomux_install(msm_melfas_configs, ARRAY_SIZE(msm_melfas_configs)); #else msm_gpiomux_install(msm_synaptics_configs, ARRAY_SIZE(msm_synaptics_configs)); #endif if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_nfc_configs, ARRAY_SIZE(msm_skuf_nfc_configs)); msm_gpiomux_install_nowrite(msm_lcd_configs, ARRAY_SIZE(msm_lcd_configs)); msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs)); if (of_board_is_skuf()) msm_gpiomux_install(msm_sensor_configs_skuf_plus, ARRAY_SIZE(msm_sensor_configs_skuf_plus)); #if !defined (CONFIG_SEC_MILLET_PROJECT) msm_gpiomux_install(msm_auxpcm_configs, ARRAY_SIZE(msm_auxpcm_configs)); #endif if (of_board_is_cdp() || of_board_is_mtp() || of_board_is_xpm()) msm_gpiomux_install(usb_otg_sw_configs, ARRAY_SIZE(usb_otg_sw_configs)); #if defined (CONFIG_SEC_MILLET_PROJECT) msm_gpiomux_install(msm_nativesensors_configs,ARRAY_SIZE(msm_nativesensors_configs)); if ( system_rev >= 0 && system_rev < 3) { msm_gpiomux_install(light_prox_config, ARRAY_SIZE(light_prox_config)); msm_gpiomux_install(irled_i2c_scl_config, ARRAY_SIZE(irled_i2c_scl_config)); } else { msm_gpiomux_install(nc_light_prox_config, ARRAY_SIZE(nc_light_prox_config)); #if defined (CONFIG_MACH_MILLETLTE_VZW) || defined(CONFIG_SEC_MILLETWIFI_COMMON) msm_gpiomux_install(irled_i2c_scl_config, ARRAY_SIZE(irled_i2c_scl_config)); #endif } #endif msm_gpiomux_sdc3_install(); msm_gpiomux_install(msm_ta_nchg_configs, ARRAY_SIZE(msm_ta_nchg_configs)); msm_gpiomux_install(msm_ta_int_n_configs, ARRAY_SIZE(msm_ta_int_n_configs)); #if defined (CONFIG_SEC_MILLETLTE_COMMON) if ( system_rev >= 3) { msm_gpiomux_install(ovp_enable_configs, ARRAY_SIZE(ovp_enable_configs)); } #else msm_gpiomux_install(ovp_enable_configs, ARRAY_SIZE(ovp_enable_configs)); #endif #if defined (CONFIG_SEC_MILLETWIFI_COMMON) msm_gpiomux_install(milletwifi_nc_gpio_cfgs, ARRAY_SIZE(milletwifi_nc_gpio_cfgs)); #endif #if defined (CONFIG_MACH_MILLETLTE_OPEN) msm_gpiomux_install(millet_nc_gpio_cfgs, ARRAY_SIZE(millet_nc_gpio_cfgs)); if ( system_rev >= 3){ msm_gpiomux_install(millet_nc3_gpio_cfgs, ARRAY_SIZE(millet_nc3_gpio_cfgs)); } #endif #if defined (CONFIG_MACH_MILLET3G_EUR) if ( system_rev >= 2) msm_gpiomux_install(millet3g_nc_gpio_cfgs, ARRAY_SIZE(millet3g_nc_gpio_cfgs)); #endif #if defined (CONFIG_MACH_MILLETLTE_VZW) if ( system_rev >= 1) msm_gpiomux_install(milletltevzw_nc_gpio_cfgs, ARRAY_SIZE(milletltevzw_nc_gpio_cfgs)); #endif #if defined(CONFIG_SAMSUNG_JACK) msm_gpiomux_install(msm_earjack_gpio_configs, ARRAY_SIZE(msm_earjack_gpio_configs)); #endif if(!poweroff_charging) msm_gpiomux_install(wcdcodec_reset_cfg, ARRAY_SIZE(wcdcodec_reset_cfg)); #ifdef CONFIG_SND_SOC_MAX98504 #if defined(CONFIG_MACH_MILLETLTE_OPEN) if ( system_rev >= 0 && system_rev < 3) #elif defined (CONFIG_MACH_MILLET3G_EUR) if ( system_rev >= 2 && system_rev < 4) #elif defined(CONFIG_MACH_MILLETWIFI_OPEN) if ( system_rev >= 0 && system_rev < 5) #endif { msm_gpiomux_install(msm8226_tertiary_mi2s_configs,ARRAY_SIZE(msm8226_tertiary_mi2s_configs)); msm_gpiomux_install(msm8226_blsp_codec_configs,ARRAY_SIZE(msm8226_blsp_codec_configs)); msm_gpiomux_install(msm8226_amp_int_configs,ARRAY_SIZE(msm8226_amp_int_configs)); } #endif }
void __init msm8226_init_gpiomux(void) { int rc; #ifdef CONFIG_MACH_LGE int gpio_index; hw_rev_type hw_rev; hw_rev = lge_get_board_revno(); #endif // Device Tree Initailize rc = msm_gpiomux_init_dt(); if (rc) { pr_err("%s failed %d\n", __func__, rc); return; } #ifdef CONFIG_MACH_LGE //-------------------------------------------- // MSM8X26 GPIO Confiuration via W7 Rev 0 //-------------------------------------------- // GPIO related function <<0.Resreved Pin>> // GPIO related function <<1.SENSOR>> // GPIO related function <<2.I2C>> // GPIO related function <<3.UART>> // GPIO related function <<4.TOUCH>> // GPIO related function <<5.NFC>> // GPIO related function <<6.LCD>> // GPIO related function <<7.CAMERA>> // GPIO related function <<8.FLASH LED>> // GPIO related function <<9.IRRC>> // GPIO related function <<10.AUDIO>> // GPIO related function <<11.SD CARD>> // GPIO related function <<12.BATTERY>> // GPIO related function <<13.BT>> // GPIO related function <<14.WIFI>> // GPIO related function <<15.FM>> // GPIO related function <<16.SIM>> // GPIO related function <<17.SLIMBUS>> // GPIO related function <<18.RF>> // GPIO related function <<19.KEY PAD>> // GPIO related function <<20.LOGIC>> // GPIO related function <<0.Resreved Pin>> switch (hw_rev) { case HW_REV_A: for (gpio_index = 0; gpio_reserved_pin_rev_A[gpio_index] < MSM8x26_GPIO_END; gpio_index++) { gpio_func_reserved_pin_config.gpio = gpio_reserved_pin_rev_A[gpio_index]; msm_gpiomux_install(&gpio_func_reserved_pin_config, 1); } break; case HW_REV_B: default: for (gpio_index = 0; gpio_reserved_pin_rev_B[gpio_index] < MSM8x26_GPIO_END; gpio_index++) { gpio_func_reserved_pin_config.gpio = gpio_reserved_pin_rev_B[gpio_index]; msm_gpiomux_install(&gpio_func_reserved_pin_config, 1); } break; } // GPIO related function <<1.SENSOR>> msm_gpiomux_install(gpio_func_sensor_configs, ARRAY_SIZE(gpio_func_sensor_configs)); msm_gpiomux_install(msm_hall_ic_configs, ARRAY_SIZE(msm_hall_ic_configs)); // GPIO related function <<2.I2C>> msm_gpiomux_install(gpio_func_i2c_configs, ARRAY_SIZE(gpio_func_i2c_configs)); // GPIO related function <<3.UART>> msm_gpiomux_install(gpio_func_uart_configs, ARRAY_SIZE(gpio_func_uart_configs)); // GPIO related function <<4.TOUCH>> msm_gpiomux_install(msm_synaptics_configs, ARRAY_SIZE(msm_synaptics_configs)); // GPIO related function <<5.NFC>> /* */ #ifdef CONFIG_LGE_NFC_PN547_C2 msm_gpiomux_install(msm_nfc_configs, ARRAY_SIZE(msm_nfc_configs)); #endif /* */ // GPIO related function <<6.LCD>> msm_gpiomux_install(gpio_func_lcd_configs, ARRAY_SIZE(gpio_func_lcd_configs)); msm_gpiomux_install_nowrite(msm_lcd_configs, ARRAY_SIZE(msm_lcd_configs)); // GPIO related function <<7.CAMERA>> msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs)); // GPIO related function <<8.FLASH LED>> msm_gpiomux_install(gpio_func_flash_led_configs, ARRAY_SIZE(gpio_func_flash_led_configs)); // GPIO related function <<10.AUDIO>> msm_gpiomux_install(gpio_func_audio_configs, ARRAY_SIZE(gpio_func_audio_configs)); // GPIO related function <<11.SD CARD>> msm_gpiomux_install(&sd_card_det, 1); // GPIO related function <<12.BATTERY>> msm_gpiomux_install(gpio_func_battery_configs, ARRAY_SIZE(gpio_func_battery_configs)); // GPIO related function <<13.BT>> /*msm_gpiomux_install(gpio_func_bt_configs, ARRAY_SIZE(gpio_func_bt_configs)); */ #ifdef CONFIG_LGE_BLUETOOTH bluetooth_msm_gpiomux_install(); #endif /* */ // GPIO related function <<14.WIFI>> #if defined ( CONFIG_BCMDHD ) || defined ( CONFIG_BCMDHD_MODULE ) #else msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); #endif // GPIO related function <<15.FM>> msm_gpiomux_install(gpio_func_fm_configs, ARRAY_SIZE(gpio_func_fm_configs)); // GPIO related function <<16.SIM>> msm_gpiomux_install(gpio_func_sim_configs, ARRAY_SIZE(gpio_func_sim_configs)); // GPIO related function <<17.SLIMBUS>> msm_gpiomux_install(gpio_func_slimbus_configs, ARRAY_SIZE(gpio_func_slimbus_configs)); // GPIO related function <<18.RF>> msm_gpiomux_install(gpio_func_rf_configs, ARRAY_SIZE(gpio_func_rf_configs)); // GPIO related function <<19.KEY PAD>> msm_gpiomux_install(msm_keypad_configs, ARRAY_SIZE(msm_keypad_configs)); // GPIO related function <<20.LOGIC>> msm_gpiomux_install(gpio_func_logic_configs, ARRAY_SIZE(gpio_func_logic_configs)); #endif #ifndef CONFIG_MACH_LGE #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_auxpcm_configs, ARRAY_SIZE(msm_auxpcm_configs)); if (of_board_is_cdp() || of_board_is_mtp() || of_board_is_xpm()) msm_gpiomux_install(usb_otg_sw_configs, ARRAY_SIZE(usb_otg_sw_configs)); #endif #if defined(CONFIG_TSPDRV) msm_gpiomux_install(vibrator_configs, ARRAY_SIZE(vibrator_configs)); #endif msm_gpiomux_sdc3_install(); #ifdef CONFIG_SND_BRCM_FM_RADIO msm_gpiomux_install(msm_pri_mi2s_configs, ARRAY_SIZE(msm_pri_mi2s_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)); #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 msm8226_init_gpiomux(void) { int rc; int gpio_index = 0; hw_rev_type hw_rev; hw_rev = lge_get_board_revno(); // Device Tree Initailize rc = msm_gpiomux_init_dt(); if (rc) { pr_err("%s failed %d\n", __func__, rc); return; } //-------------------------------------------- // MSM8X26 GPIO Confiuration via JAGUAR //-------------------------------------------- // GPIO related function <<0.Resreved Pin>> // GPIO related function <<1.SENSOR>> // GPIO related function <<2.I2C>> // GPIO related function <<3.UART>> // GPIO related function <<4.TOUCH>> // GPIO related function <<5.NFC>> // GPIO related function <<6.LCD>> // GPIO related function <<7.CAMERA>> // GPIO related function <<8.FLASH LED>> // GPIO related function <<9.IRRC>> // GPIO related function <<10.AUDIO>> // GPIO related function <<11.SD CARD>> // GPIO related function <<12.BATTERY>> // GPIO related function <<13.BT>> // GPIO related function <<14.WIFI>> // GPIO related function <<15.FM>> // GPIO related function <<16.WLC>> // GPIO related function <<17.SIM>> // GPIO related function <<18.SLIMBUS>> // GPIO related function <<19.RF>> // GPIO related function <<20.KEY PAD>> // GPIO related function <<21.LOGIC>> // GPIO related function <<0.Resreved Pin>> switch ( hw_rev ){ case HW_REV_0 : #if 0 for ( gpio_index = 0 ; gpio_reserved_pin_rev_zero[gpio_index] < MSM8x26_GPIO_END ; gpio_index++ ){ gpio_func_reserved_pin_config.gpio = gpio_reserved_pin_rev_zero[gpio_index]; msm_gpiomux_install(&gpio_func_reserved_pin_config, 1); } #endif break; case HW_REV_A : for ( gpio_index = 0 ; gpio_reserved_pin_rev_A[gpio_index] < MSM8x26_GPIO_END ; gpio_index++ ){ gpio_func_reserved_pin_config.gpio = gpio_reserved_pin_rev_A[gpio_index]; msm_gpiomux_install(&gpio_func_reserved_pin_config, 1); } break; case HW_REV_B : for ( gpio_index = 0 ; gpio_reserved_pin_rev_B[gpio_index] < MSM8x26_GPIO_END ; gpio_index++ ){ gpio_func_reserved_pin_config.gpio = gpio_reserved_pin_rev_B[gpio_index]; msm_gpiomux_install(&gpio_func_reserved_pin_config, 1); } break; case HW_REV_C : case HW_REV_D : case HW_REV_E : case HW_REV_1_0 : case HW_REV_1_1 : default : for ( gpio_index = 0 ; gpio_reserved_pin_rev_B[gpio_index] < MSM8x26_GPIO_END ; gpio_index++ ){ gpio_func_reserved_pin_config.gpio = gpio_reserved_pin_rev_B[gpio_index]; msm_gpiomux_install(&gpio_func_reserved_pin_config, 1); } break; } // GPIO related function <<1.SENSOR>> msm_gpiomux_install(msm_sensor_ic_configs, ARRAY_SIZE(msm_sensor_ic_configs)); // GPIO related function <<2.I2C>> msm_gpiomux_install(msm_i2c_configs, ARRAY_SIZE(msm_i2c_configs)); // GPIO related function <<3.UART>> msm_gpiomux_install(gpio_func_uart_configs, ARRAY_SIZE(gpio_func_uart_configs)); // GPIO related function <<4.TOUCH>> if (hw_rev >= HW_REV_A) { msm_gpiomux_install(msm_touch_configs, ARRAY_SIZE(msm_touch_configs)); printk(KERN_ERR "[Touch] HW_REV_A configs \n"); } // GPIO related function <<5.NFC>> /* LGE_CHANGE_S, [NFC][[email protected]], NFC Bring up */ #ifdef CONFIG_LGE_NFC_PN544_C3 msm_gpiomux_install(msm_nfc_configs, ARRAY_SIZE(msm_nfc_configs)); #endif /* LGE_CHANGE_E, [NFC][[email protected]], NFC Bring up */ // GPIO related function <<6.LCD>> msm_gpiomux_install_nowrite(msm_lcd_configs, ARRAY_SIZE(msm_lcd_configs)); // GPIO related function <<7.CAMERA>> msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs)); // GPIO related function <<8.FLASH LED>> msm_gpiomux_install(gpio_func_flash_led_configs, ARRAY_SIZE(gpio_func_flash_led_configs)); // GPIO related function <<10.AUDIO>> // GPIO related function <<11.SD CARD>> msm_gpiomux_sdc3_install(); // GPIO related function <<12.BATTERY>> msm_gpiomux_install(power_configs, ARRAY_SIZE(power_configs)); // GPIO related function <<13.BT>> #ifdef CONFIG_LGE_BLUETOOTH bluetooth_msm_gpiomux_install(); #endif /* CONFIG_LGE_BLUETOOTH */ // GPIO related function <<14.WIFI>> msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); // GPIO related function <<15.FM>> msm_gpiomux_install(msm_auxpcm_configs, ARRAY_SIZE(msm_auxpcm_configs)); // GPIO related function <<16.WLC>> msm_gpiomux_install(&gpio_func_wlc_config, 1); // GPIO related function <<17.SIM>> msm_gpiomux_install(gpio_func_sim_configs, ARRAY_SIZE(gpio_func_sim_configs)); // GPIO related function <<18.SLIMBUS>> msm_gpiomux_install(gpio_func_slimbus_configs, ARRAY_SIZE(gpio_func_slimbus_configs)); // GPIO related function <<19.RF>> msm_gpiomux_install(gpio_func_rf_configs, ARRAY_SIZE(gpio_func_rf_configs)); // GPIO related function <<20.KEY PAD>> msm_gpiomux_install(msm_keypad_configs, ARRAY_SIZE(msm_keypad_configs)); // GPIO related function <<21.LOGIC>> msm_gpiomux_install(ext_ldo_en_configs, ARRAY_SIZE(ext_ldo_en_configs)); #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) msm_gpiomux_install(msm_eth_configs, ARRAY_SIZE(msm_eth_configs)); #endif #ifndef CONFIG_MACH_LGE if (of_board_is_cdp() || of_board_is_mtp() || of_board_is_xpm()) msm_gpiomux_install(usb_otg_sw_configs, ARRAY_SIZE(usb_otg_sw_configs)); #endif #ifdef CONFIG_SND_BRCM_FM_RADIO msm_gpiomux_install(msm_pri_mi2s_configs, ARRAY_SIZE(msm_pri_mi2s_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()); 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)); #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(); if(system_rev < 5) { msm_gpiomux_install(msm8974_btwifi_ldo_en_configs, ARRAY_SIZE(msm8974_btwifi_ldo_en_configs)); } #endif msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); msm_gpiomux_install(msm8974_slimbus_config, ARRAY_SIZE(msm8974_slimbus_config)); #if defined(CONFIG_MACH_LT03SKT) || defined(CONFIG_MACH_LT03KTT) ||defined(CONFIG_MACH_LT03LGT) msm_gpiomux_install(ext_buck_configs, ARRAY_SIZE(ext_buck_configs)); #endif msm_gpiomux_install(msm_grip_configs, ARRAY_SIZE(msm_grip_configs)); msm_gpiomux_install(hw_rev_configs, ARRAY_SIZE(hw_rev_configs)); 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(ear_send_end_config, ARRAY_SIZE(ear_send_end_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 defined(CONFIG_PN547_NFC) msm_gpiomux_install(msm_nfc_configs, ARRAY_SIZE(msm_nfc_configs)); #endif #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_VIDEO_MHL_V2 msm_gpiomux_install(mhl_configs, ARRAY_SIZE(mhl_configs)); #endif 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 !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 msm_gpiomux_install(msm8974_audio_configs, ARRAY_SIZE(msm8974_audio_configs)); #ifdef CONFIG_INPUT_WACOM msm_gpiomux_install(msm8974_wacom_configs, ARRAY_SIZE(msm8974_wacom_configs)); #endif msm_gpiomux_install(msm_sensors_configs, ARRAY_SIZE(msm_sensors_configs)); if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_MDM) msm_gpiomux_install(mdm_configs, ARRAY_SIZE(mdm_configs)); #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 msm_gpiomux_install(gpio_nc_configs,ARRAY_SIZE(gpio_nc_configs)); #ifdef CONFIG_FB_MSM_EDP_SAMSUNG msm_gpiomux_install(msm8974_lcd_config, ARRAY_SIZE(msm8974_lcd_config)); #endif }
void __init msm8226_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_keypad_configs, ARRAY_SIZE(msm_keypad_configs)); if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_blsp_configs, ARRAY_SIZE(msm_skuf_blsp_configs)); else msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs)); msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); msm_gpiomux_install(&sd_card_det, 1); if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_goodix_configs, ARRAY_SIZE(msm_skuf_goodix_configs)); else msm_gpiomux_install(msm_synaptics_configs, ARRAY_SIZE(msm_synaptics_configs)); if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_nfc_configs, ARRAY_SIZE(msm_skuf_nfc_configs)); msm_gpiomux_install_nowrite(msm_lcd_configs, ARRAY_SIZE(msm_lcd_configs)); msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs)); if (of_board_is_skuf()) msm_gpiomux_install(msm_sensor_configs_skuf_plus, ARRAY_SIZE(msm_sensor_configs_skuf_plus)); msm_gpiomux_install(msm_auxpcm_configs, ARRAY_SIZE(msm_auxpcm_configs)); if (of_board_is_cdp() || of_board_is_mtp() || of_board_is_xpm()) msm_gpiomux_install(usb_otg_sw_configs, ARRAY_SIZE(usb_otg_sw_configs)); #if defined (CONFIG_SEC_MILLET_PROJECT) || defined(CONFIG_SEC_MATISSE_PROJECT) || defined(CONFIG_SEC_BERLUTI_PROJECT) msm_gpiomux_install(msm_nativesensors_configs,ARRAY_SIZE(msm_nativesensors_configs)); #endif msm_gpiomux_sdc3_install(); /* * HSIC STROBE gpio is also used by the ethernet. Install HSIC * gpio mux config only when HSIC is enabled. HSIC config will * be disabled when ethernet config is enabled. */ #ifdef CONFIG_USB_EHCI_MSM_HSIC if (machine_is_msm8926()) { msm_hsic_configs[0].gpio = 119; /* STROBE */ msm_hsic_configs[1].gpio = 120; /* DATA */ } msm_gpiomux_install(msm_hsic_configs, ARRAY_SIZE(msm_hsic_configs)); #endif #if defined(CONFIG_SAMSUNG_JACK) msm_gpiomux_install(msm_earjack_gpio_configs, ARRAY_SIZE(msm_earjack_gpio_configs)); #endif #ifdef CONFIG_SND_SOC_MAX98504 #if defined(CONFIG_MACH_MILLETLTE_OPEN) if ( system_rev >= 0 && system_rev < 3) #elif defined (CONFIG_MACH_MILLET3G_EUR) || defined(CONFIG_MACH_BERLUTI3G_EUR) if ( system_rev >= 2 && system_rev < 4) #elif defined(CONFIG_MACH_MILLETWIFI_OPEN) if ( system_rev >= 0 && system_rev < 5) #endif { msm_gpiomux_install(msm8226_tertiary_mi2s_configs,ARRAY_SIZE(msm8226_tertiary_mi2s_configs)); msm_gpiomux_install(msm8226_blsp_codec_configs,ARRAY_SIZE(msm8226_blsp_codec_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()); 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)); #if !defined(CONFIG_MACH_KS01SKT) && !defined(CONFIG_MACH_KS01KTT)\ && !defined(CONFIG_MACH_KS01LGT) msm_gpiomux_install(msm_blsp2_uart7_configs, ARRAY_SIZE(msm_blsp2_uart7_configs)); #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)); }
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 msm_gpiomux_install(msm8974_hall_configs, ARRAY_SIZE(msm8974_hall_configs)); #endif #if defined(CONFIG_KEYBOARD_CYPRESS_TOUCHKEY_KS01) msm_gpiomux_install(cypress_touch_configs, ARRAY_SIZE(cypress_touch_configs)); #endif msm_gpiomux_install(fpga_tflash, ARRAY_SIZE(fpga_tflash)); #if defined(CONFIG_TDMB) || defined(CONFIG_TDMB_MODULE) msm_gpiomux_install(tdmb_int_config, ARRAY_SIZE(tdmb_int_config)); #endif #if defined(CONFIG_MACH_KS01EUR) msm_gpiomux_install(batt_rem_alarm_configs, ARRAY_SIZE(batt_rem_alarm_configs)); #endif msm_gpiomux_install(nc_configs, ARRAY_SIZE(nc_configs)); #if defined(CONFIG_MACH_KS01EUR) msm_gpiomux_install(wireless_charge_configs, ARRAY_SIZE(wireless_charge_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()); 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)); #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(ext_buck_configs, ARRAY_SIZE(ext_buck_configs)); msm_gpiomux_install(hw_rev_configs, ARRAY_SIZE(hw_rev_configs)); msm_gpiomux_install(gpio_nc_configs, ARRAY_SIZE(gpio_nc_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); #ifdef CONFIG_MACH_KS01 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)); msm_gpiomux_install(es325_config, ARRAY_SIZE(es325_config)); msm_gpiomux_install(ear_send_end_config, ARRAY_SIZE(ear_send_end_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 (system_rev > 6) 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 defined(CONFIG_BCM2079X_NFC_I2C) || defined(CONFIG_NFC_PN547) msm_gpiomux_install(msm_nfc_configs, ARRAY_SIZE(msm_nfc_configs)); if(system_rev == 9 || system_rev == 10) { // over-write I2C config, rev09,10 has no external Pull-up register. msm_gpiomux_install(msm_nfc_i2c_configs_rev09, ARRAY_SIZE(msm_nfc_i2c_configs_rev09)); } #endif #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 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 !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_GSM_MODEM_SPRD6500) msm_gpiomux_sc6500_spi_install(); #endif #ifdef CONFIG_SENSORS_HALL msm_gpiomux_install(msm8974_hall_configs, ARRAY_SIZE(msm8974_hall_configs)); #endif #ifdef CONFIG_W1_SLAVE_DS28EL15 msm_gpiomux_install(msm8974_cover_id_config, ARRAY_SIZE(msm8974_cover_id_config)); #endif #ifdef CONFIG_SENSORS_VFS61XX msm_gpiomux_install(msm8974_fingerprint_configs, ARRAY_SIZE(msm8974_fingerprint_configs)); if (system_rev > 2) msm_gpiomux_install(msm8974_fingerprint_rev03_configs, ARRAY_SIZE(msm8974_fingerprint_rev03_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_TOUCHSCREEN_SYNAPTICS_I2C_RMI printk(KERN_INFO "%s:[TSP] touch config.\n",__func__); msm_gpiomux_install(msm8974_touch_config, ARRAY_SIZE(msm8974_touch_config)); #endif msm_gpiomux_install(msm8974_te_configs, ARRAY_SIZE(msm8974_te_configs)); msm_gpiomux_install(msm8974_oled_id_configs, ARRAY_SIZE(msm8974_oled_id_configs)); msm_gpiomux_install(msm8974_uart_config, ARRAY_SIZE(msm8974_uart_config)); msm_gpiomux_install(msm8974_fpga_config, ARRAY_SIZE(msm8974_fpga_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) 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; } #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); 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)); 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)); 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 msm8226_init_gpiomux(void) { int rc; rc = msm_gpiomux_init_dt(); if (rc) { pr_err("%s failed %d\n", __func__, rc); return; } /* Keypad */ msm_gpiomux_install(msm_keypad_configs, ARRAY_SIZE(msm_keypad_configs)); /* HallSensors */ msm_gpiomux_install(msm_hall_configs, ARRAY_SIZE(msm_hall_configs)); /* BLSP */ msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs)); /*HW */ msm_gpiomux_install(hw_rev_configs, ARRAY_SIZE(hw_rev_configs)); /* WCNSS */ msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); /*T_FLASH_DETECT */ msm_gpiomux_install(&sd_card_det, 1); /* TX_GTR */ msm_gpiomux_install(msm8226_tx_gtr_configs, ARRAY_SIZE(msm8226_tx_gtr_configs)); /* LCD */ msm_gpiomux_install_nowrite(msm_lcd_configs, ARRAY_SIZE(msm_lcd_configs)); /* Camera */ msm_gpiomux_install(msm_csensor_configs, ARRAY_SIZE(msm_csensor_configs)); /* Touch */ msm_gpiomux_install(msm_melfas_configs, ARRAY_SIZE(msm_melfas_configs)); #if !defined(CONFIG_MACH_MS01_KOR_LTE) /* Touch Key */ msm_gpiomux_install(msm_keyboad_cypress_configs, ARRAY_SIZE(msm_keyboad_cypress_configs)); #endif #ifdef CONFIG_SEC_NFC_I2C /* NFC */ msm_gpiomux_install(msm_nfc_configs, ARRAY_SIZE(msm_nfc_configs)); #endif /* Sensors */ msm_gpiomux_install(msm_sensors_configs, ARRAY_SIZE(msm_sensors_configs)); /* SDCC3 */ msm_gpiomux_sdc3_install(); /* Codec */ msm_gpiomux_install(msm_cdc_reset_config, ARRAY_SIZE(msm_cdc_reset_config)); /* Earjack */ msm_gpiomux_install(msm_earjack_gpio_configs, ARRAY_SIZE(msm_earjack_gpio_configs)); /* MUIC */ msm_gpiomux_install(muic_configs, ARRAY_SIZE(muic_configs)); /* NC */ msm_gpiomux_install(berluti3g_nc_gpio_cfgs, ARRAY_SIZE(berluti3g_nc_gpio_cfgs)); #if defined(CONFIG_MACH_MS01_EUR_LTE) || defined(CONFIG_MACH_MS01_KOR_LTE) msm_gpiomux_install(nc_configs, ARRAY_SIZE(nc_configs)); #endif }
void __init msm8226_init_gpiomux(void) { int rc; rc = msm_gpiomux_init_dt(); if (rc) { pr_err("%s failed %d\n", __func__, rc); return; } /* Battery charging and BMS GPIO */ msm_gpiomux_install(msm_ta_nchg_configs, ARRAY_SIZE(msm_ta_nchg_configs)); #if defined (CONFIG_SEC_ATLANTICLTE_COMMON) msm_gpiomux_install(msm_lte_chg_configs, ARRAY_SIZE(msm_lte_chg_configs)); #endif #if defined (CONFIG_SEC_ATLANTIC_PROJECT) msm_gpiomux_install(msm_chg_det_configs, ARRAY_SIZE(msm_chg_det_configs)); #endif #if !defined (CONFIG_MACH_ATLANTIC3GEUR_OPEN) msm_gpiomux_install(msm_nfc_configs, ARRAY_SIZE(msm_nfc_configs)); #endif #if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) msm_gpiomux_install(msm_eth_configs, ARRAY_SIZE(msm_eth_configs)); #endif #if defined(CONFIG_SEC_ATLANTICLTE_COMMON) msm_gpiomux_install(expander_configs, ARRAY_SIZE(expander_configs)); #endif msm_gpiomux_install(msm_keypad_configs, ARRAY_SIZE(msm_keypad_configs)); if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_blsp_configs, ARRAY_SIZE(msm_skuf_blsp_configs)); else msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs)); msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_goodix_configs, ARRAY_SIZE(msm_skuf_goodix_configs)); else #if defined (CONFIG_MACH_BERLUTI3G_EUR) msm_gpiomux_install(msm_cypress_configs, ARRAY_SIZE(msm_cypress_configs)); msm_gpiomux_install(msm_keyboad_cypress_configs, ARRAY_SIZE(msm_keyboad_cypress_configs)); #else msm_gpiomux_install(msm_cypress_configs, ARRAY_SIZE(msm_cypress_configs)); #endif if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_nfc_configs, ARRAY_SIZE(msm_skuf_nfc_configs)); if (system_rev >= 1) msm_gpiomux_install(msm8974_cover_id_config, ARRAY_SIZE(msm8974_cover_id_config)); else msm_gpiomux_install_nowrite(msm_lcd_configs, ARRAY_SIZE(msm_lcd_configs)); msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs)); #ifdef CONFIG_SENSORS_VFS61XX msm_gpiomux_install(msm_fingerprint_configs, ARRAY_SIZE(msm_fingerprint_configs)); #endif if (of_board_is_skuf()) msm_gpiomux_install(msm_sensor_configs_skuf_plus, ARRAY_SIZE(msm_sensor_configs_skuf_plus)); /* msm_gpiomux_install(msm_auxpcm_configs, ARRAY_SIZE(msm_auxpcm_configs)); if (of_board_is_cdp() || of_board_is_mtp() || of_board_is_xpm()) msm_gpiomux_install(usb_otg_sw_configs, ARRAY_SIZE(usb_otg_sw_configs)); */ msm_gpiomux_install(msm_nativesensors_configs,ARRAY_SIZE(msm_nativesensors_configs)); msm_gpiomux_sdc3_install(); /* * HSIC STROBE gpio is also used by the ethernet. Install HSIC * gpio mux config only when HSIC is enabled. HSIC config will * be disabled when ethernet config is enabled. */ #ifdef CONFIG_USB_EHCI_MSM_HSIC if (machine_is_msm8926()) { msm_hsic_configs[0].gpio = 119; /* STROBE */ msm_hsic_configs[1].gpio = 120; /* DATA */ } msm_gpiomux_install(msm_hsic_configs, ARRAY_SIZE(msm_hsic_configs)); #endif #if defined(CONFIG_SAMSUNG_JACK) msm_gpiomux_install(msm_earjack_gpio_configs, ARRAY_SIZE(msm_earjack_gpio_configs)); #endif #ifdef CONFIG_SND_SOC_ES325_ATLANTIC msm_gpiomux_install(msm_es325_config, ARRAY_SIZE(msm_es325_config)); #endif #ifdef CONFIG_SND_SOC_MAX98504 msm_gpiomux_install(msm8226_tertiary_mi2s_configs,ARRAY_SIZE(msm8226_tertiary_mi2s_configs)); #endif #if defined (CONFIG_MACH_ATLANTIC3GEUR_OPEN) msm_gpiomux_install(nc_configs, ARRAY_SIZE(nc_configs)); #endif /* Install HW_REV GPIO configurations */ msm_gpiomux_install(atlantic_hw_rev_cfgs, ARRAY_SIZE(atlantic_hw_rev_cfgs)); /* Install NC GPIO configurations */ #if defined(CONFIG_MACH_ATLANTICLTE_ATT) msm_gpiomux_install(atlantic_att_nc_gpios, ARRAY_SIZE(atlantic_att_nc_gpios)); #endif }
void __init msm8226_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_keypad_configs, ARRAY_SIZE(msm_keypad_configs)); if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_blsp_configs, ARRAY_SIZE(msm_skuf_blsp_configs)); else msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs)); msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); msm_gpiomux_install(&sd_card_det, 1); if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_goodix_configs, ARRAY_SIZE(msm_skuf_goodix_configs)); else msm_gpiomux_install(msm_melfas_configs, ARRAY_SIZE(msm_melfas_configs)); #if !defined(CONFIG_MACH_DEGASLTE_SBM) if (of_board_is_skuf()) msm_gpiomux_install(msm_skuf_nfc_configs, ARRAY_SIZE(msm_skuf_nfc_configs)); #endif msm_gpiomux_install_nowrite(msm_lcd_configs, ARRAY_SIZE(msm_lcd_configs)); msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs)); if (of_board_is_skuf()) msm_gpiomux_install(msm_sensor_configs_skuf_plus, ARRAY_SIZE(msm_sensor_configs_skuf_plus)); if (of_board_is_cdp() || of_board_is_mtp() || of_board_is_xpm()) msm_gpiomux_install(usb_otg_sw_configs, ARRAY_SIZE(usb_otg_sw_configs)); #if defined (CONFIG_SEC_DEGASLTE_COMMON) msm_gpiomux_install(msm_nativesensors_configs,ARRAY_SIZE(msm_nativesensors_configs)); #if !defined(CONFIG_MACH_DEGASLTE_SBM) msm_gpiomux_install(irled_i2c_scl_config, ARRAY_SIZE(irled_i2c_scl_config)); #endif msm_gpiomux_install(ovp_enable_configs, ARRAY_SIZE(ovp_enable_configs)); #endif msm_gpiomux_sdc3_install(); msm_gpiomux_install(msm_ta_nchg_configs, ARRAY_SIZE(msm_ta_nchg_configs)); msm_gpiomux_install(msm_ta_int_n_configs, ARRAY_SIZE(msm_ta_int_n_configs)); #if defined(CONFIG_SAMSUNG_JACK) msm_gpiomux_install(msm_earjack_gpio_configs, ARRAY_SIZE(msm_earjack_gpio_configs)); #endif if(!poweroff_charging) msm_gpiomux_install(wcdcodec_reset_cfg, ARRAY_SIZE(wcdcodec_reset_cfg)); #ifdef CONFIG_SND_SOC_MAX98504 msm_gpiomux_install(msm8226_tertiary_mi2s_configs,ARRAY_SIZE(msm8226_tertiary_mi2s_configs)); msm_gpiomux_install(msm8226_blsp_codec_configs,ARRAY_SIZE(msm8226_blsp_codec_configs)); msm_gpiomux_install(msm8226_amp_int_configs,ARRAY_SIZE(msm8226_amp_int_configs)); #endif #if defined (CONFIG_MACH_DEGASLTE_SPR) || defined(CONFIG_MACH_DEGASLTE_VZW) || defined(CONFIG_MACH_DEGASLTE_SBM) msm_gpiomux_install(degaslte_spr_nc_gpios, ARRAY_SIZE(degaslte_spr_nc_gpios)); msm_gpiomux_install(degasltespr_gpio_10, ARRAY_SIZE(degasltespr_gpio_10)); #endif #if defined(CONFIG_MACH_DEGASLTE_SBM) msm_gpiomux_install(degaslte_sbm_gpios, ARRAY_SIZE(degaslte_sbm_gpios)); #endif }
void __init msm8226_init_gpiomux(void) { int rc; rc = msm_gpiomux_init_dt(); if (rc) { pr_err("%s failed %d\n", __func__, rc); return; } /* Keypad */ msm_gpiomux_install(msm_keypad_configs, ARRAY_SIZE(msm_keypad_configs)); /* HallSensors */ msm_gpiomux_install(msm_hall_configs, ARRAY_SIZE(msm_hall_configs)); /* BLSP */ msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs)); /* WCNSS */ msm_gpiomux_install(wcnss_5wire_interface, ARRAY_SIZE(wcnss_5wire_interface)); /* TX_GTR */ msm_gpiomux_install(msm8226_tx_gtr_configs, ARRAY_SIZE(msm8226_tx_gtr_configs)); /* LCD */ msm_gpiomux_install_nowrite(msm_lcd_configs, ARRAY_SIZE(msm_lcd_configs)); /* Camera */ msm_gpiomux_install(msm_csensor_configs, ARRAY_SIZE(msm_csensor_configs)); /* Touch */ msm_gpiomux_install(msm_cypress_configs, ARRAY_SIZE(msm_cypress_configs)); /* Touch Key */ msm_gpiomux_install(msm_keyboad_cypress_configs, ARRAY_SIZE(msm_keyboad_cypress_configs)); /* NFC */ msm_gpiomux_install(msm_nfc_configs, ARRAY_SIZE(msm_nfc_configs)); /* Sensors */ msm_gpiomux_install(msm_sensors_configs, ARRAY_SIZE(msm_sensors_configs)); /* Cover ID */ msm_gpiomux_install(msm_cover_id_configs, ARRAY_SIZE(msm_cover_id_configs)); /* SDCC3 */ msm_gpiomux_sdc3_install(); /* Earjack */ msm_gpiomux_install(msm_earjack_gpio_configs, ARRAY_SIZE(msm_earjack_gpio_configs)); /* MUIC */ msm_gpiomux_install(muic_configs, ARRAY_SIZE(muic_configs)); /* HW_REV Pin */ msm_gpiomux_install(hwrev_configs, ARRAY_SIZE(hwrev_configs)); /* TOUCH_3P3_EN */ msm_gpiomux_install(msm8226_touch_3p3_en_configs, ARRAY_SIZE(msm8226_touch_3p3_en_configs)); /* NC */ msm_gpiomux_install(berluti_nc_gpio_cfgs, ARRAY_SIZE(berluti_nc_gpio_cfgs)); }