void __init apq8064_init_mmc(void)
{
	if (apq8064_sdc1_pdata) {
		/* 8064 v2 supports upto 200MHz clock on SDC1 slot */
		if (SOCINFO_VERSION_MAJOR(socinfo_get_version()) >= 2) {
			apq8064_sdc1_pdata->sup_clk_table =
					sdc1_sup_clk_rates_all;
			apq8064_sdc1_pdata->sup_clk_cnt	=
					ARRAY_SIZE(sdc1_sup_clk_rates_all);
		}
		apq8064_add_sdcc(1, apq8064_sdc1_pdata);
		apq8064_add_uio();
	}

	if (apq8064_sdc2_pdata)
		apq8064_add_sdcc(2, apq8064_sdc2_pdata);

	if (apq8064_sdc3_pdata) {
		if (!machine_is_apq8064_cdp()) {
			apq8064_sdc3_pdata->wpswitch_gpio = 0;
			apq8064_sdc3_pdata->is_wpswitch_active_low = false;
		}
		if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
			machine_is_mpq8064_dtv()) {
			int rc;
			struct pm_gpio sd_card_det_init_cfg = {
				.direction      = PM_GPIO_DIR_IN,
				.output_buffer  = PM_GPIO_OUT_BUF_CMOS,
				.pull           = PM_GPIO_PULL_UP_30,
				.vin_sel        = PM_GPIO_VIN_S4,
				.out_strength   = PM_GPIO_STRENGTH_NO,
				.function       = PM_GPIO_FUNC_NORMAL,
			};

			apq8064_sdc3_pdata->status_gpio =
				PM8921_GPIO_PM_TO_SYS(31);
			apq8064_sdc3_pdata->status_irq =
				PM8921_GPIO_IRQ(PM8921_IRQ_BASE, 31);
			rc = pm8xxx_gpio_config(apq8064_sdc3_pdata->status_gpio,
					&sd_card_det_init_cfg);
			if (rc) {
				pr_info("%s: SD_CARD_DET GPIO%d config "
					"failed(%d)\n", __func__,
					apq8064_sdc3_pdata->status_gpio, rc);
				apq8064_sdc3_pdata->status_gpio = 0;
				apq8064_sdc3_pdata->status_irq = 0;
			}
		}
		if (machine_is_apq8064_cdp()) {
			int i;

			for (i = 0;
			     i < apq8064_sdc3_pdata->pin_data->pad_data->\
				 drv->size;
			     i++)
				apq8064_sdc3_pdata->pin_data->pad_data->\
					drv->on[i].val = GPIO_CFG_10MA;
		}
		apq8064_add_sdcc(3, apq8064_sdc3_pdata);
	}
Exemplo n.º 2
0
void __init apq8064_init_mmc(void)
{
	if (apq8064_sdc1_pdata)
		apq8064_add_sdcc(1, apq8064_sdc1_pdata);

	if (apq8064_sdc2_pdata)
		apq8064_add_sdcc(2, apq8064_sdc2_pdata);

	if (apq8064_sdc3_pdata) {
		if (!machine_is_apq8064_cdp()) {
			apq8064_sdc3_pdata->wpswitch_gpio = 0;
			apq8064_sdc3_pdata->is_wpswitch_active_low = false;
		}
		if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
			machine_is_mpq8064_dtv()) {
			int rc;
			struct pm_gpio sd_card_det_init_cfg = {
				.direction      = PM_GPIO_DIR_IN,
				.output_buffer  = PM_GPIO_OUT_BUF_CMOS,
				.pull           = PM_GPIO_PULL_UP_30,
				.vin_sel        = PM_GPIO_VIN_S4,
				.out_strength   = PM_GPIO_STRENGTH_NO,
				.function       = PM_GPIO_FUNC_NORMAL,
			};

			apq8064_sdc3_pdata->status_gpio =
				PM8921_GPIO_PM_TO_SYS(31);
			apq8064_sdc3_pdata->status_irq =
				PM8921_GPIO_IRQ(PM8921_IRQ_BASE, 31);
			rc = pm8xxx_gpio_config(apq8064_sdc3_pdata->status_gpio,
					&sd_card_det_init_cfg);
			if (rc) {
				pr_info("%s: SD_CARD_DET GPIO%d config "
					"failed(%d)\n", __func__,
					apq8064_sdc3_pdata->status_gpio, rc);
				apq8064_sdc3_pdata->status_gpio = 0;
				apq8064_sdc3_pdata->status_irq = 0;
			}
		}
		if (machine_is_apq8064_cdp()) {
			int i;

			for (i = 0;
			     i < apq8064_sdc3_pdata->pin_data->pad_data->\
				 drv->size;
			     i++)
				apq8064_sdc3_pdata->pin_data->pad_data->\
					drv->on[i].val = GPIO_CFG_10MA;
		}
		apq8064_add_sdcc(3, apq8064_sdc3_pdata);
	}
