#if defined(CONFIG_SEC_ATLANTIC_PROJECT)

#define CHG_DET_CFG(gpio_num) IN_NP_2MA_CFG(gpio_num)

static struct msm_gpiomux_config msm_chg_det_configs[] = {
	CHG_DET_CFG(51),
};

#endif

extern int system_rev;

/*NC GPIOs configuration*/
#if defined(CONFIG_MACH_ATLANTICLTE_ATT)
static struct msm_gpiomux_config atlantic_att_nc_gpios[] __initdata = {
	NC_GPIO_CONFIG(37),
	NC_GPIO_CONFIG(45),
	NC_GPIO_CONFIG(46),
	NC_GPIO_CONFIG(77),
	NC_GPIO_CONFIG(78),
	NC_GPIO_CONFIG(79),
	NC_GPIO_CONFIG(80),
	NC_GPIO_CONFIG(81),
	NC_GPIO_CONFIG(82),
	NC_GPIO_CONFIG(83),
	NC_GPIO_CONFIG(93),
	NC_GPIO_CONFIG(94),
	NC_GPIO_CONFIG(97),
	NC_GPIO_CONFIG(98),
	NC_GPIO_CONFIG(104),
	NC_GPIO_CONFIG(111),
		},
	},
	{
		.gpio = 67,
		.settings = {
			[GPIOMUX_SUSPENDED] = &nc_cfg,
			[GPIOMUX_ACTIVE] = &nc_cfg,
		},
	},
};
#endif

/* BERLUTI 3G NC configs */
static struct msm_gpiomux_config berluti3g_nc_gpio_cfgs[] __initdata = {
#if defined(CONFIG_FB_MSM_MDSS_SHARP_HD_PANEL)
	NC_GPIO_CONFIG(16),				/* As we will not ESD so ESD pin should be NC */
#endif
	NC_GPIO_CONFIG(24),
	NC_GPIO_CONFIG(53),
	NC_GPIO_CONFIG(54),
	NC_GPIO_CONFIG(55),
#ifndef CONFIG_FB_MSM_MDSS_SHARP_HD_PANEL
	NC_GPIO_CONFIG(60),
#endif
	NC_GPIO_CONFIG(80),
	NC_GPIO_CONFIG(88),
	NC_GPIO_CONFIG(89),
	NC_GPIO_CONFIG(90),
	NC_GPIO_CONFIG(91),
	NC_GPIO_CONFIG(92),
	NC_GPIO_CONFIG(93),
};

static void msm_gpiomux_sdc3_install(void)
{
	msm_gpiomux_install(msm8226_sdc3_configs,
			    ARRAY_SIZE(msm8226_sdc3_configs));
}
#else
static void msm_gpiomux_sdc3_install(void) {}
#endif /* CONFIG_MMC_MSM_SDC3_SUPPORT */

extern int system_rev;

#if defined (CONFIG_MACH_MILLETLTE_OPEN)
static struct msm_gpiomux_config millet_nc_gpio_cfgs[] __initdata = {
	NC_GPIO_CONFIG(115),
	NC_GPIO_CONFIG(116),
};
static struct msm_gpiomux_config millet_nc3_gpio_cfgs[] __initdata = {
	NC_GPIO_CONFIG(4),
	NC_GPIO_CONFIG(52),
	NC_GPIO_CONFIG(120),
};
#endif
#if defined (CONFIG_SEC_MILLETWIFI_COMMON)
static struct msm_gpiomux_config milletwifi_nc_gpio_cfgs[] __initdata = {
	NC_GPIO_CONFIG(0),
	NC_GPIO_CONFIG(1),
#if defined(CONFIG_MACH_MILLETWIFI_OPEN)
	NC_GPIO_CONFIG(4),
	NC_GPIO_CONFIG(5),
	/* ETC */
	FAST_GPIO_CONFIG(14, default_cfg_inp_np, default_cfg_inp_np), /* HW_CHK_BIT1 */
	FAST_GPIO_CONFIG(15, default_cfg_inp_np, default_cfg_inp_np), /* HW_CHK_BIT0 */
	FAST_GPIO_CONFIG(22, default_cfg_inp_np, default_cfg_inp_np), /* CHECK_DS_SS */
	FAST_GPIO_CONFIG(51, default_cfg_inp_np, default_cfg_inp_np), /* CHG_DET */
	/* AUDIO */
	FAST_GPIO_CONFIG(68, codec_int_gpio_suspend_cfg  , codec_int_gpio_active_cfg),
	FAST_GPIO_CONFIG(69, ear_det_gpio_suspend_cfg    , ear_det_gpio_active_cfg),
	FAST_GPIO_CONFIG(72, codec_reset_gpio_suspend_cfg, codec_reset_gpio_active_cfg),
	FAST_GPIO_CONFIG(111, motor_en_gpio_suspend_cfg  , motor_en_gpio_active_cfg),
};
#endif

