当前位置: 首页>>代码示例>>C++>>正文


C++ EXYNOS4_GPX0函数代码示例

本文整理汇总了C++中EXYNOS4_GPX0函数的典型用法代码示例。如果您正苦于以下问题:C++ EXYNOS4_GPX0函数的具体用法?C++ EXYNOS4_GPX0怎么用?C++ EXYNOS4_GPX0使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了EXYNOS4_GPX0函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: lcd_lte480wv_set_power

static void lcd_lte480wv_set_power(struct plat_lcd_data *pd,
				   unsigned int power)
{
	if (power) {
#if !defined(CONFIG_BACKLIGHT_PWM)
		gpio_request_one(EXYNOS4_GPD0(1), GPIOF_OUT_INIT_HIGH, "GPD0");
		gpio_free(EXYNOS4_GPD0(1));
#endif
		/* fire nRESET on power up */
		gpio_request(EXYNOS4_GPX0(6), "GPX0");

		gpio_direction_output(EXYNOS4_GPX0(6), 1);
		mdelay(100);

		gpio_set_value(EXYNOS4_GPX0(6), 0);
		mdelay(10);

		gpio_set_value(EXYNOS4_GPX0(6), 1);
		mdelay(10);

		gpio_free(EXYNOS4_GPX0(6));
	} else {
#if !defined(CONFIG_BACKLIGHT_PWM)
		gpio_request_one(EXYNOS4_GPD0(1), GPIOF_OUT_INIT_LOW, "GPD0");
		gpio_free(EXYNOS4_GPD0(1));
#endif
	}
}
开发者ID:303750856,项目名称:linux-3.1,代码行数:28,代码来源:mach-smdkc210.c

示例2: s3cfb_lcd_on

int s3cfb_lcd_on(struct platform_device *pdev)
{
	int err;

#ifdef CONFIG_MACH_SMDKC210
	err = gpio_request_one(EXYNOS4_GPX0(6), GPIOF_OUT_INIT_HIGH, "GPX0");
	if (err) {
		printk(KERN_ERR "failed to request GPX0 for "
			"lcd reset control\n");
		return err;
	}

	gpio_set_value(EXYNOS4_GPX0(6), 0);
	mdelay(1);

	gpio_set_value(EXYNOS4_GPX0(6), 1);

	gpio_free(EXYNOS4_GPX0(6));
#elif defined(CONFIG_MACH_SMDK4X12)
	if (samsung_board_rev_is_0_1()) {
		err = gpio_request_one(EXYNOS4212_GPM3(6),
				GPIOF_OUT_INIT_HIGH, "GPM3");
		if (err) {
			printk(KERN_ERR "failed to request GPM3 for "
				"lcd reset control\n");
			return err;
		}

		gpio_set_value(EXYNOS4212_GPM3(6), 0);
		mdelay(1);

		gpio_set_value(EXYNOS4212_GPM3(6), 1);

		gpio_free(EXYNOS4212_GPM3(6));

	} else {
		err = gpio_request_one(EXYNOS4_GPX1(5),
				GPIOF_OUT_INIT_HIGH, "GPX0");
		if (err) {
			printk(KERN_ERR "failed to request GPX0 for "
				"lcd reset control\n");
			return err;
		}

		gpio_set_value(EXYNOS4_GPX1(5), 0);
		mdelay(1);

		gpio_set_value(EXYNOS4_GPX1(5), 1);

		gpio_free(EXYNOS4_GPX1(5));
	}
#endif

	return 0;
}
开发者ID:dadonking,项目名称:xxICSKernel,代码行数:55,代码来源:setup-fb-s5p.c

示例3: s3cfb_lcd_on