void __init apq8064_init_mmc(void)
{
	if ((machine_is_apq8064_rumi3()) || machine_is_apq8064_sim()) {
		if (apq8064_sdc1_pdata) {
			if (machine_is_apq8064_sim())
				apq8064_sdc1_pdata->disable_bam = true;
			apq8064_sdc1_pdata->disable_runtime_pm = true;
			apq8064_sdc1_pdata->disable_cmd23 = true;
		}
		if (apq8064_sdc3_pdata) {
			if (machine_is_apq8064_sim())
				apq8064_sdc3_pdata->disable_bam = true;
			apq8064_sdc3_pdata->disable_runtime_pm = true;
			apq8064_sdc3_pdata->disable_cmd23 = true;
		}
	}

	if (apq8064_sdc1_pdata)
		apq8064_add_sdcc(1, apq8064_sdc1_pdata);

	if (apq8064_sdc3_pdata) {
		if (!machine_is_apq8064_cdp()) {
			apq8064_sdc3_pdata->wpswitch_gpio = 0;
			apq8064_sdc3_pdata->wpswitch_polarity = 0;
		}
		if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
			machine_is_mpq8064_dtv()) {
			apq8064_sdc3_pdata->status_gpio =
				PM8921_GPIO_PM_TO_SYS(31);
			apq8064_sdc3_pdata->status_irq =
				PM8921_GPIO_IRQ(PM8921_IRQ_BASE, 31);
		}
		apq8064_add_sdcc(3, apq8064_sdc3_pdata);
	}
}
void __init apq8064_init_cam(void)
{
	/* for SGLTE2 platform, do not configure i2c/gpiomux gsbi4 is used for
	 * some other purpose */
	if (socinfo_get_platform_subtype() != PLATFORM_SUBTYPE_SGLTE2) {
		msm_gpiomux_install(apq8064_cam_common_configs,
			ARRAY_SIZE(apq8064_cam_common_configs));
	}

	if (machine_is_apq8064_cdp()) {
		sensor_board_info_imx074.mount_angle = 0;
		sensor_board_info_mt9m114.mount_angle = 0;
	} else if (machine_is_apq8064_liquid())
		sensor_board_info_imx074.mount_angle = 180;

	platform_device_register(&msm_camera_server);
	if (socinfo_get_platform_subtype() != PLATFORM_SUBTYPE_SGLTE2)
		platform_device_register(&msm8960_device_i2c_mux_gsbi4);
	platform_device_register(&msm8960_device_csiphy0);
	platform_device_register(&msm8960_device_csiphy1);
	platform_device_register(&msm8960_device_csid0);
	platform_device_register(&msm8960_device_csid1);
	platform_device_register(&msm8960_device_ispif);
	platform_device_register(&msm8960_device_vfe);
	platform_device_register(&msm8960_device_vpe);
}
void __init apq8064_init_cam(void)
{
//ASUS_BSP +++ LiJen "[A68][13M][NA][Others]Mini porting for 13M camera with ISP"
#if 0
	msm_gpiomux_install(apq8064_cam_common_configs,
			ARRAY_SIZE(apq8064_cam_common_configs));
#endif
//ASUS_BSP --- LiJen "[A68][13M][NA][Others]Mini porting for 13M camera with ISP"

	if (machine_is_apq8064_cdp()) {
		sensor_board_info_imx074.mount_angle = 0;
		sensor_board_info_mt9m114.mount_angle = 0;
	} else if (machine_is_apq8064_liquid())
		sensor_board_info_imx074.mount_angle = 180;

	platform_device_register(&msm_camera_server);
	platform_device_register(&msm8960_device_i2c_mux_gsbi4);
	platform_device_register(&msm8960_device_csiphy0);
	platform_device_register(&msm8960_device_csiphy1);
	platform_device_register(&msm8960_device_csid0);
	platform_device_register(&msm8960_device_csid1);
	platform_device_register(&msm8960_device_ispif);
	platform_device_register(&msm8960_device_vfe);
	platform_device_register(&msm8960_device_vpe);
}
static void __init gpiomux_arrange_all_qct_configs(void)
{
#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
	gpiomux_set_qct_configs(apq8064_ethernet_configs,
			ARRAY_SIZE(apq8064_ethernet_configs));
#endif

	gpiomux_set_qct_configs(wcnss_5wire_interface,
			ARRAY_SIZE(wcnss_5wire_interface));

	gpiomux_set_qct_configs(apq8064_gsbi_configs,
			ARRAY_SIZE(apq8064_gsbi_configs));

	gpiomux_set_qct_configs(apq8064_slimbus_config,
			ARRAY_SIZE(apq8064_slimbus_config));

	gpiomux_set_qct_configs(apq8064_audio_codec_configs,
			ARRAY_SIZE(apq8064_audio_codec_configs));

	pr_debug("%s(): audio-auxpcm: Include GPIO configs"
		" as audio is not the primary user"
		" for these GPIO Pins\n", __func__);

	gpiomux_set_qct_configs(apq8064_ext_regulator_configs,
			ARRAY_SIZE(apq8064_ext_regulator_configs));

	if (machine_is_apq8064_mtp() || machine_is_sony_pollux())
		gpiomux_set_qct_configs(mdm_configs,
			ARRAY_SIZE(mdm_configs));

#ifdef CONFIG_USB_EHCI_MSM_HSIC
	if (machine_is_apq8064_mtp())
		gpiomux_set_qct_configs(cyts_gpio_configs,
				ARRAY_SIZE(cyts_gpio_configs));

	if (machine_is_apq8064_mtp() || machine_is_sony_pollux())
		gpiomux_set_qct_configs(apq8064_hsic_configs,
				ARRAY_SIZE(apq8064_hsic_configs));
#endif

	if (machine_is_apq8064_cdp() || machine_is_apq8064_liquid())
		gpiomux_set_qct_configs(apq8064_mxt_configs,
			ARRAY_SIZE(apq8064_mxt_configs));

	gpiomux_set_qct_configs(apq8064_hdmi_configs,
			ARRAY_SIZE(apq8064_hdmi_configs));

#ifdef CONFIG_MMC_MSM_SDC2_SUPPORT
	gpiomux_set_qct_configs(apq8064_sdc2_configs,
			     ARRAY_SIZE(apq8064_sdc2_configs));
#endif

#ifdef CONFIG_MMC_MSM_SDC4_SUPPORT
	gpiomux_set_qct_configs(apq8064_sdc4_configs,
			     ARRAY_SIZE(apq8064_sdc4_configs));
#endif

	gpiomux_set_qct_configs(apq8064_sdc3_configs,
			ARRAY_SIZE(apq8064_sdc3_configs));
}
void __init apq8064_init_cam(void)
{
	/* for SGLTE2 platform, do not configure i2c/gpiomux gsbi4 is used for
	 * some other purpose */
	if (socinfo_get_platform_subtype() != PLATFORM_SUBTYPE_SGLTE2)
	{
/* OPPO 2013-07-24 liubin Modify for N1 not configure i2c start */
#ifdef CONFIG_VENDOR_EDIT
		if (get_pcb_version() >= PCB_VERSION_EVT_N1)
		{
			msm_gpiomux_install(apq8064_cam_common_configs_n1,
				ARRAY_SIZE(apq8064_cam_common_configs_n1));
		}
		else
		{
#endif
			msm_gpiomux_install(apq8064_cam_common_configs,
				ARRAY_SIZE(apq8064_cam_common_configs));
#ifdef CONFIG_VENDOR_EDIT
		}
#endif
/* OPPO 2013-07-24 liubin Modify end */
	}

	if (machine_is_apq8064_cdp()) {
		sensor_board_info_imx074.mount_angle = 0;
		sensor_board_info_mt9m114.mount_angle = 0;
	} else if (machine_is_apq8064_liquid())
		sensor_board_info_imx074.mount_angle = 180;

	platform_device_register(&msm_camera_server);
	if (socinfo_get_platform_subtype() != PLATFORM_SUBTYPE_SGLTE2)
	{
/* OPPO 2013-07-24 liubin Modify for N1 not configure i2c start */
#ifdef CONFIG_VENDOR_EDIT
		if (get_pcb_version() >= PCB_VERSION_EVT_N1)
		{
			platform_device_register(&msm8064_device_i2c_mux_gsbi7);	
		}
		else
		{
#endif
			platform_device_register(&msm8960_device_i2c_mux_gsbi4);
#ifdef CONFIG_VENDOR_EDIT
		}
#endif
/* OPPO 2013-07-24 liubin Modify end */
	}

	platform_device_register(&msm8960_device_csiphy0);
	platform_device_register(&msm8960_device_csiphy1);
	platform_device_register(&msm8960_device_csid0);
	platform_device_register(&msm8960_device_csid1);
	platform_device_register(&msm8960_device_ispif);
	platform_device_register(&msm8960_device_vfe);
	platform_device_register(&msm8960_device_vpe);
}
static int msm_fb_detect_panel(const char *name)
{
	/* OPPO 2012-07-24 zhengzk Modify for MIPI start */
#ifndef CONFIG_VENDOR_EDIT
	u32 version;
	if (machine_is_apq8064_liquid()) {
		version = socinfo_get_platform_version();
		if ((SOCINFO_VERSION_MAJOR(version) == 1) &&
			(SOCINFO_VERSION_MINOR(version) == 1)) {
			if (!strncmp(name, MIPI_VIDEO_CHIMEI_WXGA_PANEL_NAME,
				strnlen(MIPI_VIDEO_CHIMEI_WXGA_PANEL_NAME,
					PANEL_NAME_MAX_LEN)))
				return 0;
		} else {
			if (!strncmp(name, LVDS_CHIMEI_PANEL_NAME,
				strnlen(LVDS_CHIMEI_PANEL_NAME,
					PANEL_NAME_MAX_LEN)))
				return 0;
		}
	} else if (machine_is_apq8064_mtp()) {
		if (!strncmp(name, MIPI_VIDEO_TOSHIBA_WSVGA_PANEL_NAME,
			strnlen(MIPI_VIDEO_TOSHIBA_WSVGA_PANEL_NAME,
				PANEL_NAME_MAX_LEN)))
			return 0;
	} else if (machine_is_apq8064_cdp()) {
		if (!strncmp(name, LVDS_CHIMEI_PANEL_NAME,
			strnlen(LVDS_CHIMEI_PANEL_NAME,
				PANEL_NAME_MAX_LEN)))
			return 0;
	} else if (machine_is_mpq8064_dtv()) {
		if (!strncmp(name, LVDS_FRC_PANEL_NAME,
			strnlen(LVDS_FRC_PANEL_NAME,
			PANEL_NAME_MAX_LEN))) {
			set_mdp_clocks_for_wuxga();
			return 0;
		}
	}
#else
	if (!strncmp(name, MIPI_VIDEO_ORISE_OPPO_PANEL_NAME,
		strnlen(MIPI_VIDEO_ORISE_OPPO_PANEL_NAME,
			PANEL_NAME_MAX_LEN)))
		return 0;
#endif
/* OPPO 2012-07-24 zhengzk Modify for MIPI end */

	if (!strncmp(name, HDMI_PANEL_NAME,
			strnlen(HDMI_PANEL_NAME,
				PANEL_NAME_MAX_LEN))) {
		if (apq8064_hdmi_as_primary_selected())
			set_mdp_clocks_for_wuxga();
		return 0;
	}


	return -ENODEV;
}
static int lvds_pixel_remap(void)
{
	if (machine_is_apq8064_cdp() ||
	    machine_is_apq8064_liquid()) {
		u32 ver = socinfo_get_platform_version(); //+++ ASUS_BSP : miniporting
		if ((SOCINFO_VERSION_MAJOR(ver) == 1) &&
		    (SOCINFO_VERSION_MINOR(ver) == 0))
			return 1;
	}
	return 0;
}
static int lvds_pixel_remap(void)
{
	if (machine_is_apq8064_cdp() ||
	    machine_is_apq8064_liquid()) {
		u32 ver = socinfo_get_version();
		if ((SOCINFO_VERSION_MAJOR(ver) == 1) &&
		    (SOCINFO_VERSION_MINOR(ver) == 0))
			return 1;
	}
	return 0;
}
static int lvds_pixel_remap(void)
{
	if (machine_is_apq8064_cdp() ||
	    machine_is_apq8064_liquid()) {
		u32 ver = socinfo_get_version();
		if ((SOCINFO_VERSION_MAJOR(ver) == 1) &&
		    (SOCINFO_VERSION_MINOR(ver) == 0))
			return LVDS_PIXEL_MAP_PATTERN_1;
	} else if (machine_is_mpq8064_dtv()) {
		return LVDS_PIXEL_MAP_PATTERN_2;
	}
	return 0;
}
static int msm_fb_detect_panel(const char *name)
{
	u32 version;
	if (machine_is_apq8064_liquid()) {
		version = socinfo_get_platform_version();
		if ((SOCINFO_VERSION_MAJOR(version) == 1) &&
			(SOCINFO_VERSION_MINOR(version) == 1)) {
			if (!strncmp(name, MIPI_VIDEO_CHIMEI_WXGA_PANEL_NAME,
				strnlen(MIPI_VIDEO_CHIMEI_WXGA_PANEL_NAME,
					PANEL_NAME_MAX_LEN)))
				return 0;
		} else {
			if (!strncmp(name, LVDS_CHIMEI_PANEL_NAME,
				strnlen(LVDS_CHIMEI_PANEL_NAME,
					PANEL_NAME_MAX_LEN)))
				return 0;
		}
	} else if (machine_is_apq8064_mtp()) {
		if (!strncmp(name, MIPI_VIDEO_TOSHIBA_WSVGA_PANEL_NAME,
			strnlen(MIPI_VIDEO_TOSHIBA_WSVGA_PANEL_NAME,
				PANEL_NAME_MAX_LEN)))
			return 0;
	} else if (machine_is_apq8064_cdp()) {
		if (!strncmp(name, LVDS_CHIMEI_PANEL_NAME,
			strnlen(LVDS_CHIMEI_PANEL_NAME,
				PANEL_NAME_MAX_LEN)))
			return 0;
	} else if (machine_is_mpq8064_dtv()) {
		if (!strncmp(name, LVDS_FRC_PANEL_NAME,
			strnlen(LVDS_FRC_PANEL_NAME,
			PANEL_NAME_MAX_LEN))) {
			set_mdp_clocks_for_wuxga();
			return 0;
		}
	}

	if (!strncmp(name, HDMI_PANEL_NAME,
			strnlen(HDMI_PANEL_NAME,
				PANEL_NAME_MAX_LEN))) {
		if (apq8064_hdmi_as_primary_selected())
			set_mdp_clocks_for_wuxga();
		return 0;
	}


	return -ENODEV;
}
void __init apq8064_init_cam(void)
{
    printk(KERN_DEBUG "[JC] %s: In\n", __func__);

    msm_gpiomux_install(apq8064_cam_common_configs,
                        ARRAY_SIZE(apq8064_cam_common_configs));

    /*config gpio*/
    /*pm gpio config for sleep state*/
    pm8xxx_gpio_config(GPIO_VT_CAM_ID, &cam_init_in_cfg);
    pm8xxx_gpio_config(GPIO_13M_CAM_RESET, &cam_init_out_cfg);
    pm8xxx_gpio_config(GPIO_CAM_AF_EN, &cam_init_out_cfg);
    pm8xxx_gpio_config(GPIO_VT_CAM_STBY, &cam_init_out_cfg);
#if defined(CONFIG_MACH_JACTIVE_ATT) || defined(CONFIG_MACH_JACTIVE_EUR)
#else
    pm8xxx_gpio_config(GPIO_CAM_ISP_INT, &cam_init_in_cfg);
#endif

    pm8xxx_gpio_config(GPIO_CAM_A_EN2, &cam_init_out_cfg);
    pm8xxx_gpio_config(GPIO_CAM_SENSOR_DET, &cam_rear_det);

    /* temp: need to set low because bootloader make high signal. */
    pmic_gpio_ctrl(GPIO_CAM_VT_EN, 0);
    printk(KERN_DEBUG "[S5K6B2YX] %s: GPIO_CAM_VT_EN: 0\n", __func__);

    if (machine_is_apq8064_cdp()) {
        sensor_board_info_imx074.mount_angle = 0;
        sensor_board_info_mt9m114.mount_angle = 0;
    } else if (machine_is_apq8064_liquid())
        sensor_board_info_imx074.mount_angle = 180;
    spi_register_board_info(jc_spi_info,
                            ARRAY_SIZE(jc_spi_info));

    platform_device_register(&msm_camera_server);
#if !defined (CONFIG_CAMERA_USE_GSBI7)
    platform_device_register(&msm8960_device_i2c_mux_gsbi4);
#endif
    platform_device_register(&msm8960_device_csiphy0);
    platform_device_register(&msm8960_device_csiphy1);
    platform_device_register(&msm8960_device_csid0);
    platform_device_register(&msm8960_device_csid1);
    platform_device_register(&msm8960_device_ispif);
    platform_device_register(&msm8960_device_vfe);
    platform_device_register(&msm8960_device_vpe);
}
void __init apq8064_init_cam(void)
{
	msm_gpiomux_install(apq8064_cam_common_configs,
			ARRAY_SIZE(apq8064_cam_common_configs));

	if (machine_is_apq8064_cdp()) {
		sensor_board_info_imx074.mount_angle = 0;
		sensor_board_info_mt9m114.mount_angle = 0;
	} else if (machine_is_apq8064_liquid())
		sensor_board_info_imx074.mount_angle = 180;

	platform_device_register(&msm_camera_server);
	platform_device_register(&msm8960_device_i2c_mux_gsbi4);
	platform_device_register(&msm8960_device_csiphy0);
	platform_device_register(&msm8960_device_csiphy1);
	platform_device_register(&msm8960_device_csid0);
	platform_device_register(&msm8960_device_csid1);
	platform_device_register(&msm8960_device_ispif);
	platform_device_register(&msm8960_device_vfe);
	platform_device_register(&msm8960_device_vpe);
}
void __init apq8064_init_gpiomux(void)
{
	int rc;
	int platform_version = socinfo_get_platform_version();
#ifdef CONFIG_MACH_ASUSTEK
	hw_rev revision = HW_REV_INVALID;
	revision = asustek_get_hw_rev();
#endif
	rc = msm_gpiomux_init(NR_GPIO_IRQS);
	if (rc) {
		pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc);
		return;
	}

	msm_gpiomux_install(msm8960_mdp_vsync_configs,
			ARRAY_SIZE(msm8960_mdp_vsync_configs));

	msm_gpiomux_install(wcnss_5wire_interface,
			ARRAY_SIZE(wcnss_5wire_interface));

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		 machine_is_mpq8064_dtv()) {
		msm_gpiomux_install(mpq8064_gsbi5_i2c_configs,
				ARRAY_SIZE(mpq8064_gsbi5_i2c_configs));
#ifdef CONFIG_MSM_VCAP
		msm_gpiomux_install(vcap_configs,
				ARRAY_SIZE(vcap_configs));
#endif
		msm_gpiomux_install(sx150x_int_configs,
				ARRAY_SIZE(sx150x_int_configs));
	} else {
		#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
		msm_gpiomux_install(apq8064_ethernet_configs,
				ARRAY_SIZE(apq8064_ethernet_configs));
		#endif

		msm_gpiomux_install(apq8064_gsbi_configs,
				ARRAY_SIZE(apq8064_gsbi_configs));
	}

