static void s5p_mipi_dsi_lcd_power_on_off(unsigned int power)
{
	struct regulator *regulator_vlcd_1v8;
	struct regulator *regulator_vlcd_3v0;

	regulator_vlcd_1v8 = regulator_get(NULL, "vlcd_1v8");
	if (IS_ERR(regulator_vlcd_1v8)) {
		pr_info("%s: failed to get %s\n", __func__, "vlcd_1v8");
		return;
	}
	regulator_vlcd_3v0 = regulator_get(NULL, "vlcd_3v0");
	if (IS_ERR(regulator_vlcd_3v0)) {
		pr_info("%s: failed to get %s\n", __func__, "vlcd_3v0");
		return;
	}
	if (power){
		regulator_enable(regulator_vlcd_1v8);
		msleep(10);
		regulator_enable(regulator_vlcd_3v0);
	}else {
		regulator_disable(regulator_vlcd_3v0);
		regulator_disable(regulator_vlcd_1v8);
		/*LCD RESET low*/
		gpio_request_one(EXYNOS4_GPX2(4),GPIOF_OUT_INIT_LOW, "GPX2");
		gpio_free(EXYNOS4_GPX2(4));
	}
	regulator_put(regulator_vlcd_3v0);
	regulator_put(regulator_vlcd_1v8);
	msleep(1);
}
static int lcd_power_on(struct lcd_device *ld, int enable)
{
	struct regulator *regulator_vlcd_1v8;
	struct regulator *regulator_vlcd_3v0;

	regulator_vlcd_1v8 = regulator_get(NULL, "vlcd_1v8");
	if (IS_ERR(regulator_vlcd_1v8)) {
		pr_info("%s: failed to get %s\n", __func__, "vlcd_1v8");
		return PTR_ERR(regulator_vlcd_1v8);
	}
	regulator_vlcd_3v0 = regulator_get(NULL, "vlcd_3v0");
	if (IS_ERR(regulator_vlcd_3v0)) {
		pr_info("%s: failed to get %s\n", __func__, "vlcd_3v0");
		return PTR_ERR(regulator_vlcd_3v0);
	}
	if (enable){
		regulator_enable(regulator_vlcd_1v8);
		msleep(10);
		regulator_enable(regulator_vlcd_3v0);
	}else {
		/*LCD RESET low at SLEEP*/
		gpio_request_one(EXYNOS4_GPX2(4),GPIOF_OUT_INIT_LOW, "GPX2");
		gpio_free(EXYNOS4_GPX2(4));

		regulator_disable(regulator_vlcd_3v0);
		regulator_disable(regulator_vlcd_1v8);
	}
	regulator_put(regulator_vlcd_3v0);
	regulator_put(regulator_vlcd_1v8);

	return 0;
}
static void __init origen_bt_setup(void)
{
	gpio_request(EXYNOS4_GPA0(0), "GPIO BT_UART");
	/* 4 UART Pins configuration */
	s3c_gpio_cfgrange_nopull(EXYNOS4_GPA0(0), 4, S3C_GPIO_SFN(2));
	/* Setup BT Reset, this gpio will be requesed by rfkill-gpio */
	s3c_gpio_cfgpin(EXYNOS4_GPX2(2), S3C_GPIO_OUTPUT);
	s3c_gpio_setpull(EXYNOS4_GPX2(2), S3C_GPIO_PULL_NONE);
}
static void s5p_mipi_dsi_lcd_reset(void)
{
	gpio_request_one(EXYNOS4_GPX2(4), GPIOF_OUT_INIT_HIGH, "GPX2");
	usleep_range(5000, 5000);
	gpio_set_value(EXYNOS4_GPX2(4), 0);
	usleep_range(5000, 5000);
	gpio_set_value(EXYNOS4_GPX2(4), 1);
	msleep(100);
	gpio_free(EXYNOS4_GPX2(4));
}
static int reset_lcd(struct lcd_device *ld)
{
	gpio_request_one(EXYNOS4_GPX2(4), GPIOF_OUT_INIT_HIGH, "GPX2");
	usleep_range(200,200);
	gpio_set_value(EXYNOS4_GPX2(4), 0);
	usleep_range(200,200);
	gpio_set_value(EXYNOS4_GPX2(4), 1);
	gpio_free(EXYNOS4_GPX2(4));
	return 0;
}
Beispiel #6
0
static int __init bcm4329_wifi_init(void)
{
	int ret;

 	printk("%s: start\n", __func__);
  	bcm4329_init_wifi_mem();
	bcm4329_wifi_device.resource->start = gpio_to_irq(EXYNOS4_GPX2(7));
	bcm4329_wifi_device.resource->end = gpio_to_irq(EXYNOS4_GPX2(7));
	ret = platform_device_register(&bcm4329_wifi_device);
        return ret;
}
Beispiel #7
0
static void __init armlex4210_wlan_init(void)
{
	/* enable */
	s3c_gpio_cfgpin(EXYNOS4_GPX2(0), S3C_GPIO_SFN(0xf));
	s3c_gpio_setpull(EXYNOS4_GPX2(0), S3C_GPIO_PULL_UP);

	/* reset */
	s3c_gpio_cfgpin(EXYNOS4_GPX1(6), S3C_GPIO_SFN(0xf));
	s3c_gpio_setpull(EXYNOS4_GPX1(6), S3C_GPIO_PULL_UP);

	/* wakeup */
	s3c_gpio_cfgpin(EXYNOS4_GPX1(5), S3C_GPIO_SFN(0xf));
	s3c_gpio_setpull(EXYNOS4_GPX1(5), S3C_GPIO_PULL_UP);
}
Beispiel #8
0
static void __init nuri_power_init(void)
{
	int gpio;
	int irq_base = IRQ_GPIO_END + 1;
	int ta_en = 0;

	nuri_max8997_pdata.irq_base = irq_base;
	irq_base += MAX8997_IRQ_NR;

	gpio = EXYNOS4_GPX0(7);
	gpio_request(gpio, "AP_PMIC_IRQ");
	s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
	s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);

	gpio = EXYNOS4_GPX2(3);
	gpio_request(gpio, "FUEL_ALERT");
	s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
	s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);

	gpio = nuri_max8903.dok;
	gpio_request(gpio, "TA_nCONNECTED");
	s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
	s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
	ta_en = gpio_get_value(gpio) ? 0 : 1;

	gpio = nuri_max8903.chg;
	gpio_request(gpio, "TA_nCHG");
	gpio_direction_input(gpio);

	gpio = nuri_max8903.dcm;
	gpio_request(gpio, "CURR_ADJ");
	gpio_direction_output(gpio, ta_en);
}
static void __init nuri_machine_init(void)
{
	nuri_sdhci_init();
	nuri_tsp_init();
	nuri_power_init();

	s3c_i2c0_set_platdata(&nuri_i2c0_platdata);
	i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
	s3c_i2c3_set_platdata(&i2c3_data);
	i2c_register_board_info(3, i2c3_devs, ARRAY_SIZE(i2c3_devs));
	s3c_i2c5_set_platdata(NULL);
	i2c5_devs[I2C5_MAX8997].irq = gpio_to_irq(EXYNOS4_GPX0(7));
	i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
	i2c9_devs[I2C9_MAX17042].irq = gpio_to_irq(EXYNOS4_GPX2(3));
	i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs));
	s3c_i2c6_set_platdata(&nuri_i2c6_platdata);

	s5p_fimd0_set_platdata(&nuri_fb_pdata);

	nuri_camera_init();

	nuri_ehci_init();

	/* Last */
	platform_add_devices(nuri_devices, ARRAY_SIZE(nuri_devices));
}
Beispiel #10
0
static void __init nuri_machine_init(void)
{
	nuri_sdhci_init();
	nuri_tsp_init();
	nuri_power_init();

	s3c_i2c0_set_platdata(&nuri_i2c0_platdata);
	i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
	s3c_i2c3_set_platdata(&i2c3_data);
	i2c_register_board_info(3, i2c3_devs, ARRAY_SIZE(i2c3_devs));
	s3c_i2c5_set_platdata(NULL);
	i2c5_devs[I2C5_MAX8997].irq = gpio_to_irq(EXYNOS4_GPX0(7));
	i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
	i2c9_devs[I2C9_MAX17042].irq = gpio_to_irq(EXYNOS4_GPX2(3));
	i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs));

	s5p_fimd0_set_platdata(&nuri_fb_pdata);

	nuri_camera_init();

	nuri_ehci_init();
	clk_xusbxti.rate = 24000000;

	/* Last */
	platform_add_devices(nuri_devices, ARRAY_SIZE(nuri_devices));
	s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev;
	s5p_device_fimd0.dev.parent = &exynos4_device_pd[PD_LCD0].dev;

	s5p_device_fimc0.dev.parent = &exynos4_device_pd[PD_CAM].dev;
	s5p_device_fimc1.dev.parent = &exynos4_device_pd[PD_CAM].dev;
	s5p_device_fimc2.dev.parent = &exynos4_device_pd[PD_CAM].dev;
	s5p_device_fimc3.dev.parent = &exynos4_device_pd[PD_CAM].dev;
	s5p_device_mipi_csis0.dev.parent = &exynos4_device_pd[PD_CAM].dev;
}
Beispiel #11
0
static void __init nuri_machine_init(void)
{
	nuri_sdhci_init();
	nuri_tsp_init();
	nuri_power_init();

	s3c_i2c0_set_platdata(&nuri_i2c0_platdata);
	i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
	s3c_i2c3_set_platdata(&i2c3_data);
	i2c_register_board_info(3, i2c3_devs, ARRAY_SIZE(i2c3_devs));
	s3c_i2c5_set_platdata(NULL);
	i2c5_devs[I2C5_MAX8997].irq = gpio_to_irq(EXYNOS4_GPX0(7));
	i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
	i2c9_devs[I2C9_MAX17042].irq = gpio_to_irq(EXYNOS4_GPX2(3));
	i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs));
	s3c_i2c6_set_platdata(&nuri_i2c6_platdata);