int s3cfb_lcd_on(struct platform_device *pdev)
{
	int err;

	if (machine_is_smdkc210()) {
		err = gpio_request_one(EXYNOS4_GPX0(6), GPIOF_OUT_INIT_HIGH, "GPX0");
		if (err) {
			printk(KERN_ERR "failed to request GPX0 for "
				"lcd reset control\n");
			return err;
		}

		gpio_set_value(EXYNOS4_GPX0(6), 0);
		mdelay(1);

		gpio_set_value(EXYNOS4_GPX0(6), 1);

		gpio_free(EXYNOS4_GPX0(6));
	} else if (machine_is_smdk4412()) {
		if (samsung_board_rev_is_0_1()) {
			err = gpio_request_one(EXYNOS4212_GPM3(6),
					GPIOF_OUT_INIT_HIGH, "GPM3");
			if (err) {
				printk(KERN_ERR "failed to request GPM3 for "
					"lcd reset control\n");
				return err;
			}

			gpio_set_value(EXYNOS4212_GPM3(6), 0);
			mdelay(1);

			gpio_set_value(EXYNOS4212_GPM3(6), 1);

			gpio_free(EXYNOS4212_GPM3(6));

		} else {
			err = gpio_request_one(EXYNOS4_GPX1(5),
					GPIOF_OUT_INIT_HIGH, "GPX0");
			if (err) {
				printk(KERN_ERR "failed to request GPX0 for "
					"lcd reset control\n");
				return err;
			}

			gpio_set_value(EXYNOS4_GPX1(5), 0);
			mdelay(1);

			gpio_set_value(EXYNOS4_GPX1(5), 1);

			gpio_free(EXYNOS4_GPX1(5));
		}
	}

	return 0;
}
开发者ID:Goodzila,项目名称:m040,代码行数:55,代码来源:setup-fb-s5p.c

示例4: nuri_power_init

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);
}
开发者ID:Korn1699,项目名称:linux,代码行数:33,代码来源:mach-nuri.c

示例5: nuri_machine_init

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;
}
开发者ID:Blueprint-Marketing,项目名称:GCG-3.3,代码行数:34,代码来源:mach-nuri.c

示例6: s3c_gpio_get_slp_cfgpin

s3c_gpio_pull_t s3c_gpio_get_slp_cfgpin(unsigned int pin)
{
	struct s3c_gpio_chip *chip = s3c_gpiolib_getchip(pin);
	void __iomem *reg;
	unsigned long flags;
	int offset;
	u32 con;
	int shift;

	if (!chip)
		return -EINVAL;

	if ((pin >= EXYNOS4_GPX0(0)) && (pin <= EXYNOS4_GPX3(7)))
		return -EINVAL;

	reg = chip->base + 0x10;

	offset = pin - chip->chip.base;
	shift = offset * 2;

	local_irq_save(flags);

	con = __raw_readl(reg);
	con >>= shift;
	con &= 0x3;

	local_irq_restore(flags);

	return (__force s3c_gpio_pull_t)con;
}
开发者ID:Hackhao,项目名称:tzos,代码行数:30,代码来源:gpio-exynos4.c

示例7: s3c_gpio_slp_setpull_updown

int s3c_gpio_slp_setpull_updown(unsigned int pin, unsigned int config)
{
	struct s3c_gpio_chip *chip = s3c_gpiolib_getchip(pin);
	void __iomem *reg;
	unsigned long flags;
	int offset;
	u32 con;
	int shift;

	if (!chip)
		return -EINVAL;

	if ((pin >= EXYNOS4_GPX0(0)) && (pin <= EXYNOS4_GPX3(7)))
		return -EINVAL;

	if (config > S3C_GPIO_PULL_UP)
		return -EINVAL;

	reg = chip->base + 0x14;

	offset = pin - chip->chip.base;
	shift = offset * 2;

	local_irq_save(flags);

	con = __raw_readl(reg);
	con &= ~(3 << shift);
	con |= config << shift;
	__raw_writel(con, reg);

	local_irq_restore(flags);

	return 0;
}
开发者ID:Hackhao,项目名称:tzos,代码行数:34,代码来源:gpio-exynos4.c

示例8: mx_power_off

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);
		}
	}
}
开发者ID:Goodzila,项目名称:m040,代码行数:33,代码来源:mx_reboot.c

示例9: nuri_machine_init

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));
}
开发者ID:Korn1699,项目名称:linux,代码行数:32,代码来源:mach-nuri.c

示例10: nuri_machine_init

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));
}
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:26,代码来源:mach-nuri.c