#ifdef CONFIG_MACH_ASUSTEK
	if (machine_is_apq8064_flo() || machine_is_apq8064_deb()) {
		msm_gpiomux_install(asustek_pcbid_pins_configs,
			ARRAY_SIZE(asustek_pcbid_pins_configs));

		if (revision == HW_REV_B) {
			msm_gpiomux_install(asustek_gpio_keys_configs,
				ARRAY_SIZE(asustek_gpio_keys_configs));
		}

		msm_gpiomux_install(asustek_pwr_keys_configs,
			ARRAY_SIZE(asustek_pwr_keys_configs));
	}
#endif

	msm_gpiomux_install(gpio_bat_low_configs,
			ARRAY_SIZE(gpio_bat_low_configs));


	msm_gpiomux_install(apq8064_slimbus_config,
			ARRAY_SIZE(apq8064_slimbus_config));

	msm_gpiomux_install(apq8064_audio_codec_configs,
			ARRAY_SIZE(apq8064_audio_codec_configs));

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		machine_is_mpq8064_dtv()) {
		msm_gpiomux_install(mpq8064_spkr_i2s_config,
			ARRAY_SIZE(mpq8064_spkr_i2s_config));
	}

	pr_debug("%s(): audio-auxpcm: Include GPIO configs"
		" as audio is not the primary user"
		" for these GPIO Pins\n", __func__);

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		machine_is_mpq8064_dtv())
		msm_gpiomux_install(mpq8064_mi2s_configs,
			ARRAY_SIZE(mpq8064_mi2s_configs));
/*
	msm_gpiomux_install(apq8064_ext_regulator_configs,
			ARRAY_SIZE(apq8064_ext_regulator_configs));
*/
	if (machine_is_apq8064_flo() || machine_is_apq8064_deb()) {
		if (SOCINFO_VERSION_MINOR(platform_version) == 1)
			msm_gpiomux_install(mdm_i2s_configs,
					ARRAY_SIZE(mdm_i2s_configs));
		else
			msm_gpiomux_install(mdm_configs,
					ARRAY_SIZE(mdm_configs));
	}

	if (machine_is_apq8064_flo() || machine_is_apq8064_deb()) {
		if (SOCINFO_VERSION_MINOR(platform_version) == 1) {
			msm_gpiomux_install(cyts_gpio_alt_config,
					ARRAY_SIZE(cyts_gpio_alt_config));
		} else {
			msm_gpiomux_install(cyts_gpio_configs,
					ARRAY_SIZE(cyts_gpio_configs));
		}
	}

#ifdef CONFIG_USB_EHCI_MSM_HSIC
	if (machine_is_apq8064_flo() || machine_is_apq8064_deb())
		msm_gpiomux_install(apq8064_hsic_configs,
				ARRAY_SIZE(apq8064_hsic_configs));
#endif

	if (machine_is_apq8064_cdp() || machine_is_apq8064_liquid())
		msm_gpiomux_install(apq8064_mxt_configs,
			ARRAY_SIZE(apq8064_mxt_configs));

	msm_gpiomux_install(apq8064_hdmi_configs,
			ARRAY_SIZE(apq8064_hdmi_configs));

	 if (machine_is_mpq8064_cdp())
		msm_gpiomux_install(mpq8064_ir_configs,
				ARRAY_SIZE(mpq8064_ir_configs));

#ifdef CONFIG_MMC_MSM_SDC2_SUPPORT
	 msm_gpiomux_install(apq8064_sdc2_configs,
			     ARRAY_SIZE(apq8064_sdc2_configs));
#endif

#ifdef CONFIG_MMC_MSM_SDC4_SUPPORT
	 msm_gpiomux_install(apq8064_sdc4_configs,
			     ARRAY_SIZE(apq8064_sdc4_configs));
#endif

#ifdef CONFIG_MMC_MSM_SDC3_SUPPORT
	msm_gpiomux_install(apq8064_sdc3_configs,
			ARRAY_SIZE(apq8064_sdc3_configs));
#endif
	//add touch
	msm_gpiomux_install(msm8064_ts_gpio_config,
			ARRAY_SIZE(msm8064_ts_gpio_config));  

	msm_gpiomux_install(smb345_pin_configs,
			ARRAY_SIZE(smb345_pin_configs));

	switch (revision) {
	case HW_REV_B:
	case HW_REV_C:
	case HW_REV_D:
	case HW_REV_E:
		msm_gpiomux_install(wpc_pok_configs,
			ARRAY_SIZE(wpc_pok_configs));
		break;
	default:
		break;
	}

	if (machine_is_apq8064_flo() || machine_is_apq8064_deb())
		msm_gpiomux_install(apq8064_bcm2079x_nfc_configs,
			ARRAY_SIZE(apq8064_bcm2079x_nfc_configs));
#ifdef CONFIG_SLIMPORT_ANX7808
	msm_gpiomux_install(msm8064_sp_gpio_config,
			ARRAY_SIZE(msm8064_sp_gpio_config));
#endif
	msm_gpiomux_install(apq8064_headphone_configs,
			ARRAY_SIZE(apq8064_headphone_configs));

	msm_gpiomux_install(asustek_gsbi4_configs,
		ARRAY_SIZE(asustek_gsbi4_configs));

#ifdef CONFIG_INPUT_LID
	if (machine_is_apq8064_flo() || machine_is_apq8064_deb()) {
		if ((revision == HW_REV_C) || (revision == HW_REV_D) || (revision == HW_REV_E)) {
			msm_gpiomux_install(asustek_hall_sensor_configs,
			ARRAY_SIZE(asustek_hall_sensor_configs));
		}
	}
#endif

}
void __init apq8064_init_gpiomux(void)
{
	int rc;
	int platform_version = socinfo_get_platform_version();
#ifdef CONFIG_MACH_APQ8064_ALTEV
	hw_rev_type lge_bd_rev = HW_REV_EVB1;//                                             
#endif
	rc = msm_gpiomux_init(NR_GPIO_IRQS);
	if (rc) {
		pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc);
		return;
	}
#ifdef CONFIG_SWITCH_MAX1462X
       msm_gpiomux_install(apq8064_earjack_configs,
                            ARRAY_SIZE(apq8064_earjack_configs));
#endif

	msm_gpiomux_install(wcnss_5wire_interface,
			ARRAY_SIZE(wcnss_5wire_interface));

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		 machine_is_mpq8064_dtv()) {
		msm_gpiomux_install(mpq8064_gsbi5_i2c_configs,
				ARRAY_SIZE(mpq8064_gsbi5_i2c_configs));
#ifdef CONFIG_MSM_VCAP
		msm_gpiomux_install(vcap_configs,
				ARRAY_SIZE(vcap_configs));
#endif
		msm_gpiomux_install(sx150x_int_configs,
				ARRAY_SIZE(sx150x_int_configs));
	} else {
		#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
		msm_gpiomux_install(apq8064_ethernet_configs,
				ARRAY_SIZE(apq8064_ethernet_configs));
		#endif

		msm_gpiomux_install(apq8064_gsbi_configs,
				ARRAY_SIZE(apq8064_gsbi_configs));

#if !defined(CONFIG_MACH_LGE)
		if (!(machine_is_apq8064_mtp() &&
		(SOCINFO_VERSION_MINOR(platform_version) == 1)))
			msm_gpiomux_install(apq8064_non_mi2s_gsbi_configs,
				ARRAY_SIZE(apq8064_non_mi2s_gsbi_configs));
#endif
	}
	if (machine_is_apq8064_mtp() &&
	(SOCINFO_VERSION_MINOR(platform_version) == 1)) {
			msm_gpiomux_install(apq8064_mic_i2s_configs,
				ARRAY_SIZE(apq8064_mic_i2s_configs));
			msm_gpiomux_install(apq8064_spkr_i2s_configs,
				ARRAY_SIZE(apq8064_spkr_i2s_configs));
			msm_gpiomux_install(apq8064_mi2s_configs,
				ARRAY_SIZE(apq8064_mi2s_configs));
			msm_gpiomux_install(apq8064_gsbi1_i2c_2ma_configs,
				ARRAY_SIZE(apq8064_gsbi1_i2c_2ma_configs));
	} else {
		msm_gpiomux_install(apq8064_slimbus_config,
				ARRAY_SIZE(apq8064_slimbus_config));
		msm_gpiomux_install(apq8064_gsbi1_i2c_8ma_configs,
				ARRAY_SIZE(apq8064_gsbi1_i2c_8ma_configs));
	}

#if defined(CONFIG_LGE_IRRC)
       msm_gpiomux_install(apq8064_irrc_configs,
                     ARRAY_SIZE(apq8064_irrc_configs));
       pr_debug("[IRRC] gpiomux_install");
#endif

#if defined(CONFIG_ANDROID_SW_IRRC)
		msm_gpiomux_install(apq8064_irrc_tx_configs,
			ARRAY_SIZE(apq8064_irrc_tx_configs));
	pr_debug("[SW IRRC] gpiomux_install");
#endif


#if defined(CONFIG_SND_SOC_TPA2028D_DUAL_SPEAKER)
	msm_gpiomux_install(apq8064_gsbi7_i2c_8ma_configs,
					ARRAY_SIZE(apq8064_gsbi7_i2c_8ma_configs));
	pr_debug("[DUAL AMP] gpiomux_install");
#endif

	msm_gpiomux_install(apq8064_audio_codec_configs,
			ARRAY_SIZE(apq8064_audio_codec_configs));

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		machine_is_mpq8064_dtv()) {
		msm_gpiomux_install(mpq8064_spkr_i2s_config,
			ARRAY_SIZE(mpq8064_spkr_i2s_config));
	}

	pr_debug("%s(): audio-auxpcm: Include GPIO configs"
		" as audio is not the primary user"
		" for these GPIO Pins\n", __func__);

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		machine_is_mpq8064_dtv())
		msm_gpiomux_install(mpq8064_mi2s_configs,
			ARRAY_SIZE(mpq8064_mi2s_configs));


// kyle00.choi, 20130402, To feature out the modem. [START]
#if defined(CONFIG_MODEM_SUPPORT)
	if (machine_is_apq8064_mtp()) {
		if (SOCINFO_VERSION_MINOR(platform_version) == 1)
			msm_gpiomux_install(mdm_i2s_configs,
					ARRAY_SIZE(mdm_i2s_configs));

	}
#endif
// kyle00.choi, 20130402, To feature out the modem. [START]

#ifdef CONFIG_USB_EHCI_MSM_HSIC
	if (machine_is_apq8064_mtp()) {
		if (SOCINFO_VERSION_MINOR(platform_version) == 1) {
			msm_gpiomux_install(cyts_gpio_alt_config,
					ARRAY_SIZE(cyts_gpio_alt_config));
		} else {
			msm_gpiomux_install(cyts_gpio_configs,
					ARRAY_SIZE(cyts_gpio_configs));
		}
	}

	if (machine_is_apq8064_mtp())
		msm_gpiomux_install(apq8064_hsic_configs,
				ARRAY_SIZE(apq8064_hsic_configs));
#endif
/*                                  */
#if defined(CONFIG_LGE_NFC)
		msm_gpiomux_install(apq8064_nfc_configs,
		ARRAY_SIZE(apq8064_nfc_configs));
#endif
/*                                */ 

//                                                                   
//                                             
//ADD: 0019632: [F200][BT] Bluetooth board bring-up
#ifdef CONFIG_LGE_BLUESLEEP
	msm_gpiomux_install(bt_pcm_configs,
			ARRAY_SIZE(bt_pcm_configs));
	msm_gpiomux_install(mpq8064_uartdm_configs,
			ARRAY_SIZE(mpq8064_uartdm_configs));
/* 	msm_gpiomux_install(gsbi6_uart_configs,
		 	ARRAY_SIZE(gsbi6_uart_configs)); */

	msm_gpiomux_install(msm8960_bt_host_wakeup_configs,
			ARRAY_SIZE(msm8960_bt_host_wakeup_configs));

	msm_gpiomux_install(msm8960_bt_wakeup_configs,
			ARRAY_SIZE(msm8960_bt_wakeup_configs));