#if defined(CONFIG_MACH_MS01_CHN_CTC) || defined(CONFIG_MACH_CRATERVE_CHN_CTC)
static struct msm_gpiomux_config msm8226_nc_gpio_cfgs[] __initdata = {
	NC_GPIO_CONFIG(24),
	NC_GPIO_CONFIG(49),
	NC_GPIO_CONFIG(67),
};
#elif defined(CONFIG_MACH_MS01_EUR_3G)
static struct msm_gpiomux_config msm8226_nc_gpio_cfgs[] __initdata = {
	NC_GPIO_CONFIG(23),
	NC_GPIO_CONFIG(49),
	NC_GPIO_CONFIG(67),
};
#elif defined(CONFIG_MACH_CRATERQ)
static struct msm_gpiomux_config msm8226_nc_gpio_cfgs[] __initdata = {
	NC_GPIO_CONFIG(10),
	NC_GPIO_CONFIG(11),
	NC_GPIO_CONFIG(23),
	NC_GPIO_CONFIG(50),
	.drv = GPIOMUX_DRV_2MA,
	.pull = GPIOMUX_PULL_DOWN,
	.dir = GPIOMUX_IN,
};

static struct gpiomux_setting nc_suspend_cfg = {
	.func = GPIOMUX_FUNC_GPIO,
	.drv = GPIOMUX_DRV_2MA,
	.pull = GPIOMUX_PULL_DOWN,
	.dir = GPIOMUX_IN,
};

static struct msm_gpiomux_config berluti_nc_gpio_cfgs[] __initdata = {
#if defined (CONFIG_MACH_BERLUTI3G_EUR)
/* BERLUTI 3G NC configs */
	NC_GPIO_CONFIG(45),
	NC_GPIO_CONFIG(53),
	NC_GPIO_CONFIG(55),
	NC_GPIO_CONFIG(80),
	NC_GPIO_CONFIG(89),
	NC_GPIO_CONFIG(90),
	NC_GPIO_CONFIG(91),
	NC_GPIO_CONFIG(92),
	NC_GPIO_CONFIG(97),
	NC_GPIO_CONFIG(98),
	NC_GPIO_CONFIG(104),
	NC_GPIO_CONFIG(107),
	NC_GPIO_CONFIG(110),
	NC_GPIO_CONFIG(113),
	NC_GPIO_CONFIG(115),
	NC_GPIO_CONFIG(116),	
};

static struct gpiomux_setting goodix_ldo_en_act_cfg = {
	.func = GPIOMUX_FUNC_GPIO,
	.drv = GPIOMUX_DRV_6MA,
	.pull = GPIOMUX_PULL_UP,
};

static struct gpiomux_setting goodix_int_act_cfg = {
	.func = GPIOMUX_FUNC_GPIO,
	.drv = GPIOMUX_DRV_6MA,
	.pull = GPIOMUX_PULL_UP,
};

static struct msm_gpiomux_config msm_skuf_blsp_configs[] __initdata = {
	NC_GPIO_CONFIG(2),
	NC_GPIO_CONFIG(3),
	NC_GPIO_CONFIG(4),
};

