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


C++ EXYNOS4_GPX2函数代码示例

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


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

示例1: s5p_mipi_dsi_lcd_power_on_off

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);
}
开发者ID:Biktorgj,项目名称:Android_b2_Kernel,代码行数:30,代码来源:board-kmini-display.c

示例2: lcd_power_on

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;
}
开发者ID:CurtisMJ,项目名称:android_kernel_samsung_kminilte,代码行数:32,代码来源:board-kmini-display.c

示例3: origen_bt_setup

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);
}
开发者ID:Jackeagle,项目名称:android_kernel_sony_c2305,代码行数:9,代码来源:mach-origen.c

示例4: s5p_mipi_dsi_lcd_reset

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));
}
开发者ID:Biktorgj,项目名称:Android_b2_Kernel,代码行数:10,代码来源:board-kmini-display.c

示例5: reset_lcd

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;
}
开发者ID:cm-3470,项目名称:android_kernel_samsung_degaslte,代码行数:10,代码来源:board-degas-display.c

示例6: bcm4329_wifi_init

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;
}
开发者ID:Frontier314,项目名称:kernel_s702hf,代码行数:11,代码来源:dev-hsmmc3.c

示例7: armlex4210_wlan_init

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

示例8: 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

示例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);

	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

示例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));

	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

示例11: 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

示例12: 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

示例13: lcd_power_on

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;
}
开发者ID:cm-3470,项目名称:android_kernel_samsung_degaslte,代码行数:45,代码来源:board-degas-display.c

示例14: ltr558_gpio_irq

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;
}
开发者ID:nightvixen,项目名称:explosion_kernel,代码行数:18,代码来源:ltr558.c

示例15: smdk4x12_ts_gpio_setup

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);
}
开发者ID:aijiekj,项目名称:m35x,代码行数:10,代码来源:mach-smdk4x12.c


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