#endif
//                                           
//                                                                   
	if (machine_is_apq8064_cdp() || machine_is_apq8064_liquid())
		msm_gpiomux_install(apq8064_mxt_configs,
			ARRAY_SIZE(apq8064_mxt_configs));

	msm_gpiomux_install(apq8064_hdmi_configs,
			ARRAY_SIZE(apq8064_hdmi_configs));
//                                                                          
//                                                          
#if defined (CONFIG_SLIMPORT_ANX7808)
        msm_gpiomux_install(apq8064_slimport_configs,
			ARRAY_SIZE(apq8064_slimport_configs));
    pr_err("[Slimport] revision = %d gpiomux install complete!\n", lge_get_board_revno());
#endif
//                                                        
//                                                                        

#if !defined (CONFIG_MACH_LGE)
	if (apq8064_mhl_display_enabled())
		msm_gpiomux_install(apq8064_mhl_configs,
				ARRAY_SIZE(apq8064_mhl_configs));
#endif

	 if (machine_is_mpq8064_cdp())
		msm_gpiomux_install(mpq8064_ir_configs,
				ARRAY_SIZE(mpq8064_ir_configs));

#ifdef CONFIG_MMC_MSM_SDC2_SUPPORT
	msm_gpiomux_install(apq8064_sdc2_configs,
			     ARRAY_SIZE(apq8064_sdc2_configs));
#else
		msm_gpiomux_install(apq8064_sdc2_not_configs,
				     ARRAY_SIZE(apq8064_sdc2_not_configs));
#endif

#ifdef CONFIG_MMC_MSM_SDC4_SUPPORT
	 msm_gpiomux_install(apq8064_sdc4_configs,
			     ARRAY_SIZE(apq8064_sdc4_configs));
#endif
	 	msm_gpiomux_install(apq8064_sdc3_configs_chg,
				ARRAY_SIZE(apq8064_sdc3_configs_chg));
				


#if defined(CONFIG_BATTERY_MAX17043) || defined(CONFIG_BATTERY_MAX17047) || defined(CONFIG_BATTERY_MAX17048)
		msm_gpiomux_install(apq8064_fuel_gauge_configs,
				ARRAY_SIZE(apq8064_fuel_gauge_configs));
#endif

#if defined(CONFIG_BQ24262_CHARGER)
	msm_gpiomux_install(mpq8064_gsbi5_i2c_configs,
			ARRAY_SIZE(mpq8064_gsbi5_i2c_configs));
#endif

//                                             

}
void __init apq8064_init_gpiomux(void)
{
	int rc;

	rc = msm_gpiomux_init(NR_GPIO_IRQS);
	if (rc) {
		pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc);
		return;
	}

	msm_gpiomux_install(wcnss_5wire_interface,
			ARRAY_SIZE(wcnss_5wire_interface));

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		 machine_is_mpq8064_dtv()) {
/* OPPO 2012-08-29 chenzj Delete begin for del unused code */
#if 0
		msm_gpiomux_install(mpq8064_gsbi5_i2c_configs,
				ARRAY_SIZE(mpq8064_gsbi5_i2c_configs));
#endif
/* OPPO 2012-08-29 chenzj Delete end */
#ifdef CONFIG_MSM_VCAP
		msm_gpiomux_install(vcap_configs,
				ARRAY_SIZE(vcap_configs));
#endif
//OPPO 2012-12-18 huyu del for lcd 5V_enable for dvt
#ifndef CONFIG_VENDOR_EDIT
		msm_gpiomux_install(sx150x_int_configs,
				ARRAY_SIZE(sx150x_int_configs));
#endif
//OPPO 2012-12-18 huyu del for lcd 5V_enable for dvt
	} else {
		#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
		msm_gpiomux_install(apq8064_ethernet_configs,
				ARRAY_SIZE(apq8064_ethernet_configs));
		#endif

		msm_gpiomux_install(apq8064_gsbi_configs,
				ARRAY_SIZE(apq8064_gsbi_configs));
/* OPPO 2012-12-14 yxq added begin for s5k6a3yx's I2C */
		if (get_pcb_version() >= 30) {
			msm_gpiomux_install(apq8064_gsbi7_i2c_config, ARRAY_SIZE(apq8064_gsbi7_i2c_config));
		}
/* OPPO 2012-12-14 yxq added end */
	}

	msm_gpiomux_install(apq8064_slimbus_config,
			ARRAY_SIZE(apq8064_slimbus_config));

	msm_gpiomux_install(apq8064_audio_codec_configs,
			ARRAY_SIZE(apq8064_audio_codec_configs));

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		machine_is_mpq8064_dtv()) {
		msm_gpiomux_install(mpq8064_spkr_i2s_config,
			ARRAY_SIZE(mpq8064_spkr_i2s_config));
	}

	pr_debug("%s(): audio-auxpcm: Include GPIO configs"
		" as audio is not the primary user"
		" for these GPIO Pins\n", __func__);

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		machine_is_mpq8064_dtv())
		msm_gpiomux_install(mpq8064_mi2s_configs,
			ARRAY_SIZE(mpq8064_mi2s_configs));

	msm_gpiomux_install(apq8064_ext_regulator_configs,
			ARRAY_SIZE(apq8064_ext_regulator_configs));

//OPPO 2012-11-2 huyu add for lcd backlight enabl
#ifdef CONFIG_VENDOR_EDIT
	msm_gpiomux_install(apq8064_backlight_enable,
			ARRAY_SIZE(apq8064_backlight_enable));
#endif
//OPPO 2012-11-2 huyu add for lcd backlight enabl
	if (machine_is_apq8064_mtp())
		msm_gpiomux_install(mdm_configs,
			ARRAY_SIZE(mdm_configs));

#ifdef CONFIG_USB_EHCI_MSM_HSIC
	if (machine_is_apq8064_mtp())
		msm_gpiomux_install(cyts_gpio_configs,
				ARRAY_SIZE(cyts_gpio_configs));

	if (machine_is_apq8064_mtp())
		msm_gpiomux_install(apq8064_hsic_configs,
				ARRAY_SIZE(apq8064_hsic_configs));
#endif

	if (machine_is_apq8064_cdp() || machine_is_apq8064_liquid())
		msm_gpiomux_install(apq8064_mxt_configs,
			ARRAY_SIZE(apq8064_mxt_configs));

	msm_gpiomux_install(apq8064_hdmi_configs,
			ARRAY_SIZE(apq8064_hdmi_configs));
	
/* OPPO 2012-11-14 DuYuanHua Add to config GPIO_72 as input pin for sim card detection */
#ifdef OPPO_FEATURE_UIM_CARD_HOTSWAP
	msm_gpiomux_install(apq8064_uim_card_detection_configs,
			ARRAY_SIZE(apq8064_uim_card_detection_configs));
#endif
/* OPPO 2012-11-14 DuYuanHua Add End*/

	 if (machine_is_mpq8064_cdp())
		msm_gpiomux_install(mpq8064_ir_configs,
				ARRAY_SIZE(mpq8064_ir_configs));

#ifdef CONFIG_MMC_MSM_SDC2_SUPPORT
	 msm_gpiomux_install(apq8064_sdc2_configs,
			     ARRAY_SIZE(apq8064_sdc2_configs));
#endif

#ifdef CONFIG_MMC_MSM_SDC4_SUPPORT
	 msm_gpiomux_install(apq8064_sdc4_configs,
			     ARRAY_SIZE(apq8064_sdc4_configs));
#endif

	msm_gpiomux_install(apq8064_sdc3_configs,
			ARRAY_SIZE(apq8064_sdc3_configs));
}
void __init apq8064_init_gpiomux(void)
{
	int rc;
	int platform_version = socinfo_get_platform_version();

	rc = msm_gpiomux_init(NR_GPIO_IRQS);
	if (rc) {
		pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc);
		return;
	}
	if (!(machine_is_mpq8064_hrd()))
		msm_gpiomux_install(wcnss_5wire_interface,
				ARRAY_SIZE(wcnss_5wire_interface));

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		 machine_is_mpq8064_dtv()) {
		msm_gpiomux_install(mpq8064_gsbi5_i2c_configs,
				ARRAY_SIZE(mpq8064_gsbi5_i2c_configs));
		msm_gpiomux_install(mpq8064_gsbi5_uart_configs,
				ARRAY_SIZE(mpq8064_gsbi5_uart_configs));
#ifdef CONFIG_MSM_VCAP
		msm_gpiomux_install(vcap_configs,
				ARRAY_SIZE(vcap_configs));
#endif
		msm_gpiomux_install(sx150x_int_configs,
				ARRAY_SIZE(sx150x_int_configs));
	} else {
		#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
		msm_gpiomux_install(apq8064_ethernet_configs,
				ARRAY_SIZE(apq8064_ethernet_configs));
		#endif

		if (machine_is_fsm8064_ep())
			msm_gpiomux_install(fsm8064_ep_gsbi_configs,
					ARRAY_SIZE(fsm8064_ep_gsbi_configs));
		else
			msm_gpiomux_install(apq8064_gsbi_configs,
					ARRAY_SIZE(apq8064_gsbi_configs));

		if (!(machine_is_apq8064_mtp() &&
		(SOCINFO_VERSION_MINOR(platform_version) == 1)))
			msm_gpiomux_install(apq8064_non_mi2s_gsbi_configs,
				ARRAY_SIZE(apq8064_non_mi2s_gsbi_configs));
	}
	if (machine_is_apq8064_mtp() &&
	(SOCINFO_VERSION_MINOR(platform_version) == 1)) {
			msm_gpiomux_install(apq8064_mic_i2s_configs,
				ARRAY_SIZE(apq8064_mic_i2s_configs));
			msm_gpiomux_install(apq8064_spkr_i2s_configs,
				ARRAY_SIZE(apq8064_spkr_i2s_configs));
			msm_gpiomux_install(apq8064_mi2s_configs,
				ARRAY_SIZE(apq8064_mi2s_configs));
			msm_gpiomux_install(apq8064_gsbi1_i2c_2ma_configs,
				ARRAY_SIZE(apq8064_gsbi1_i2c_2ma_configs));
	} else {
		if (!machine_is_fsm8064_ep()) {
			msm_gpiomux_install(apq8064_slimbus_config,
				ARRAY_SIZE(apq8064_slimbus_config));
		}
	}

	if (!(machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		 machine_is_mpq8064_dtv()) && !machine_is_apq8064_mtp()) {
		msm_gpiomux_install(apq8064_gsbi1_i2c_8ma_configs,
				ARRAY_SIZE(apq8064_gsbi1_i2c_8ma_configs));
	}

	msm_gpiomux_install(apq8064_audio_codec_configs,
			ARRAY_SIZE(apq8064_audio_codec_configs));

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		machine_is_mpq8064_dtv()) {

		msm_gpiomux_install(mpq8064_audio_auxpcm_configs,
			ARRAY_SIZE(mpq8064_audio_auxpcm_configs));

		msm_gpiomux_install(mpq8064_spkr_i2s_config,
			ARRAY_SIZE(mpq8064_spkr_i2s_config));
	}

	pr_debug("%s(): audio-auxpcm: Include GPIO configs"
		" as audio is not the primary user"
		" for these GPIO Pins\n", __func__);

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		machine_is_mpq8064_dtv())
		msm_gpiomux_install(mpq8064_mi2s_configs,
			ARRAY_SIZE(mpq8064_mi2s_configs));

	if (!machine_is_mpq8064_hrd() && !machine_is_fsm8064_ep())
		msm_gpiomux_install(apq8064_ext_regulator_configs,
			ARRAY_SIZE(apq8064_ext_regulator_configs));

	if (machine_is_apq8064_mtp()) {
		if (SOCINFO_VERSION_MINOR(platform_version) == 1)
			msm_gpiomux_install(mdm_i2s_configs,
					ARRAY_SIZE(mdm_i2s_configs));
		else
			msm_gpiomux_install(mdm_configs,
					ARRAY_SIZE(mdm_configs));
	}

	if (machine_is_apq8064_mtp()) {
		if (SOCINFO_VERSION_MINOR(platform_version) == 1) {
			msm_gpiomux_install(cyts_gpio_alt_config,
					ARRAY_SIZE(cyts_gpio_alt_config));
		} else {
			msm_gpiomux_install(cyts_gpio_configs,
					ARRAY_SIZE(cyts_gpio_configs));
		}
	}