#ifdef CONFIG_DRM_EXYNOS
	s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata;
	exynos4_fimd0_gpio_setup_24bpp();
#else
	s5p_fimd0_set_platdata(&nuri_fb_pdata);
#endif

	nuri_camera_init();

	nuri_ehci_init();
	s3c_hsotg_set_platdata(&nuri_hsotg_pdata);

	/* Last */
	platform_add_devices(nuri_devices, ARRAY_SIZE(nuri_devices));
}
Beispiel #12
0
static void mx_power_off(void)
{
	struct task_struct *task = get_current();
	char task_com[TASK_COMM_LEN];
	int regs;
	int gpio;

	pr_emerg("func:%s, process is:%d:%s\n", __func__, task->pid, get_task_comm(task_com, task));
	if (task->parent) {
		task = task->parent;
		pr_emerg("func:%s, parent:%d:%s\n", __func__, task->pid, get_task_comm(task_com, task));
		if (task->parent) {
			task = task->parent;
			pr_emerg("func:%s, pparent:%d:%s\n", __func__, task->pid, get_task_comm(task_com, task));
		}
	}
	if (machine_is_m030())
		gpio = EXYNOS4_GPX2(5);
	else
		gpio = EXYNOS4_GPX0(3);

	mx_disable_inand();
	if (gpio_get_value(gpio)) { /* 1. Check reboot charging */
		mx_reboot_internal("charge");
	} else {	/* 2. Power off */
		regs = __raw_readl(S5P_PS_HOLD_CONTROL);
		/* dead loop to avoid sometimes auto restart*/
		while(1) {
			pr_emerg("%s: waiting for power off\n", __func__);
			__raw_writel(regs & 0xFFFFFEFF, S5P_PS_HOLD_CONTROL);
		}
	}
}
static int lcd_power_on(struct lcd_device *ld, int enable)
{
	struct regulator *regulator_vlcd_1v8;
	struct regulator *regulator_vlcd_3v0 = NULL;

	regulator_vlcd_1v8 = regulator_get(NULL, "vlcd_1v8");
	if (IS_ERR(regulator_vlcd_1v8)) {
		pr_info("%s: failed to get %s\n", __func__, "vlcd_1v8");
		return PTR_ERR(regulator_vlcd_1v8);
	}
	if (system_rev < 5) {
	regulator_vlcd_3v0 = regulator_get(NULL, "vlcd_3v3");
		if (IS_ERR(regulator_vlcd_3v0)) {
			pr_info("%s: failed to get %s\n", __func__, "vlcd_3v3");
			return PTR_ERR(regulator_vlcd_3v0);
		}
	}
	gpio_request_one(EXYNOS4_GPX1(1),GPIOF_OUT_INIT_HIGH, "GPX1");

	if (enable){
		if (system_rev < 5) {
			regulator_enable(regulator_vlcd_3v0);
			regulator_enable(regulator_vlcd_1v8);
		} else {
			gpio_set_value(EXYNOS4_GPX1(1), 1);
			regulator_enable(regulator_vlcd_1v8);
		}
	}else {
		if (system_rev < 5)
			regulator_disable(regulator_vlcd_3v0);
		else
			gpio_set_value(EXYNOS4_GPX1(1), 0);
		regulator_disable(regulator_vlcd_1v8);
		/*LCD RESET low at SLEEP*/
		gpio_request_one(EXYNOS4_GPX2(4),GPIOF_OUT_INIT_LOW, "GPX2");
		gpio_free(EXYNOS4_GPX2(4));
	}
	if (system_rev < 5) {
		regulator_put(regulator_vlcd_3v0);
	}
	regulator_put(regulator_vlcd_1v8);
	gpio_free(EXYNOS4_GPX1(1));

	return 0;
}
Beispiel #14
0
static int ltr558_gpio_irq(void)
{
	int ret = 0;

	//config irq
	s3c_gpio_cfgpin(EXYNOS4_GPX2(4), S3C_GPIO_SFN(0xF));
	s3c_gpio_setpull(EXYNOS4_GPX2(4), S3C_GPIO_PULL_UP);
	
	ret = request_irq(ltr558_data->ltr558_irq, ltr558_irq_handler,
					IRQF_TRIGGER_FALLING, LTR558_DEVICE_NAME, NULL);
	if (ret) {
		LTRERR(KERN_ALERT "%s: LTR-558ALS request irq failed.\n", __func__);
		return ret;
	}
	P_L_printk("LTR558 Request irq successfully!\n");
	
	return ret;
}
Beispiel #15
0
static void smdk4x12_ts_gpio_setup(void)
{
	int gpio_reset = EXYNOS4_GPM3(4);

	gpio_request_one(gpio_reset, GPIOF_OUT_INIT_LOW, "TOUCH RESET");
	mdelay(20);
	gpio_direction_output(gpio_reset, 1);
	mdelay(30);
	s3c_gpio_setpull(EXYNOS4_GPX2(6), S3C_GPIO_PULL_NONE);
}
Beispiel #16
0
void samsung_keypad_cfg_gpio(unsigned int rows, unsigned int cols)
{
	

	if (rows > 8) {
		
		s3c_gpio_cfgall_range(EXYNOS4_GPX2(0), 8, S3C_GPIO_SFN(3),
					S3C_GPIO_PULL_UP);

		
		s3c_gpio_cfgall_range(EXYNOS4_GPX3(0), (rows - 8),
					 S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP);
	} else {
		
		s3c_gpio_cfgall_range(EXYNOS4_GPX2(0), rows, S3C_GPIO_SFN(3),
					S3C_GPIO_PULL_UP);
	}

	
	s3c_gpio_cfgrange_nopull(EXYNOS4_GPX1(0), cols, S3C_GPIO_SFN(3));
}
void samsung_keypad_cfg_gpio(unsigned int rows, unsigned int cols)
{
	/* Keypads can be of various combinations, Just making sure */

	if (rows > 8) {
		/* Set all the necessary GPX2 pins: KP_ROW[0~7] */
		s3c_gpio_cfgall_range(EXYNOS4_GPX2(0), 8,
					S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP);

		/* Set all the necessary GPX3 pins: KP_ROW[8~] */
		s3c_gpio_cfgall_range(EXYNOS4_GPX3(0), (rows - 8),
					 S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP);
	} else {
		/* Set all the necessary GPX2 pins: KP_ROW[x] */
		s3c_gpio_cfgall_range(EXYNOS4_GPX2(0), rows,
					 S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP);
	}

	/* Set all the necessary GPX1 pins to special-function 3: KP_COL[x] */
	s3c_gpio_cfgrange_nopull(EXYNOS4_GPX1(0), cols, S3C_GPIO_SFN(3));
}
void samsung_keypad_cfg_gpio(unsigned int rows, unsigned int cols)
{
	/* Keypads can be of various combinations, Just making sure */
#if defined(CONFIG_CPU_TYPE_SCP_SUPPER) || defined(CONFIG_CPU_TYPE_POP_SUPPER) || defined(CONFIG_CPU_TYPE_POP2G_SUPPER)
	/* Set all the necessary GPX2 pins: KP_ROW[x] */
	s3c_gpio_cfgall_range(EXYNOS4_GPX2(0), 2,
					 S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP);

	/*GPL2: KP_COL[x] */
	s3c_gpio_cfgrange_nopull(EXYNOS4_GPL2(0), 1, S3C_GPIO_SFN(3));
#elif  defined(CONFIG_CPU_TYPE_SCP_ELITE) || defined(CONFIG_CPU_TYPE_POP_ELITE) || defined(CONFIG_CPU_TYPE_POP2G_ELITE)
	//ROW_6
	s3c_gpio_cfgall_range(EXYNOS4_GPX2(6), 1,
                                         S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP);

	//ROW_7
	s3c_gpio_cfgall_range(EXYNOS4_GPX2(7), 1,
                                         S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP);

	//ROW_8
	s3c_gpio_cfgall_range(EXYNOS4_GPX3(0), 1,
                                         S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP);

	//ROW_13
	s3c_gpio_cfgall_range(EXYNOS4_GPX3(5), 1,
                                         S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP);

	//COL_0
	s3c_gpio_cfgrange_nopull(EXYNOS4_GPX1(0), 1, S3C_GPIO_SFN(3));

	//COL_3
	s3c_gpio_cfgrange_nopull(EXYNOS4_GPX1(3), 1, S3C_GPIO_SFN(3));

	//COL_5
	s3c_gpio_cfgrange_nopull(EXYNOS4_GPX1(5), 1, S3C_GPIO_SFN(3));

	//COL_6
	s3c_gpio_cfgrange_nopull(EXYNOS4_GPX1(6), 1, S3C_GPIO_SFN(3));
#endif
}
Beispiel #19
0
static inline int exynos4_irq_to_gpio(unsigned int irq)
{
    if (irq < IRQ_EINT(0))
        return -EINVAL;

    irq -= IRQ_EINT(0);
    if (irq < 8)
        return EXYNOS4_GPX0(irq);

    irq -= 8;
    if (irq < 8)
        return EXYNOS4_GPX1(irq);

    irq -= 8;
    if (irq < 8)
        return EXYNOS4_GPX2(irq);

    irq -= 8;
    if (irq < 8)
        return EXYNOS4_GPX3(irq);

    return -EINVAL;
}
static int mipi_lcd_power_control(struct mipi_dsim_device *dsim,
		unsigned int power)
{
	/* reset */
	gpio_request_one(EXYNOS4_GPX2(4), GPIOF_OUT_INIT_HIGH, "GPX2");
	usleep_range(20000, 21000);
	if (power) {
		gpio_set_value(EXYNOS4_GPX2(4), 0);
		usleep_range(20000, 21000);
		gpio_set_value(EXYNOS4_GPX2(4), 1);
		msleep(50);
		gpio_free(EXYNOS4_GPX2(4));
	} else {
		gpio_set_value(EXYNOS4_GPX2(4), 0);
		usleep_range(20000, 21000);
		gpio_set_value(EXYNOS4_GPX2(4), 1);
		usleep_range(20000, 21000);
		gpio_free(EXYNOS4_GPX2(4));
	}
	usleep_range(20000, 21000);
	return 1;
}
		.desc			= "gpio-keys: KEY_HOME",
		.type			= EV_KEY,
		.active_low		= 1,
		.wakeup			= 1,
		.debounce_interval	= 1,
	}, {
		.code			= KEY_BACK,
		.gpio			= EXYNOS4_GPX1(7),
		.desc			= "gpio-keys: KEY_BACK",
		.type			= EV_KEY,
		.active_low		= 1,
		.wakeup			= 1,
		.debounce_interval	= 1,
	}, {
		.code			= KEY_UP,
		.gpio			= EXYNOS4_GPX2(0),
		.desc			= "gpio-keys: KEY_UP",
		.type			= EV_KEY,
		.active_low		= 1,
		.wakeup			= 1,
		.debounce_interval	= 1,
	}, {
		.code			= KEY_DOWN,
		.gpio			= EXYNOS4_GPX2(1),
		.desc			= "gpio-keys: KEY_DOWN",
		.type			= EV_KEY,
		.active_low		= 1,
		.wakeup			= 1,
		.debounce_interval	= 1,
	},
};
Beispiel #22
0
	i2c_gpio12_devs[0].irq = gpio_to_irq(gpio);

	gpio = EXYNOS4_GPE3(3);			/* XMDMDATA_3 */
	gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, "3_TOUCH_EN");
}