示例11: is_cable_insert

static inline int is_cable_insert(void)
{
	int gpio;

	gpio = EXYNOS4_GPX0(2);
	
	return gpio_get_value(gpio);
}
开发者ID:Goodzila,项目名称:m040,代码行数:8,代码来源:mx2_reboot.c

示例12: nuri_tsp_init

static void __init nuri_tsp_init(void)
{
	int gpio;

	/* TOUCH_INT: XEINT_4 */
	gpio = EXYNOS4_GPX0(4);
	gpio_request(gpio, "TOUCH_INT");
	s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
	s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
}
开发者ID:Korn1699,项目名称:linux,代码行数:10,代码来源:mach-nuri.c

示例13: bcm_wlan_get_oob_irq

uint bcm_wlan_get_oob_irq(void)
{
	uint host_oob_irq = 0;

#ifdef CONFIG_MACH_ODROID_4210
	printk("GPIO(WL_HOST_WAKE) = EXYNOS4_GPX0(7) = %d\n", EXYNOS4_GPX0(7));
	host_oob_irq = gpio_to_irq(EXYNOS4_GPX0(7));
	gpio_direction_input(EXYNOS4_GPX0(7));
#endif
#ifdef CUSTOMER_HW_ALLWINNER
	script_item_value_type_e type;
	script_item_u val;
	int ret, wl_host_wake = 0;

	type = script_get_item("wifi_para", "wl_host_wake", &val);
	if (SCIRPT_ITEM_VALUE_TYPE_PIO != type) {
		printk("get bcmdhd wl_host_wake gpio failed\n");
		return 0;
	} else {
		wl_host_wake = val.gpio.gpio;
	}
	printk("GPIO(WL_HOST_WAKE) = %d\n", wl_host_wake);

	ret = gpio_request(wl_host_wake, "oob irq");
	if (ret < 0) {
		printk("Failed to request gpio [%d] for WL_HOST_WAKE\n", wl_host_wake);
		return ret;
	}

	gpio_direction_input(wl_host_wake);
	host_oob_irq = gpio_to_irq(wl_host_wake);
	if (IS_ERR_VALUE(host_oob_irq)) {
		gpio_free(wl_host_wake);
		printk("map gpio [%d] to virq failed, errno = %d\n",wl_host_wake, host_oob_irq);
		return 0;
	}
#endif
	printk("host_oob_irq: %d \r\n", host_oob_irq);

	return host_oob_irq;
}
开发者ID:GREYFOXRGR,项目名称:BPI-M3-bsp,代码行数:41,代码来源:dhd_gpio.c

示例14: config_sleep_gpio_table

static void config_sleep_gpio_table(int array_size,
				    unsigned int (*gpio_table)[3])
{
	u32 i, gpio;

	for (i = 0; i < array_size; i++) {
		gpio = gpio_table[i][0];
		s3c_gpio_slp_cfgpin(gpio, gpio_table[i][1]);
		s3c_gpio_slp_setpull_updown(gpio, gpio_table[i][2]);
	}

	/* GPX GPIO setting */
	s3c_gpio_cfgpin(EXYNOS4_GPX1(7), S3C_GPIO_INPUT);
	s3c_gpio_setpull(EXYNOS4_GPX1(7), S3C_GPIO_PULL_DOWN);

#if defined(CONFIG_MACH_Q1_CMCC_BD)
	s3c_gpio_cfgpin(EXYNOS4_GPX0(5), S3C_GPIO_OUTPUT);
	s3c_gpio_setpull(EXYNOS4_GPX0(5), S3C_GPIO_PULL_NONE);
	gpio_set_value(EXYNOS4_GPX0(5), GPIO_LEVEL_LOW);
#endif
}
开发者ID:Forest1971,项目名称:legacy_android_kernel_exynos4210,代码行数:21,代码来源:q1-gpio.c

示例15: exynos4_irq_to_gpio

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;
}
开发者ID:rslotte,项目名称:OGS-Arm,代码行数:23,代码来源:common.c


注:本文中的EXYNOS4_GPX0函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。