#ifdef CONFIG_USB_EHCI_MSM_HSIC
	if (machine_is_apq8064_mtp())
		msm_gpiomux_install(apq8064_hsic_configs,
				ARRAY_SIZE(apq8064_hsic_configs));
#endif

	if (machine_is_apq8064_cdp() || machine_is_apq8064_liquid())
		msm_gpiomux_install(apq8064_mxt_configs,
			ARRAY_SIZE(apq8064_mxt_configs));

	if (!machine_is_fsm8064_ep())
		msm_gpiomux_install(apq8064_hdmi_configs,
				ARRAY_SIZE(apq8064_hdmi_configs));

	if (apq8064_mhl_display_enabled())
		msm_gpiomux_install(apq8064_mhl_configs,
				ARRAY_SIZE(apq8064_mhl_configs));

	if (machine_is_mpq8064_cdp()) {
		msm_gpiomux_install(mpq8064_ir_configs,
				ARRAY_SIZE(mpq8064_ir_configs));

		msm_gpiomux_install(mpq8064_gsbi6_spi_configs,
				ARRAY_SIZE(mpq8064_gsbi6_spi_configs));
	}

#ifdef CONFIG_MMC_MSM_SDC2_SUPPORT
	 msm_gpiomux_install(apq8064_sdc2_configs,
			     ARRAY_SIZE(apq8064_sdc2_configs));
#endif

#ifdef CONFIG_MMC_MSM_SDC4_SUPPORT
	 msm_gpiomux_install(apq8064_sdc4_configs,
			     ARRAY_SIZE(apq8064_sdc4_configs));
#endif

	if (!(machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		 machine_is_mpq8064_dtv())) {
		msm_gpiomux_install(apq8064_sdc3_configs,
				ARRAY_SIZE(apq8064_sdc3_configs));
	}
	 if (machine_is_mpq8064_hrd() || machine_is_mpq8064_dtv())
		msm_gpiomux_install(mpq8064_uartdm_configs,
				ARRAY_SIZE(mpq8064_uartdm_configs));

	if (machine_is_fsm8064_ep()) {
		msm_gpiomux_install(fsm8064_ep_boot_configs,
				    ARRAY_SIZE(fsm8064_ep_boot_configs));
		msm_gpiomux_install(fsm8064_ep_backup_configs,
				    ARRAY_SIZE(fsm8064_ep_backup_configs));
		msm_gpiomux_install(fsm8064_ep_uim_configs,
				    ARRAY_SIZE(fsm8064_ep_uim_configs));
		msm_gpiomux_install(fsm8064_ep_sync_configs,
				    ARRAY_SIZE(fsm8064_ep_sync_configs));
		msm_gpiomux_install(fsm8064_ep_led_configs,
				    ARRAY_SIZE(fsm8064_ep_led_configs));
	}
}
Exemplo n.º 19
0
void __init apq8064_init_gpiomux(void)
{
	int rc;

	rc = msm_gpiomux_init(NR_GPIO_IRQS);
	if (rc) {
		pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc);
		return;
	}

	msm_gpiomux_install(wcnss_5wire_interface,
			ARRAY_SIZE(wcnss_5wire_interface));

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		 machine_is_mpq8064_dtv()) {
#if !defined(CONFIG_MACH_LGE)
		msm_gpiomux_install(mpq8064_gsbi5_i2c_configs,
				ARRAY_SIZE(mpq8064_gsbi5_i2c_configs));
#endif

#ifdef CONFIG_MSM_VCAP
		msm_gpiomux_install(vcap_configs,
				ARRAY_SIZE(vcap_configs));
#endif
		msm_gpiomux_install(sx150x_int_configs,
				ARRAY_SIZE(sx150x_int_configs));
	} else {
#if !defined(CONFIG_MACH_LGE)
		#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
		msm_gpiomux_install(apq8064_ethernet_configs,
				ARRAY_SIZE(apq8064_ethernet_configs));
		#endif
#endif
		msm_gpiomux_install(apq8064_gsbi_configs,
				ARRAY_SIZE(apq8064_gsbi_configs));
	}
#if defined(CONFIG_LGE_FELICA) || defined(CONFIG_LGE_NFC_SONY_CXD2235AGG)
	msm_gpiomux_install(apq8064_felica_uart_configs,
			ARRAY_SIZE(apq8064_felica_uart_configs));
#endif
	msm_gpiomux_install(apq8064_slimbus_config,
			ARRAY_SIZE(apq8064_slimbus_config));

#ifdef CONFIG_LGE_IRRC
       msm_gpiomux_install(apq8064_irrc_configs,
                     ARRAY_SIZE(apq8064_irrc_configs));
       pr_debug("[IRRC] gpiomux_install");
#endif
	msm_gpiomux_install(apq8064_audio_codec_configs,
			ARRAY_SIZE(apq8064_audio_codec_configs));

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		machine_is_mpq8064_dtv()) {
		msm_gpiomux_install(mpq8064_spkr_i2s_config,
			ARRAY_SIZE(mpq8064_spkr_i2s_config));
	}

	pr_debug("%s(): audio-auxpcm: Include GPIO configs"
		" as audio is not the primary user"
		" for these GPIO Pins\n", __func__);

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		machine_is_mpq8064_dtv())
		msm_gpiomux_install(mpq8064_mi2s_configs,
			ARRAY_SIZE(mpq8064_mi2s_configs));

#if !defined(CONFIG_MACH_LGE)
	msm_gpiomux_install(apq8064_ext_regulator_configs,
			ARRAY_SIZE(apq8064_ext_regulator_configs));
#endif

	if (machine_is_apq8064_mtp())
		msm_gpiomux_install(mdm_configs,
			ARRAY_SIZE(mdm_configs));

	if (machine_is_apq8064_mtp())
		msm_gpiomux_install(cyts_gpio_configs,
				ARRAY_SIZE(cyts_gpio_configs));

#ifdef CONFIG_USB_EHCI_MSM_HSIC
	if (machine_is_apq8064_mtp())
		msm_gpiomux_install(apq8064_hsic_configs,
				ARRAY_SIZE(apq8064_hsic_configs));
#endif
/* #ifndef CONFIG_LGE_FELICA_KDDI */
#if !defined(CONFIG_LGE_FELICA_KDDI) && !defined(CONFIG_LGE_FELICA_DCM)
/* [email protected] [START] for NFC */
#if defined(CONFIG_LGE_NFC)
	msm_gpiomux_install(apq8064_nfc_configs,
			ARRAY_SIZE(apq8064_nfc_configs));
#endif
#endif//endif of CONFIG_LGE_FELICA_KDDI, CONFIG_LGE_FELICA_DCM
/* [email protected] [END] for NFC */ 

	if (machine_is_apq8064_cdp() || machine_is_apq8064_liquid())
		msm_gpiomux_install(apq8064_mxt_configs,
			ARRAY_SIZE(apq8064_mxt_configs));

	msm_gpiomux_install(apq8064_hdmi_configs,
			ARRAY_SIZE(apq8064_hdmi_configs));

	 if (machine_is_mpq8064_cdp())
		msm_gpiomux_install(mpq8064_ir_configs,
				ARRAY_SIZE(mpq8064_ir_configs));

#ifdef CONFIG_MMC_MSM_SDC2_SUPPORT
	 msm_gpiomux_install(apq8064_sdc2_configs,
			     ARRAY_SIZE(apq8064_sdc2_configs));
#endif

#ifdef CONFIG_MMC_MSM_SDC4_SUPPORT
	 msm_gpiomux_install(apq8064_sdc4_configs,
			     ARRAY_SIZE(apq8064_sdc4_configs));
#endif

	msm_gpiomux_install(apq8064_sdc3_configs,
			ARRAY_SIZE(apq8064_sdc3_configs));
}
void __init apq8064_init_gpiomux(void)
{
	int rc;
	int platform_version = socinfo_get_platform_version();

	rc = msm_gpiomux_init(NR_GPIO_IRQS);
	if (rc) {
		pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc);
		return;
	}

#ifdef CONFIG_MMC_MSM_SDC4_SUPPORT
	if (system_rev < BOARD_REV09) {
		msm_gpiomux_install(sdc4_interface,
				ARRAY_SIZE(sdc4_interface));
		msm_gpiomux_install(sd_ls_en_60_config,
				ARRAY_SIZE(sd_ls_en_60_config));
	} else {
		msm_gpiomux_install(sdc2_interface,
				ARRAY_SIZE(sdc2_interface));
		msm_gpiomux_install(sd_ls_en_64_config,
				ARRAY_SIZE(sd_ls_en_64_config));
	}
#else
	msm_gpiomux_install(wcnss_5wire_interface,
			ARRAY_SIZE(wcnss_5wire_interface));
#endif

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		 machine_is_mpq8064_dtv()) {
		msm_gpiomux_install(mpq8064_gsbi5_i2c_configs,
				ARRAY_SIZE(mpq8064_gsbi5_i2c_configs));
#ifdef CONFIG_MSM_VCAP
		msm_gpiomux_install(vcap_configs,
				ARRAY_SIZE(vcap_configs));
#endif
		msm_gpiomux_install(sx150x_int_configs,
				ARRAY_SIZE(sx150x_int_configs));
	} else {
		#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
		msm_gpiomux_install(apq8064_ethernet_configs,
				ARRAY_SIZE(apq8064_ethernet_configs));
		#endif

		msm_gpiomux_install(apq8064_gsbi_configs,
				ARRAY_SIZE(apq8064_gsbi_configs));
	}

	msm_gpiomux_install(apq8064_nc_configs,
			ARRAY_SIZE(apq8064_nc_configs));

	msm_gpiomux_install(sensorhub_configs,
			ARRAY_SIZE(sensorhub_configs));
	if (system_rev > BOARD_REV11)
		msm_gpiomux_install(nfc_firmware_configs,
			ARRAY_SIZE(nfc_firmware_configs));

	msm_gpiomux_install(apq8064_slimbus_config,
			ARRAY_SIZE(apq8064_slimbus_config));

	msm_gpiomux_install(apq8064_audio_codec_configs,
			ARRAY_SIZE(apq8064_audio_codec_configs));

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		machine_is_mpq8064_dtv()) {
		msm_gpiomux_install(mpq8064_spkr_i2s_config,
			ARRAY_SIZE(mpq8064_spkr_i2s_config));
	}

	pr_debug("%s(): audio-auxpcm: Include GPIO configs"
		" as audio is not the primary user"
		" for these GPIO Pins\n", __func__);

	msm_gpiomux_install(apq8064_auxpcm_configs,
		ARRAY_SIZE(apq8064_auxpcm_configs));		

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		machine_is_mpq8064_dtv())
		msm_gpiomux_install(mpq8064_mi2s_configs,
			ARRAY_SIZE(mpq8064_mi2s_configs));

	if (machine_is_apq8064_mtp()|| machine_is_JF()) {
		if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_DSDA2) {
			msm_gpiomux_install(amdm_configs,
					ARRAY_SIZE(amdm_configs));
			msm_gpiomux_install(bmdm_configs,
					ARRAY_SIZE(bmdm_configs));
		} else if (socinfo_get_platform_subtype() ==
				PLATFORM_SUBTYPE_SGLTE2) {
			msm_gpiomux_install(mdm_configs,
					ARRAY_SIZE(mdm_configs));
			msm_gpiomux_install(sglte2_qsc_configs,
					ARRAY_SIZE(sglte2_qsc_configs));

			/* GSBI4 UART GPIOs for Primary IPC */
			msm_gpiomux_install(apq8064_uartdm_gsbi4_configs,
					ARRAY_SIZE(apq8064_uartdm_gsbi4_configs));
		} else if (SOCINFO_VERSION_MINOR(platform_version) == 1) {
			msm_gpiomux_install(mdm_i2s_configs,
					ARRAY_SIZE(mdm_i2s_configs));
		} else {
			msm_gpiomux_install(mdm_configs,
					ARRAY_SIZE(mdm_configs));
	}
	}

	if (machine_is_apq8064_mtp()|| machine_is_JF()) {
		if (SOCINFO_VERSION_MINOR(platform_version) == 1) {
			msm_gpiomux_install(cyts_gpio_alt_config,
					ARRAY_SIZE(cyts_gpio_alt_config));
		} else {
			msm_gpiomux_install(cyts_gpio_configs,
					ARRAY_SIZE(cyts_gpio_configs));
		}
	}