static struct s3c2410_platform_i2c universal_i2c0_platdata __initdata = {
	.frequency	= 300 * 1000,
	.sda_delay	= 200,
};

/* GPIO KEYS */
static struct gpio_keys_button universal_gpio_keys_tables[] = {
	{
		.code			= KEY_VOLUMEUP,
		.gpio			= EXYNOS4_GPX2(0),	/* XEINT16 */
		.desc			= "gpio-keys: KEY_VOLUMEUP",
		.type			= EV_KEY,
		.active_low		= 1,
		.debounce_interval	= 1,
	}, {
		.code			= KEY_VOLUMEDOWN,
		.gpio			= EXYNOS4_GPX2(1),	/* XEINT17 */
		.desc			= "gpio-keys: KEY_VOLUMEDOWN",
		.type			= EV_KEY,
		.active_low		= 1,
		.debounce_interval	= 1,
	}, {
		.code			= KEY_CONFIG,
		.gpio			= EXYNOS4_GPX2(2),	/* XEINT18 */
		.desc			= "gpio-keys: KEY_CONFIG",
 {   EXYNOS4_GPX0(5), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
     S3C_GPIO_PULL_DOWN, S5P_GPIO_DRVSTR_LV1
 },
 {   EXYNOS4_GPX0(6), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
     S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1
 }, /* 3G_DET */
 {   EXYNOS4_GPX0(7), S3C_GPIO_SFN(0xF), S3C_GPIO_SETPIN_NONE,
     S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1
 }, /* AP_PMIC_IRQ */
 {   EXYNOS4_GPX1(4), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
     S3C_GPIO_PULL_DOWN, S5P_GPIO_DRVSTR_LV1
 },
 {   EXYNOS4_GPX1(7), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
     S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1
 }, /* NFC_IRQ */
 {   EXYNOS4_GPX2(0), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
     S3C_GPIO_PULL_DOWN, S5P_GPIO_DRVSTR_LV1
 },
 {   EXYNOS4_GPX2(1), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
     S3C_GPIO_PULL_DOWN, S5P_GPIO_DRVSTR_LV1
 },
 {   EXYNOS4_GPX2(4), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
     S3C_GPIO_PULL_DOWN, S5P_GPIO_DRVSTR_LV1
 }, /* V_BUS_INT */
 {   EXYNOS4_GPX2(3), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
     S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1
 }, /* FUEL_ALERT */
 {   EXYNOS4_GPX2(5), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
     S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1
 }, /* WLAN_HOST_WAKEUP */
 {   EXYNOS4_GPX2(6), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
Beispiel #24
0
static int smdk4x12_ts_get_value(void)
{
	return gpio_get_value(EXYNOS4_GPX2(6));
}
Beispiel #25
0
				MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
	.cd_type		= S3C_SDHCI_CD_EXTERNAL,
};

static void __init nuri_sdhci_init(void)
{
	s3c_sdhci0_set_platdata(&nuri_hsmmc0_data);
	s3c_sdhci2_set_platdata(&nuri_hsmmc2_data);
	s3c_sdhci3_set_platdata(&nuri_hsmmc3_data);
}

/* GPIO KEYS */
static struct gpio_keys_button nuri_gpio_keys_tables[] = {
	{
		.code			= KEY_VOLUMEUP,
		.gpio			= EXYNOS4_GPX2(0),	/* XEINT16 */
		.desc			= "gpio-keys: KEY_VOLUMEUP",
		.type			= EV_KEY,
		.active_low		= 1,
		.debounce_interval	= 1,
	}, {
		.code			= KEY_VOLUMEDOWN,
		.gpio			= EXYNOS4_GPX2(1),	/* XEINT17 */
		.desc			= "gpio-keys: KEY_VOLUMEDOWN",
		.type			= EV_KEY,
		.active_low		= 1,
		.debounce_interval	= 1,
	}, {
		.code			= KEY_POWER,
		.gpio			= EXYNOS4_GPX2(7),	/* XEINT23 */
		.desc			= "gpio-keys: KEY_POWER",
Beispiel #26
0
	}, {
		.base	= (S5P_VA_GPIO2 + 0xC20),
		.config	= &gpio_cfg_noint,
		.irq_base = IRQ_EINT(8),
		.chip	= {
			.base	= EXYNOS4_GPX1(0),
			.ngpio	= EXYNOS4_GPIO_X1_NR,
			.label	= "GPX1",
			.to_irq	= samsung_gpiolib_to_irq,
		},
	}, {
		.base	= (S5P_VA_GPIO2 + 0xC40),
		.config	= &gpio_cfg_noint,
		.irq_base = IRQ_EINT(16),
		.chip	= {
			.base	= EXYNOS4_GPX2(0),
			.ngpio	= EXYNOS4_GPIO_X2_NR,
			.label	= "GPX2",
			.to_irq	= samsung_gpiolib_to_irq,
		},
	}, {
		.base	= (S5P_VA_GPIO2 + 0xC60),
		.config	= &gpio_cfg_noint,
		.irq_base = IRQ_EINT(24),
		.chip	= {
			.base	= EXYNOS4_GPX3(0),
			.ngpio	= EXYNOS4_GPIO_X3_NR,
			.label	= "GPX3",
			.to_irq	= samsung_gpiolib_to_irq,
		},
	}, {
Beispiel #27
0
		.ufcon		= ARMLEX4210_UFCON_DEFAULT,
	},
};

static struct s3c_sdhci_platdata armlex4210_hsmmc0_pdata __initdata = {
	.cd_type		= S3C_SDHCI_CD_PERMANENT,
	.clk_type		= S3C_SDHCI_CLK_DIV_EXTERNAL,
#ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT
	.max_width		= 8,
	.host_caps		= MMC_CAP_8_BIT_DATA,
#endif
};

static struct s3c_sdhci_platdata armlex4210_hsmmc2_pdata __initdata = {
	.cd_type		= S3C_SDHCI_CD_GPIO,
	.ext_cd_gpio		= EXYNOS4_GPX2(5),
	.ext_cd_gpio_invert	= 1,
	.clk_type		= S3C_SDHCI_CLK_DIV_EXTERNAL,
	.max_width		= 4,
};

static struct s3c_sdhci_platdata armlex4210_hsmmc3_pdata __initdata = {
	.cd_type		= S3C_SDHCI_CD_PERMANENT,
	.clk_type		= S3C_SDHCI_CLK_DIV_EXTERNAL,
	.max_width		= 4,
};

static void __init armlex4210_sdhci_init(void)
{
	s3c_sdhci0_set_platdata(&armlex4210_hsmmc0_pdata);
	s3c_sdhci2_set_platdata(&armlex4210_hsmmc2_pdata);
Beispiel #28
0
		S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* WLAN_SDIO_D(0) */
	{EXYNOS4_GPK3(4), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
		S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* WLAN_SDIO_D(1) */
	{EXYNOS4_GPK3(5), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
		S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* WLAN_SDIO_D(2) */
	{EXYNOS4_GPK3(6), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
		S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* WLAN_SDIO_D(3) */

	{EXYNOS4_GPX0(1), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
		S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* VOL_UP */
	{EXYNOS4_GPX0(2), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
		S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* VOL_DOWN */
	{EXYNOS4_GPX0(3), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
		S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* GPIO_BOOT_MODE */

	{EXYNOS4_GPX2(3), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
		S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* GPIO_FUEL_ALERT */

	{EXYNOS4_GPX3(1), S3C_GPIO_OUTPUT, S3C_GPIO_SETPIN_ZERO,
		S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1},
	{EXYNOS4_GPX3(2), S3C_GPIO_SFN(GPIO_DET_35_AF), S3C_GPIO_SETPIN_NONE,
		S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1}, /* GPIO_DET_35 */
	{EXYNOS4_GPX3(3), S3C_GPIO_OUTPUT, S3C_GPIO_SETPIN_ZERO,
		S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1},
	{EXYNOS4_GPX3(4), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
		S3C_GPIO_PULL_NONE, S5P_GPIO_DRVSTR_LV1},

	{EXYNOS4_GPY0(0), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
		S3C_GPIO_PULL_DOWN, S5P_GPIO_DRVSTR_LV1},
	{EXYNOS4_GPY0(1), S3C_GPIO_INPUT, S3C_GPIO_SETPIN_NONE,
		S3C_GPIO_PULL_DOWN, S5P_GPIO_DRVSTR_LV1},

#if  defined(CONFIG_CPU_TYPE_SCP_ELITE) || defined(CONFIG_CPU_TYPE_POP_ELITE) || defined(CONFIG_CPU_TYPE_POP2G_ELITE)
static int led_gpios[] = {
	EXYNOS4_GPL2(0),
	EXYNOS4_GPK1(1),
};

#elif defined(CONFIG_CPU_TYPE_SCP_SUPPER) || defined(CONFIG_CPU_TYPE_POP_SUPPER) || defined(CONFIG_CPU_TYPE_POP2G_SUPPER)


static int led_gpios[] = {
#if defined(CONFIG_MTK_COMBO_COMM) || defined(CONFIG_MTK_COMBO_COMM_MODULE)
	EXYNOS4_GPC0(2),
#else
	EXYNOS4_GPX2(5),
#endif
	EXYNOS4_GPX0(1),
};


#endif
#define LED_NUM		ARRAY_SIZE(led_gpios)

int leds_open(struct inode *inode,struct file *filp)
{
	DPRINTK("Device Opened Success!\n");
	return nonseekable_open(inode,filp);
}

int leds_release(struct inode *inode,struct file *filp)