static struct msm_gpiomux_config msm_skuf_goodix_configs[] __initdata = {
	{
		.gpio = 15,		/* LDO EN */
		.settings = {
			[GPIOMUX_ACTIVE] = &goodix_ldo_en_act_cfg,
			[GPIOMUX_SUSPENDED] = &gpio_suspend_config[2],
		},
	},
	{
		.gpio = 17,		/* INT */
		.settings = {
	MAKE_NC_CONFIG_INIT_SLEEP(60),
	MAKE_NC_CONFIG_INIT_SLEEP(62),
	MAKE_NC_CONFIG_INIT_SLEEP(66),
	MAKE_NC_CONFIG_INIT_SLEEP(116),
};
#endif

#if defined(CONFIG_MACH_MATISSELTE_OPEN)
static struct msm_gpiomux_config matisselte_open_nc_gpio_cfgs[] __initdata = {
	MAKE_NC_CONFIG_INIT_SLEEP(4),
};
#endif

#if defined(CONFIG_MACH_MATISSELTE_VZW)
static struct msm_gpiomux_config matisseltevzw_nc_gpio_cfgs[] __initdata = {
	NC_GPIO_CONFIG(83),
	NC_GPIO_CONFIG(85),
	NC_GPIO_CONFIG(86),
	NC_GPIO_CONFIG(93),
	NC_GPIO_CONFIG(94),
	{
		.gpio = 115,
		.settings = {
			[GPIOMUX_ACTIVE] = &nc_cfg,
			[GPIOMUX_SUSPENDED] = &nc_cfg,
		}
	},
	{
		.gpio = 116,
		.settings = {
			[GPIOMUX_ACTIVE] = &nc_cfg,
static struct msm_gpiomux_config msm_ta_nchg_configs[] = {
  {
     .gpio = 54,               /* TA_NCHG */
     .settings = {
      [GPIOMUX_ACTIVE] = &ta_nchg_cfg[0],
      [GPIOMUX_SUSPENDED] = &ta_nchg_cfg[0],
    },
  },
};


extern int system_rev;

/*NC GPIOs configuration*/
static struct msm_gpiomux_config nc_gpio_cfgs[] __initdata = {
	NC_GPIO_CONFIG(113),
	NC_GPIO_CONFIG(115),
	NC_GPIO_CONFIG(116),
	NC_GPIO_CONFIG(117),
	NC_GPIO_CONFIG(118),
};

void __init msm8226_init_gpiomux(void)
{
	int rc;

	rc = msm_gpiomux_init_dt();
	if (rc) {
		pr_err("%s failed %d\n", __func__, rc);
		return;
	}
static struct msm_gpiomux_config tsp_id_configs[] __initdata = {
	{
		.gpio      = 22,
		.settings = {
			[GPIOMUX_ACTIVE] = &tsp_id_config,
			[GPIOMUX_SUSPENDED] = &tsp_id_config,
		},
	},
};
#endif
extern int system_rev;

/*NC GPIOs configuration*/
static struct msm_gpiomux_config gpio_nc_configs[] __initdata = {
#if !defined(CONFIG_NFC_PN547)
	NC_GPIO_CONFIG(14),
	NC_GPIO_CONFIG(15),
#endif
	NC_GPIO_CONFIG(49),
	NC_GPIO_CONFIG(50),
	NC_GPIO_CONFIG(51),
#if !defined(CONFIG_NFC_PN547)
	NC_GPIO_CONFIG(52),
#endif
	NC_GPIO_CONFIG(62),
	NC_GPIO_CONFIG(72),
	NC_GPIO_CONFIG(73),
	NC_GPIO_CONFIG(75),
	NC_GPIO_CONFIG(88),
	NC_GPIO_CONFIG(89),
	NC_GPIO_CONFIG(90),
			[GPIOMUX_ACTIVE]    = &nc_suspend_in_cfg,
		},
	},
	{
		.gpio      = 105,
		.settings = {
			[GPIOMUX_SUSPENDED] = &nc_suspend_out_cfg,
		},
	},

};
#endif

#if defined(CONFIG_MACH_DEGASLTE_SPR) || defined(CONFIG_MACH_DEGASLTE_VZW) || defined(CONFIG_MACH_DEGASLTE_SBM)
static struct msm_gpiomux_config degaslte_spr_nc_gpios[] __initdata = {
	NC_GPIO_CONFIG(2),
	NC_GPIO_CONFIG(3),
#if defined(CONFIG_MACH_DEGASLTE_SBM)
	NC_GPIO_CONFIG(4),
	NC_GPIO_CONFIG(5),
#endif
	NC_GPIO_CONFIG(20),
	NC_GPIO_CONFIG(21),
	NC_GPIO_CONFIG(22),
	NC_GPIO_CONFIG(23),
	NC_GPIO_CONFIG(24),
	NC_GPIO_CONFIG(37),
	NC_GPIO_CONFIG(50),
	NC_GPIO_CONFIG(51),
	NC_GPIO_CONFIG(52),
	NC_GPIO_CONFIG(56),
	.func = GPIOMUX_FUNC_GPIO,
	.drv = GPIOMUX_DRV_2MA,
	.pull = GPIOMUX_PULL_DOWN,
	.dir = GPIOMUX_IN,
};

static struct gpiomux_setting nc_suspend_cfg = {
	.func = GPIOMUX_FUNC_GPIO,
	.drv = GPIOMUX_DRV_2MA,
	.pull = GPIOMUX_PULL_DOWN,
	.dir = GPIOMUX_IN,
};

/* BERLUTI 3G NC configs */
static struct msm_gpiomux_config berluti3g_nc_gpio_cfgs[] __initdata = {
	NC_GPIO_CONFIG(53),
	NC_GPIO_CONFIG(55),
#if defined (CONFIG_MACH_BERLUTI3G_EUR)
	NC_GPIO_CONFIG(45),
#else
	NC_GPIO_CONFIG(60),
#endif
	NC_GPIO_CONFIG(80),
	NC_GPIO_CONFIG(89),
	NC_GPIO_CONFIG(90),
	NC_GPIO_CONFIG(91),
	NC_GPIO_CONFIG(92),
	NC_GPIO_CONFIG(97),
	NC_GPIO_CONFIG(98),
	NC_GPIO_CONFIG(104),
	NC_GPIO_CONFIG(107),
static struct gpiomux_setting nc_active_cfg = {
	.func = GPIOMUX_FUNC_GPIO,
	.drv = GPIOMUX_DRV_2MA,
	.pull = GPIOMUX_PULL_DOWN,
	.dir = GPIOMUX_IN,
};

static struct gpiomux_setting nc_suspend_cfg = {
	.func = GPIOMUX_FUNC_GPIO,
	.drv = GPIOMUX_DRV_2MA,
	.pull = GPIOMUX_PULL_DOWN,
	.dir = GPIOMUX_IN,
};

static struct msm_gpiomux_config nc_gpio_cfgs[] __initdata = {
	NC_GPIO_CONFIG(60),
	NC_GPIO_CONFIG(75),
	NC_GPIO_CONFIG(76),
	NC_GPIO_CONFIG(77),
	NC_GPIO_CONFIG(78),
	NC_GPIO_CONFIG(79),
	NC_GPIO_CONFIG(80),
	NC_GPIO_CONFIG(81),
	NC_GPIO_CONFIG(82),
	NC_GPIO_CONFIG(83),
	NC_GPIO_CONFIG(84),
	NC_GPIO_CONFIG(85),
	NC_GPIO_CONFIG(86),
	NC_GPIO_CONFIG(88),
	NC_GPIO_CONFIG(89),
	NC_GPIO_CONFIG(90),
};

static void msm_gpiomux_sdc3_install(void)
{
	msm_gpiomux_install(msm8226_sdc3_configs,
			    ARRAY_SIZE(msm8226_sdc3_configs));
}
#else
static void msm_gpiomux_sdc3_install(void) {}
#endif /* CONFIG_MMC_MSM_SDC3_SUPPORT */

extern int system_rev;

/*NC GPIOs configuration*/
static struct msm_gpiomux_config afyon_nc_gpio_cfgs[] __initdata = {
	NC_GPIO_CONFIG(24),
	NC_GPIO_CONFIG(45),
	NC_GPIO_CONFIG(46),
	NC_GPIO_CONFIG(53),
	NC_GPIO_CONFIG(54),
	NC_GPIO_CONFIG(55),
	NC_GPIO_CONFIG(56),
	NC_GPIO_CONFIG(60),
	NC_GPIO_CONFIG(75),
	NC_GPIO_CONFIG(76),
	NC_GPIO_CONFIG(77),
	NC_GPIO_CONFIG(78),
	NC_GPIO_CONFIG(79),
	NC_GPIO_CONFIG(80),
	NC_GPIO_CONFIG(81),
	NC_GPIO_CONFIG(82),