#ifdef CONFIG_USB_EHCI_MSM_HSIC
	if (machine_is_apq8064_mtp()|| machine_is_JF())
		msm_gpiomux_install(apq8064_hsic_configs,
				ARRAY_SIZE(apq8064_hsic_configs));
#endif

	if (machine_is_apq8064_cdp() || machine_is_apq8064_liquid())
		msm_gpiomux_install(apq8064_mxt_configs,
			ARRAY_SIZE(apq8064_mxt_configs));

	msm_gpiomux_install(apq8064_hdmi_configs,
			ARRAY_SIZE(apq8064_hdmi_configs));

	if (machine_is_mpq8064_cdp())
		msm_gpiomux_install(mpq8064_ir_configs,
				ARRAY_SIZE(mpq8064_ir_configs));

	if (system_rev < BOARD_REV10)
		msm_gpiomux_install(msm8064_sd_det_config,
				ARRAY_SIZE(msm8064_sd_det_config));

#if defined(CONFIG_VIDEO_MHL_V2)
	msm_gpiomux_install(msm8960_mhl_configs,
		ARRAY_SIZE(msm8960_mhl_configs));
#endif

#if defined(CONFIG_LEDS_AN30259A)
	msm_gpiomux_install(apq8064_leds_configs,
		ARRAY_SIZE(apq8064_leds_configs));
#endif

#ifdef CONFIG_KEYBOARD_CYPRESS_TOUCH_236
	printk(KERN_INFO"cypress gpio init in %s",__func__);
	if (system_rev > BOARD_REV10)
		msm_gpiomux_install(apq8064_tkey_config,
				ARRAY_SIZE(apq8064_tkey_config));
#endif

#ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI
	if (system_rev >= BOARD_REV09) {
		printk(KERN_INFO "%s: config touch_irq config.\n",__func__);
		msm_gpiomux_install(apq8064_touch_irq_config,
				ARRAY_SIZE(apq8064_touch_irq_config));
	}
#endif
#ifdef CONFIG_MFD_MAX77693
	msm_gpiomux_install(apq8064_muic_config,
		ARRAY_SIZE(apq8064_muic_config));
#endif
	msm_gpiomux_install(apq8064_sec_jack_configs,
			ARRAY_SIZE(apq8064_sec_jack_configs));
	if (machine_is_mpq8064_hrd() || machine_is_mpq8064_dtv())
		msm_gpiomux_install(mpq8064_uartdm_configs,
				ARRAY_SIZE(mpq8064_uartdm_configs));
}
void __init apq8064_init_gpiomux(void)
{
    int rc;

    rc = msm_gpiomux_init(NR_GPIO_IRQS);
    if (rc) {
        pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc);
        return;
    }

    msm_gpiomux_install(wcnss_5wire_interface,
                        ARRAY_SIZE(wcnss_5wire_interface));

    if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
            machine_is_mpq8064_dtv()) {
        msm_gpiomux_install(mpq8064_gsbi5_i2c_configs,
                            ARRAY_SIZE(mpq8064_gsbi5_i2c_configs));
#ifdef CONFIG_MSM_VCAP
        msm_gpiomux_install(vcap_configs,
                            ARRAY_SIZE(vcap_configs));
#endif
        msm_gpiomux_install(sx150x_int_configs,
                            ARRAY_SIZE(sx150x_int_configs));
    } else {
#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
        msm_gpiomux_install(apq8064_ethernet_configs,
                            ARRAY_SIZE(apq8064_ethernet_configs));
#endif

        msm_gpiomux_install(apq8064_gsbi_configs,
                            ARRAY_SIZE(apq8064_gsbi_configs));
    }

    msm_gpiomux_install(apq8064_slimbus_config,
                        ARRAY_SIZE(apq8064_slimbus_config));

    msm_gpiomux_install(apq8064_audio_codec_configs,
                        ARRAY_SIZE(apq8064_audio_codec_configs));

    if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
            machine_is_mpq8064_dtv()) {
        msm_gpiomux_install(mpq8064_spkr_i2s_config,
                            ARRAY_SIZE(mpq8064_spkr_i2s_config));
    }

    pr_debug("%s(): audio-auxpcm: Include GPIO configs"
             " as audio is not the primary user"
             " for these GPIO Pins\n", __func__);

    if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
            machine_is_mpq8064_dtv())
        msm_gpiomux_install(mpq8064_mi2s_configs,
                            ARRAY_SIZE(mpq8064_mi2s_configs));

    msm_gpiomux_install(apq8064_ext_regulator_configs,
                        ARRAY_SIZE(apq8064_ext_regulator_configs));

    if (machine_is_apq8064_mtp())
        msm_gpiomux_install(mdm_configs,
                            ARRAY_SIZE(mdm_configs));

    if (machine_is_apq8064_mtp())
        msm_gpiomux_install(cyts_gpio_configs,
                            ARRAY_SIZE(cyts_gpio_configs));

#ifdef CONFIG_USB_EHCI_MSM_HSIC
    if (machine_is_apq8064_mtp())
        msm_gpiomux_install(apq8064_hsic_configs,
                            ARRAY_SIZE(apq8064_hsic_configs));
#endif

    if (machine_is_apq8064_cdp() || machine_is_apq8064_liquid())
        msm_gpiomux_install(apq8064_mxt_configs,
                            ARRAY_SIZE(apq8064_mxt_configs));

    msm_gpiomux_install(apq8064_hdmi_configs,
                        ARRAY_SIZE(apq8064_hdmi_configs));

    if (machine_is_mpq8064_cdp())
        msm_gpiomux_install(mpq8064_ir_configs,
                            ARRAY_SIZE(mpq8064_ir_configs));
}
Exemplo n.º 22
0
void __init apq8064_init_mmc(void)
{
	if (apq8064_sdc1_pdata) {
		/* 8064 v2 supports upto 200MHz clock on SDC1 slot */
		if (SOCINFO_VERSION_MAJOR(socinfo_get_version()) >= 2) {
			apq8064_sdc1_pdata->sup_clk_table =
					sdc1_sup_clk_rates_all;
			apq8064_sdc1_pdata->sup_clk_cnt	=
					ARRAY_SIZE(sdc1_sup_clk_rates_all);
		}
		apq8064_add_sdcc(1, apq8064_sdc1_pdata);
	}
#if defined(CONFIG_MACH_JFVE_EUR)
	apq8064_sdc2_pdata = NULL;
	apq8064_sdc4_pdata = NULL;

	// SDC3 is used for External memory Card
	if (apq8064_sdc3_pdata)
   {  
		apq8064_sdc3_pdata->status_gpio = PM8921_GPIO_PM_TO_SYS(33);
		apq8064_sdc3_pdata->status_irq	= PM8921_GPIO_IRQ(PM8921_IRQ_BASE, 33);

		apq8064_add_sdcc(3, apq8064_sdc3_pdata);
   }
#else
/*
	if (apq8064_sdc2_pdata)
		apq8064_add_sdcc(2, apq8064_sdc2_pdata);
*/
/* system_rev 0x05 or more
 * SDC3 is used for WIFI
    SDC4 is used for External memory Card
 */
	if (apq8064_sdc3_pdata) {

#ifdef CONFIG_MMC_MSM_SDC4_SUPPORT
		mmc_vdd_reg_data[SDCC3].high_vol_level = 1800000;
		mmc_vdd_reg_data[SDCC3].low_vol_level = 1800000;
		mmc_slot_vreg_data[SDCC3].vdd_io_data = NULL;
		apq8064_sdc3_pdata->status_irq = 0;
		apq8064_sdc3_pdata->status_gpio = 0;
#endif
#if !defined(CONFIG_BCM4335) && !defined(CONFIG_BCM4335_MODULE)
		if (!machine_is_apq8064_cdp()) {
			apq8064_sdc3_pdata->wpswitch_gpio = 0;
			apq8064_sdc3_pdata->is_wpswitch_active_low = false;
		}
		if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
			machine_is_mpq8064_dtv()) {
			int rc;
			struct pm_gpio sd_card_det_init_cfg = {
				.direction      = PM_GPIO_DIR_IN,
				.output_buffer  = PM_GPIO_OUT_BUF_CMOS,
				.pull           = PM_GPIO_PULL_UP_30,
				.vin_sel        = PM_GPIO_VIN_S4,
				.out_strength   = PM_GPIO_STRENGTH_NO,
				.function       = PM_GPIO_FUNC_NORMAL,
			};

			apq8064_sdc3_pdata->status_gpio =
				PM8921_GPIO_PM_TO_SYS(31);
			apq8064_sdc3_pdata->status_irq =
				PM8921_GPIO_IRQ(PM8921_IRQ_BASE, 31);
			rc = pm8xxx_gpio_config(apq8064_sdc3_pdata->status_gpio,
					&sd_card_det_init_cfg);
			if (rc) {
				pr_info("%s: SD_CARD_DET GPIO%d config "
					"failed(%d)\n", __func__,
					apq8064_sdc3_pdata->status_gpio, rc);
				apq8064_sdc3_pdata->status_gpio = 0;
				apq8064_sdc3_pdata->status_irq = 0;
			}
		}
		if (machine_is_apq8064_cdp()) {
			int i;

			for (i = 0;
			     i < apq8064_sdc3_pdata->pin_data->pad_data->\
				 drv->size;
			     i++)
				apq8064_sdc3_pdata->pin_data->pad_data->\
					drv->on[i].val = GPIO_CFG_10MA;
		}
#endif
		apq8064_add_sdcc(3, apq8064_sdc3_pdata);
	}
Exemplo n.º 23
0
void __init apq8064_init_gpiomux(void)
{
	int rc;
	int platform_version = socinfo_get_platform_version();

	rc = msm_gpiomux_init(NR_GPIO_IRQS);
	if (rc) {
		pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc);
		return;
	}

#ifdef CONFIG_MMC_MSM_SDC4_SUPPORT
	if (system_rev < BOARD_REV08)
		msm_gpiomux_install(sdc4_interface,
				ARRAY_SIZE(sdc4_interface));
	else
		msm_gpiomux_install(sdc2_interface,
				ARRAY_SIZE(sdc2_interface));
#else
	msm_gpiomux_install(wcnss_5wire_interface,
			ARRAY_SIZE(wcnss_5wire_interface));
#endif

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		 machine_is_mpq8064_dtv()) {
		msm_gpiomux_install(mpq8064_gsbi5_i2c_configs,
				ARRAY_SIZE(mpq8064_gsbi5_i2c_configs));
#ifdef CONFIG_MSM_VCAP
		msm_gpiomux_install(vcap_configs,
				ARRAY_SIZE(vcap_configs));
#endif
		msm_gpiomux_install(sx150x_int_configs,
				ARRAY_SIZE(sx150x_int_configs));
	} else {
		#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
		msm_gpiomux_install(apq8064_ethernet_configs,
				ARRAY_SIZE(apq8064_ethernet_configs));
		#endif

		msm_gpiomux_install(apq8064_gsbi_configs,
				ARRAY_SIZE(apq8064_gsbi_configs));
	}

	msm_gpiomux_install(apq8064_slimbus_config,
			ARRAY_SIZE(apq8064_slimbus_config));

	msm_gpiomux_install(apq8064_audio_codec_configs,
			ARRAY_SIZE(apq8064_audio_codec_configs));

/*	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		machine_is_mpq8064_dtv()) {
		msm_gpiomux_install(mpq8064_spkr_i2s_config,
			ARRAY_SIZE(mpq8064_spkr_i2s_config));
	} */

	pr_debug("%s(): audio-auxpcm: Include GPIO configs"
		" as audio is not the primary user"
		" for these GPIO Pins\n", __func__);

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		machine_is_mpq8064_dtv())
		msm_gpiomux_install(mpq8064_mi2s_configs,
			ARRAY_SIZE(mpq8064_mi2s_configs));

	if (machine_is_apq8064_mtp()|| machine_is_JF()) {
		if (SOCINFO_VERSION_MINOR(platform_version) == 1)
			msm_gpiomux_install(mdm_i2s_configs,
					ARRAY_SIZE(mdm_i2s_configs));
		else
			msm_gpiomux_install(mdm_configs,
					ARRAY_SIZE(mdm_configs));
	}

	if (machine_is_apq8064_mtp()|| machine_is_JF()) {
		if (SOCINFO_VERSION_MINOR(platform_version) == 1) {
			msm_gpiomux_install(cyts_gpio_alt_config,
					ARRAY_SIZE(cyts_gpio_alt_config));
		} else {
			msm_gpiomux_install(cyts_gpio_configs,
					ARRAY_SIZE(cyts_gpio_configs));
		}
	}

#ifdef CONFIG_USB_EHCI_MSM_HSIC
	if (machine_is_apq8064_mtp()|| machine_is_JF())
		msm_gpiomux_install(apq8064_hsic_configs,
				ARRAY_SIZE(apq8064_hsic_configs));
#endif

	if (machine_is_apq8064_cdp() || machine_is_apq8064_liquid())
		msm_gpiomux_install(apq8064_mxt_configs,
			ARRAY_SIZE(apq8064_mxt_configs));

	msm_gpiomux_install(apq8064_hdmi_configs,
			ARRAY_SIZE(apq8064_hdmi_configs));

	 if (machine_is_mpq8064_cdp())
		msm_gpiomux_install(mpq8064_ir_configs,
				ARRAY_SIZE(mpq8064_ir_configs));

	msm_gpiomux_install(msm8064_sd_det_config,
			ARRAY_SIZE(msm8064_sd_det_config));

#if defined(CONFIG_VIDEO_MHL_V2)
	msm_gpiomux_install(msm8960_mhl_configs,
		ARRAY_SIZE(msm8960_mhl_configs));
#endif

#if defined(CONFIG_LEDS_AN30259A)
	msm_gpiomux_install(apq8064_leds_configs,
		ARRAY_SIZE(apq8064_leds_configs));
#endif
#ifdef CONFIG_MFD_MAX77693
	msm_gpiomux_install(apq8064_muic_config,
		ARRAY_SIZE(apq8064_muic_config));
#endif
}
void __init apq8064_init_gpiomux(void)
{
	int rc;

//wangtao fusion3-debug begin
if (machine_is_apq8064_cdp())    // yes, it is cdp device defaultly
{
 printk(KERN_ERR "wangtao: this is cdp platform \n");   
}

if (machine_is_apq8064_mtp())   
{
 printk(KERN_ERR "wangtao: this is mtp platform \n");   
}	
//wangtao fusion3-debug end
	rc = msm_gpiomux_init(NR_GPIO_IRQS);
	if (rc) {
		pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc);
		return;
	}

	msm_gpiomux_install(wcnss_5wire_interface,
			ARRAY_SIZE(wcnss_5wire_interface));

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		 machine_is_mpq8064_dtv()) {
		msm_gpiomux_install(mpq8064_gsbi5_i2c_configs,
				ARRAY_SIZE(mpq8064_gsbi5_i2c_configs));
#ifdef CONFIG_MSM_VCAP
		msm_gpiomux_install(vcap_configs,
				ARRAY_SIZE(vcap_configs));
#endif
		msm_gpiomux_install(sx150x_int_configs,
				ARRAY_SIZE(sx150x_int_configs));
	} else {
		#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
		msm_gpiomux_install(apq8064_ethernet_configs,
				ARRAY_SIZE(apq8064_ethernet_configs));
		#endif

		msm_gpiomux_install(apq8064_gsbi_configs,
				ARRAY_SIZE(apq8064_gsbi_configs));
	}

	msm_gpiomux_install(apq8064_slimbus_config,
			ARRAY_SIZE(apq8064_slimbus_config));

	msm_gpiomux_install(apq8064_audio_codec_configs,
			ARRAY_SIZE(apq8064_audio_codec_configs));

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		machine_is_mpq8064_dtv()) {
		msm_gpiomux_install(mpq8064_spkr_i2s_config,
			ARRAY_SIZE(mpq8064_spkr_i2s_config));
	}

	pr_debug("%s(): audio-auxpcm: Include GPIO configs"
		" as audio is not the primary user"
		" for these GPIO Pins\n", __func__);

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		machine_is_mpq8064_dtv())
		msm_gpiomux_install(mpq8064_mi2s_configs,
			ARRAY_SIZE(mpq8064_mi2s_configs));

	msm_gpiomux_install(apq8064_ext_regulator_configs,
			ARRAY_SIZE(apq8064_ext_regulator_configs));

	if (machine_is_apq8064_mtp())
		msm_gpiomux_install(mdm_configs,
			ARRAY_SIZE(mdm_configs));

#ifdef CONFIG_USB_EHCI_MSM_HSIC
//wangtao fusion3-debug begin
/*
	if (machine_is_apq8064_mtp())
		msm_gpiomux_install(cyts_gpio_configs,
				ARRAY_SIZE(cyts_gpio_configs));
*/
//wangtao fusion3-debug end
	

	if (machine_is_apq8064_mtp())
		msm_gpiomux_install(apq8064_hsic_configs,
				ARRAY_SIZE(apq8064_hsic_configs));
#endif

//wangtao fusion3-debug begin
//mtp
//	if (machine_is_apq8064_cdp() || machine_is_apq8064_liquid())
//wangtao fusion3-debug end	
		msm_gpiomux_install(apq8064_mxt_configs,
			ARRAY_SIZE(apq8064_mxt_configs));

	msm_gpiomux_install(apq8064_hdmi_configs,
			ARRAY_SIZE(apq8064_hdmi_configs));

	 if (machine_is_mpq8064_cdp())
		msm_gpiomux_install(mpq8064_ir_configs,
				ARRAY_SIZE(mpq8064_ir_configs));
#if !defined(CONFIG_PROJECT_P864A20) && !defined(CONFIG_PROJECT_P864G02)		//jiaobaocun deleted for gsbi5
/*[ECID:000000] ZTEBSP shihuiqin, for video_lms501, 20120525*/
	msm_gpiomux_install(apq8064_lcd_z751_gpio_configs,
			ARRAY_SIZE(apq8064_lcd_z751_gpio_configs));
#endif

#ifdef CONFIG_MMC_MSM_SDC2_SUPPORT
	 msm_gpiomux_install(apq8064_sdc2_configs,
			     ARRAY_SIZE(apq8064_sdc2_configs));
#endif

#ifdef CONFIG_MMC_MSM_SDC4_SUPPORT
	 msm_gpiomux_install(apq8064_sdc4_configs,
			     ARRAY_SIZE(apq8064_sdc4_configs));
#endif

	msm_gpiomux_install(apq8064_sdc3_configs,
			ARRAY_SIZE(apq8064_sdc3_configs));
}
Exemplo n.º 25
0
void __init apq8064_init_gpiomux(void)
{
	int rc;

	rc = msm_gpiomux_init(NR_GPIO_IRQS);
	if (rc) {
		pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc);
		return;
	}
#ifdef CONFIG_SWITCH_MAX1462X
	msm_gpiomux_install(apq8064_earjack_configs,
			ARRAY_SIZE(apq8064_earjack_configs));
#endif
#ifndef CONFIG_MMC_MSM_SDC4_SUPPORT
	msm_gpiomux_install(wcnss_5wire_interface,
			ARRAY_SIZE(wcnss_5wire_interface));
#endif
	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		 machine_is_mpq8064_dtv()) {
#ifdef CONFIG_MSM_VCAP
		msm_gpiomux_install(vcap_configs,
				ARRAY_SIZE(vcap_configs));
#endif
		msm_gpiomux_install(sx150x_int_configs,
				ARRAY_SIZE(sx150x_int_configs));
	} else {
		#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
		msm_gpiomux_install(apq8064_ethernet_configs,
				ARRAY_SIZE(apq8064_ethernet_configs));
		#endif

		msm_gpiomux_install(apq8064_gsbi_configs,
				ARRAY_SIZE(apq8064_gsbi_configs));
	}

	msm_gpiomux_install(apq8064_slimbus_config,
			ARRAY_SIZE(apq8064_slimbus_config));

#if defined(CONFIG_ANDROID_IRRC)
	msm_gpiomux_install(apq8064_irrc_tx_configs,
			ARRAY_SIZE(apq8064_irrc_tx_configs));
#endif

#ifdef CONFIG_SND_SOC_TPA2028D_DUAL_SPEAKER
	msm_gpiomux_install(apq8064_gsbi7_i2c_8ma_configs,
					ARRAY_SIZE(apq8064_gsbi7_i2c_8ma_configs));
#endif

	msm_gpiomux_install(apq8064_audio_codec_configs,
			ARRAY_SIZE(apq8064_audio_codec_configs));

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		machine_is_mpq8064_dtv()) {
		msm_gpiomux_install(mpq8064_spkr_i2s_config,
			ARRAY_SIZE(mpq8064_spkr_i2s_config));
	}

	pr_debug("%s(): audio-auxpcm: Include GPIO configs"
		" as audio is not the primary user"
		" for these GPIO Pins\n", __func__);

#if defined(CONFIG_MODEM_SUPPORT)
	if (machine_is_apq8064_mtp()) {
		if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_DSDA2) {
			msm_gpiomux_install(amdm_configs,
					ARRAY_SIZE(amdm_configs));
			msm_gpiomux_install(bmdm_configs,
				ARRAY_SIZE(bmdm_configs));
		} else if (SOCINFO_VERSION_MINOR(platform_version) == 1)
			msm_gpiomux_install(mdm_i2s_configs,
					ARRAY_SIZE(mdm_i2s_configs));
		else
			msm_gpiomux_install(mdm_configs,
					ARRAY_SIZE(mdm_configs));
	}
#endif

#ifdef CONFIG_USB_EHCI_MSM_HSIC
	if (machine_is_apq8064_mtp()) {
		if (SOCINFO_VERSION_MINOR(platform_version) == 1) {
			msm_gpiomux_install(cyts_gpio_alt_config,
					ARRAY_SIZE(cyts_gpio_alt_config));
		} else {
			msm_gpiomux_install(cyts_gpio_configs,
					ARRAY_SIZE(cyts_gpio_configs));
		}
	}

	if (machine_is_apq8064_mtp())
		msm_gpiomux_install(apq8064_hsic_configs,
				ARRAY_SIZE(apq8064_hsic_configs));
#endif

	if (machine_is_apq8064_cdp() || machine_is_apq8064_liquid())
		msm_gpiomux_install(apq8064_mxt_configs,
			ARRAY_SIZE(apq8064_mxt_configs));

	msm_gpiomux_install(apq8064_hdmi_configs,
			ARRAY_SIZE(apq8064_hdmi_configs));
#if defined (CONFIG_SLIMPORT_ANX7808)
	msm_gpiomux_install(apq8064_slimport_configs,
			ARRAY_SIZE(apq8064_slimport_configs));
    pr_err("[Slimport] revision = %d gpiomux install complete!\n", lge_get_board_revno());
#endif

#ifdef CONFIG_MMC_MSM_SDC2_SUPPORT
	msm_gpiomux_install(apq8064_sdc2_configs,
			ARRAY_SIZE(apq8064_sdc2_configs));
#endif

#ifdef CONFIG_MMC_MSM_SDC4_SUPPORT
	msm_gpiomux_install(apq8064_sdc4_configs,
			ARRAY_SIZE(apq8064_sdc4_configs));
#endif
	msm_gpiomux_install(apq8064_sdc3_configs_chg,
			ARRAY_SIZE(apq8064_sdc3_configs_chg));
}
Exemplo n.º 26
0
void __init apq8064_init_gpiomux(void)
{
	int rc;
	int platform_version = socinfo_get_platform_version();

	rc = msm_gpiomux_init(NR_GPIO_IRQS);
	if (rc) {
		pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc);
		return;
	}

	msm_gpiomux_install(wcnss_5wire_interface,
			ARRAY_SIZE(wcnss_5wire_interface));

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		 machine_is_mpq8064_dtv()) {
#ifndef CONFIG_MACH_APQ8064_FIND5
		msm_gpiomux_install(mpq8064_gsbi5_i2c_configs,
				ARRAY_SIZE(mpq8064_gsbi5_i2c_configs));
#endif

#ifdef CONFIG_MSM_VCAP
		msm_gpiomux_install(vcap_configs,
				ARRAY_SIZE(vcap_configs));
#endif

#ifndef CONFIG_MACH_APQ8064_FIND5
		msm_gpiomux_install(sx150x_int_configs,
				ARRAY_SIZE(sx150x_int_configs));
#endif
	} else {
		#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
		msm_gpiomux_install(apq8064_ethernet_configs,
				ARRAY_SIZE(apq8064_ethernet_configs));
		#endif

		msm_gpiomux_install(apq8064_gsbi_configs,
				ARRAY_SIZE(apq8064_gsbi_configs));
#ifdef CONFIG_MACH_APQ8064_FIND5
		if (get_pcb_version() >= PCB_VERSION_DVT) {
			msm_gpiomux_install(apq8064_gsbi7_i2c_config, ARRAY_SIZE(apq8064_gsbi7_i2c_config));
		}
#endif
	}

	msm_gpiomux_install(apq8064_slimbus_config,
			ARRAY_SIZE(apq8064_slimbus_config));

	msm_gpiomux_install(apq8064_audio_codec_configs,
			ARRAY_SIZE(apq8064_audio_codec_configs));

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		machine_is_mpq8064_dtv()) {
		msm_gpiomux_install(mpq8064_spkr_i2s_config,
			ARRAY_SIZE(mpq8064_spkr_i2s_config));
	}

	pr_debug("%s(): audio-auxpcm: Include GPIO configs"
		" as audio is not the primary user"
		" for these GPIO Pins\n", __func__);

	if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
		machine_is_mpq8064_dtv())
		msm_gpiomux_install(mpq8064_mi2s_configs,
			ARRAY_SIZE(mpq8064_mi2s_configs));

	msm_gpiomux_install(apq8064_ext_regulator_configs,
			ARRAY_SIZE(apq8064_ext_regulator_configs));

#ifdef CONFIG_MACH_APQ8064_FIND5
	msm_gpiomux_install(apq8064_backlight_enable,
			ARRAY_SIZE(apq8064_backlight_enable));
#endif

	if (machine_is_apq8064_mtp()) {
		if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_DSDA2) {
			msm_gpiomux_install(amdm_configs,
					ARRAY_SIZE(amdm_configs));
			msm_gpiomux_install(bmdm_configs,
				ARRAY_SIZE(bmdm_configs));
		} else if (socinfo_get_platform_subtype() ==
					PLATFORM_SUBTYPE_SGLTE2) {
			msm_gpiomux_install(mdm_configs,
					ARRAY_SIZE(mdm_configs));
			msm_gpiomux_install(sglte2_qsc_configs,
					ARRAY_SIZE(sglte2_qsc_configs));

			/* GSBI4 UART GPIOs for Primary IPC */
			msm_gpiomux_install(apq8064_uartdm_gsbi4_configs,
				ARRAY_SIZE(apq8064_uartdm_gsbi4_configs));
		} else if (SOCINFO_VERSION_MINOR(platform_version) == 1) {
			msm_gpiomux_install(mdm_i2s_configs,
					ARRAY_SIZE(mdm_i2s_configs));
		} else {
			msm_gpiomux_install(mdm_configs,
					ARRAY_SIZE(mdm_configs));
		}
	}

	if (machine_is_apq8064_mtp()) {
		if (SOCINFO_VERSION_MINOR(platform_version) == 1) {
			msm_gpiomux_install(cyts_gpio_alt_config,
					ARRAY_SIZE(cyts_gpio_alt_config));
		} else {
			msm_gpiomux_install(cyts_gpio_configs,
					ARRAY_SIZE(cyts_gpio_configs));
		}
	}

#ifdef CONFIG_USB_EHCI_MSM_HSIC
	if (machine_is_apq8064_mtp())
		msm_gpiomux_install(apq8064_hsic_configs,
				ARRAY_SIZE(apq8064_hsic_configs));
#endif

	if (machine_is_apq8064_cdp() || machine_is_apq8064_liquid())
		msm_gpiomux_install(apq8064_mxt_configs,
			ARRAY_SIZE(apq8064_mxt_configs));

	msm_gpiomux_install(apq8064_hdmi_configs,
			ARRAY_SIZE(apq8064_hdmi_configs));
	
/* OPPO 2012-11-14 DuYuanHua Add to config GPIO_72 as input pin for sim card detection */
#ifdef OPPO_FEATURE_UIM_CARD_HOTSWAP
	msm_gpiomux_install(apq8064_uim_card_detection_configs,
			ARRAY_SIZE(apq8064_uim_card_detection_configs));
#endif
/* OPPO 2012-11-14 DuYuanHua Add End*/

	 if (machine_is_mpq8064_cdp())
		msm_gpiomux_install(mpq8064_ir_configs,
				ARRAY_SIZE(mpq8064_ir_configs));

#ifdef CONFIG_MMC_MSM_SDC2_SUPPORT
	 msm_gpiomux_install(apq8064_sdc2_configs,
			     ARRAY_SIZE(apq8064_sdc2_configs));
#endif

#ifdef CONFIG_MMC_MSM_SDC4_SUPPORT
	 msm_gpiomux_install(apq8064_sdc4_configs,
			     ARRAY_SIZE(apq8064_sdc4_configs));
#endif

	msm_gpiomux_install(apq8064_sdc3_configs,
			ARRAY_SIZE(apq8064_sdc3_configs));
	 if (machine_is_mpq8064_hrd() || machine_is_mpq8064_dtv())
		msm_gpiomux_install(mpq8064_uartdm_configs,
				ARRAY_SIZE(mpq8064_uartdm_configs));
}
Exemplo n.º 27
0
void __init apq8064_init_gpiomux(void)
{
    int rc;
    int platform_version = socinfo_get_platform_version();

    rc = msm_gpiomux_init(NR_GPIO_IRQS);
    if (rc) {
        pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc);
        return;
    }

    msm_gpiomux_install(wcnss_5wire_interface,
                        ARRAY_SIZE(wcnss_5wire_interface));

    if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
            machine_is_mpq8064_dtv()) {
        msm_gpiomux_install(mpq8064_gsbi5_i2c_configs,
                            ARRAY_SIZE(mpq8064_gsbi5_i2c_configs));
#ifdef CONFIG_MSM_VCAP
        msm_gpiomux_install(vcap_configs,
                            ARRAY_SIZE(vcap_configs));
#endif
        msm_gpiomux_install(sx150x_int_configs,
                            ARRAY_SIZE(sx150x_int_configs));
    } else {
#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
        /*added by congshan 20121008 start*/
#ifdef CONFIG_ZTEMT_MHL_8064
#else
        msm_gpiomux_install(apq8064_ethernet_configs,
                            ARRAY_SIZE(apq8064_ethernet_configs));
#endif
        /*added by congshan 20121008 end*/
#endif
        msm_gpiomux_install(apq8064_gsbi_configs,
                            ARRAY_SIZE(apq8064_gsbi_configs));
    }

    msm_gpiomux_install(apq8064_slimbus_config,
                        ARRAY_SIZE(apq8064_slimbus_config));

    msm_gpiomux_install(apq8064_audio_codec_configs,
                        ARRAY_SIZE(apq8064_audio_codec_configs));

    if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
            machine_is_mpq8064_dtv()) {
        msm_gpiomux_install(mpq8064_spkr_i2s_config,
                            ARRAY_SIZE(mpq8064_spkr_i2s_config));
    }

    pr_debug("%s(): audio-auxpcm: Include GPIO configs"
             " as audio is not the primary user"
             " for these GPIO Pins\n", __func__);

    if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
            machine_is_mpq8064_dtv())
        msm_gpiomux_install(mpq8064_mi2s_configs,
                            ARRAY_SIZE(mpq8064_mi2s_configs));

    msm_gpiomux_install(apq8064_ext_regulator_configs,
                        ARRAY_SIZE(apq8064_ext_regulator_configs));

    if (machine_is_apq8064_mtp()) {
        if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_DSDA2) {
            msm_gpiomux_install(amdm_configs,
                                ARRAY_SIZE(amdm_configs));
            msm_gpiomux_install(bmdm_configs,
                                ARRAY_SIZE(bmdm_configs));
        } else if (socinfo_get_platform_subtype() ==
                   PLATFORM_SUBTYPE_SGLTE2) {
            msm_gpiomux_install(mdm_configs,
                                ARRAY_SIZE(mdm_configs));
            msm_gpiomux_install(sglte2_qsc_configs,
                                ARRAY_SIZE(sglte2_qsc_configs));

            /* GSBI4 UART GPIOs for Primary IPC */
            msm_gpiomux_install(apq8064_uartdm_gsbi4_configs,
                                ARRAY_SIZE(apq8064_uartdm_gsbi4_configs));
        } else if (SOCINFO_VERSION_MINOR(platform_version) == 1) {
            msm_gpiomux_install(mdm_i2s_configs,
                                ARRAY_SIZE(mdm_i2s_configs));
        } else {
            msm_gpiomux_install(mdm_configs,
                                ARRAY_SIZE(mdm_configs));
        }
    }

    if (machine_is_apq8064_mtp()) {
        if (SOCINFO_VERSION_MINOR(platform_version) == 1) {
            msm_gpiomux_install(cyts_gpio_alt_config,
                                ARRAY_SIZE(cyts_gpio_alt_config));
        } else {
            msm_gpiomux_install(cyts_gpio_configs,
                                ARRAY_SIZE(cyts_gpio_configs));
        }
    }

#ifdef CONFIG_USB_EHCI_MSM_HSIC
    if (machine_is_apq8064_mtp())
        msm_gpiomux_install(apq8064_hsic_configs,
                            ARRAY_SIZE(apq8064_hsic_configs));
#endif

    if (machine_is_apq8064_cdp() || machine_is_apq8064_liquid())
        msm_gpiomux_install(apq8064_mxt_configs,
                            ARRAY_SIZE(apq8064_mxt_configs));

    msm_gpiomux_install(apq8064_hdmi_configs,
                        ARRAY_SIZE(apq8064_hdmi_configs));

    if (machine_is_mpq8064_cdp())
        msm_gpiomux_install(mpq8064_ir_configs,
                            ARRAY_SIZE(mpq8064_ir_configs));

#ifdef CONFIG_MMC_MSM_SDC2_SUPPORT
    msm_gpiomux_install(apq8064_sdc2_configs,
                        ARRAY_SIZE(apq8064_sdc2_configs));
#endif

#ifdef CONFIG_MMC_MSM_SDC4_SUPPORT
    msm_gpiomux_install(apq8064_sdc4_configs,
                        ARRAY_SIZE(apq8064_sdc4_configs));
#endif

    msm_gpiomux_install(apq8064_sdc3_configs,
                        ARRAY_SIZE(apq8064_sdc3_configs));
    /*added by congshan 20121008 start*/
#ifdef CONFIG_ZTEMT_MHL_8064
    msm_gpiomux_install(mpq8064_gsbi5_i2c_configs,
                        ARRAY_SIZE(mpq8064_gsbi5_i2c_configs));
#endif
    /*added by congshan 20121008 end*/
    /* ZTEMT Added by LiuYongfeng, 2012/10/10 */
#ifdef CONFIG_SERIAL_MSM_HSL
    msm_gpiomux_install(mpq8064_gsbi5_uart_configs,
                        ARRAY_SIZE(mpq8064_gsbi5_uart_configs));
#endif
    /* ZTEMT END */
    //# config the sensors' gpio
#ifdef CONFIG_ZTEMT_SENSORS
    msm_gpiomux_install(sensors_gpio_configs, ARRAY_SIZE(sensors_gpio_configs));
#endif
    if (machine_is_mpq8064_hrd() || machine_is_mpq8064_dtv())
        msm_gpiomux_install(mpq8064_uartdm_configs,
                            ARRAY_SIZE(mpq8064_uartdm_configs));
}