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


C++ S5PV210_GPH0函数代码示例

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


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

示例1: 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 <= S5PV210_GPH3(7)) && (pin >= S5PV210_GPH0(0)))
		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:Asure,项目名称:Dropad-kernel-2.6.35.7,代码行数:30,代码来源:gpiolib.c

示例2: s3c_gpio_slp_cfgpin

/* S5PV210 machine dependent GPIO help function */
int s3c_gpio_slp_cfgpin(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 <= S5PV210_GPH3(7)) && (pin >= S5PV210_GPH0(0)))
		return -EINVAL;

	if (config > S3C_GPIO_SLP_PREV)
		return -EINVAL;

	reg = chip->base + 0x10;

	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:Asure,项目名称:Dropad-kernel-2.6.35.7,代码行数:34,代码来源:gpiolib.c

示例3: s3cfb_cfg_gpio

void s3cfb_cfg_gpio(struct platform_device *pdev)
{
	int i;

	for (i = 0; i < 8; i++) {
		s3c_gpio_cfgpin(S5PV210_GPF0(i), S3C_GPIO_SFN(2));
		s3c_gpio_setpull(S5PV210_GPF0(i), S3C_GPIO_PULL_NONE);
	}

	for (i = 0; i < 8; i++) {
		s3c_gpio_cfgpin(S5PV210_GPF1(i), S3C_GPIO_SFN(2));
		s3c_gpio_setpull(S5PV210_GPF1(i), S3C_GPIO_PULL_NONE);
	}

	for (i = 0; i < 8; i++) {
		s3c_gpio_cfgpin(S5PV210_GPF2(i), S3C_GPIO_SFN(2));
		s3c_gpio_setpull(S5PV210_GPF2(i), S3C_GPIO_PULL_NONE);
	}

	for (i = 0; i < 4; i++) {
		s3c_gpio_cfgpin(S5PV210_GPF3(i), S3C_GPIO_SFN(2));
		s3c_gpio_setpull(S5PV210_GPF3(i), S3C_GPIO_PULL_NONE);
	}

	/* mDNIe SEL: why we shall write 0x2 ? */
	writel(0x2, S5P_MDNIE_SEL);

	/* drive strength to max */
	writel(0xffffffff, S5P_VA_GPIO + 0x12c);
	writel(0xffffffff, S5P_VA_GPIO + 0x14c);
	writel(0xffffffff, S5P_VA_GPIO + 0x16c);
	writel(0x000000ff, S5P_VA_GPIO + 0x18c);

	s3c_gpio_cfgpin(S5PV210_GPB(4), S3C_GPIO_SFN(1));
	s3c_gpio_cfgpin(S5PV210_GPB(5), S3C_GPIO_SFN(1));
	s3c_gpio_cfgpin(S5PV210_GPB(6), S3C_GPIO_SFN(1));
	s3c_gpio_cfgpin(S5PV210_GPB(7), S3C_GPIO_SFN(1));

	s3c_gpio_setpull(S5PV210_GPB(4), S3C_GPIO_PULL_NONE);
	s3c_gpio_setpull(S5PV210_GPB(5), S3C_GPIO_PULL_NONE);
	s3c_gpio_setpull(S5PV210_GPB(6), S3C_GPIO_PULL_NONE);
	s3c_gpio_setpull(S5PV210_GPB(7), S3C_GPIO_PULL_NONE);

	gpio_request(S5PV210_GPH0(5), "GPH0");
	gpio_direction_output(S5PV210_GPH0(5), 1);
}
开发者ID:Asure,项目名称:Dropad-kernel-2.6.32.9,代码行数:46,代码来源:setup-fb.c

示例4: s3cfb_lcd_off

int s3cfb_lcd_off(struct platform_device *pdev)
{
	printk("LCD.....off");
//	gpio_set_value(S5PV210_GPH0(7), 0);
	gpio_set_value(S5PV210_GPH0(7), 1);
	
	return 0;
}
开发者ID:uplusplus,项目名称:ls300_smdkc110,代码行数:8,代码来源:setup-fb.c

示例5: smdkv210_cam1_power

static int smdkv210_cam1_power(int onoff)
{
	int err;

	/* Camera B */
	err = gpio_request(S5PV210_GPH0(3), "GPH0");
	if (err)
		printk(KERN_ERR "#### failed to request GPH0 for CAM_2V8\n");

	s3c_gpio_setpull(S5PV210_GPH0(3), S3C_GPIO_PULL_NONE);
	gpio_direction_output(S5PV210_GPH0(3), 0);
	gpio_direction_output(S5PV210_GPH0(3), 1);
	udelay(1000);
	gpio_free(S5PV210_GPH0(3));

	return 0;
}
开发者ID:dalinaum,项目名称:studyak,代码行数:17,代码来源:mach-hkdkc110.c

示例6: charregister_exit

static void charregister_exit(void)
{
	dev_t dev_id;
	
	printk("%s: unregister a char device\n", __FUNCTION__);
	gpio_free(S5PV210_GPH0(0));
	dev_id = MKDEV(major, 0);
	cdev_del(&cdev);
	unregister_chrdev_region(dev_id, CHAR_COUNT);
}
开发者ID:huaweili,项目名称:esd,代码行数:10,代码来源:charregister.c

示例7: button_read

static ssize_t button_read(struct file *file, char __user *buffer, 
								size_t count, loff_t *ppos)
{
	unsigned char key_value;

	key_value = gpio_get_value(S5PV210_GPH0(0));
	if(copy_to_user(buffer, &key_value, sizeof(key_value))){
		printk("%s: read failed.\n", __FUNCTION__);
		return -EFAULT;
	}
	return count;
}
开发者ID:huaweili,项目名称:esd,代码行数:12,代码来源:charregister.c

示例8: s3cfb_reset_lcd

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

	err = gpio_request(S5PV210_GPH0(1), "GPH0");
	if (err) {
		printk(KERN_ERR "failed to request GPH0 for "
			"lcd reset control\n");
		return err;
	}

	gpio_direction_output(S5PV210_GPH0(1), 1);

	gpio_set_value(S5PV210_GPH0(1), 0);

	gpio_set_value(S5PV210_GPH0(1), 1);

	gpio_free(S5PV210_GPH0(1));

	return 0;
}
开发者ID:egonalter,项目名称:R-Link_kernel,代码行数:21,代码来源:setup-fb.c

示例9: smdkv210_cam1_power

static int smdkv210_cam1_power(int onoff)
{
	int err;

	/* S/W workaround for the SMDK_CAM4_type board
	 * When SMDK_CAM4 type module is initialized at power reset,
	 * it needs the cam_mclk.
	 *
	 * Now cam_mclk is set as below, need only set the gpio mux.
	 * CAM_SRC1 = 0x0006000, CLK_DIV1 = 0x00070400.
	 * cam_mclk source is SCLKMPLL, and divider value is 8.
	*/

	/* gpio mux select the cam_mclk */
	err = gpio_request(S5PV210_GPJ1(4), "GPJ1");
	if (err)
		printk(KERN_ERR "#### failed to request GPJ1 for CAM_2V8\n");

	s3c_gpio_setpull(S5PV210_GPJ1(4), S3C_GPIO_PULL_NONE);
	s3c_gpio_cfgpin(S5PV210_GPJ1(4), (0x3<<16));


	/* Camera B */
	err = gpio_request(S5PV210_GPH0(3), "GPH0");
	if (err)
		printk(KERN_ERR "#### failed to request GPH0 for CAM_2V8\n");

	s3c_gpio_setpull(S5PV210_GPH0(3), S3C_GPIO_PULL_NONE);
	gpio_direction_output(S5PV210_GPH0(3), 0);
	gpio_direction_output(S5PV210_GPH0(3), 1);

	udelay(1000);

	gpio_free(S5PV210_GPJ1(4));
	gpio_free(S5PV210_GPH0(3));

	return 0;
}
开发者ID:Asure,项目名称:Dropad-kernel-2.6.32.9,代码行数:38,代码来源:mach-smdkc110.c

示例10: charregister_init

static int charregister_init(void)
{
	int retval;
	dev_t dev_id;

	printk("%s: register a char device\n", __FUNCTION__);
	if (major) {
		dev_id = MKDEV(major, 0);
		retval = register_chrdev_region(dev_id, CHAR_COUNT, CHAR_NAME);
	} else {
		retval = alloc_chrdev_region(&dev_id, CHAR_BASEMINOR, 
										CHAR_COUNT, CHAR_NAME);
		major = MAJOR(dev_id);
		printk("%s: major = %d\n", __FUNCTION__, major);
	}

	if (retval) {
		printk("%s: Cannot register a char device\n", __FUNCTION__);
		goto failure_register_char;
	}

	cdev_init(&cdev, &button_fops);
	retval = cdev_add(&cdev, dev_id, CHAR_COUNT);
	if (retval < 0) {
		printk("%s: add cdev failed.\n", __FUNCTION__);
		goto failure_add_cdev;
	}

	retval = gpio_request(S5PV210_GPH0(0), "BUTTON");
	if(retval) {
		printk("%s: request gpio for button failed.\n", __FUNCTION__);
		goto failure_request_gpio;
	}
	return 0;
failure_request_gpio:
	cdev_del(&cdev);
failure_add_cdev:
	unregister_chrdev_region(dev_id, CHAR_COUNT);
failure_register_char:
	return retval;
}
开发者ID:huaweili,项目名称:esd,代码行数:41,代码来源:charregister.c

示例11: S5PV210_GPH0

/* 3.5 pie jack detection DAPM pins */
static struct snd_soc_jack_pin jack_pins[] = {
	{
		.pin = "Headset Mic",
		.mask = SND_JACK_MICROPHONE,
	}, {
		.pin = "Headset Stereophone",
		.mask = SND_JACK_HEADPHONE | SND_JACK_MECHANICAL |
			SND_JACK_AVOUT,
	},
};

/* 3.5 pie jack detection gpios */
static struct snd_soc_jack_gpio jack_gpios[] = {
	{
		.gpio = S5PV210_GPH0(6),
		.name = "DET_3.5",
		.report = SND_JACK_HEADSET | SND_JACK_MECHANICAL |
			SND_JACK_AVOUT,
		.debounce_time = 200,
	},
};

static const struct snd_soc_dapm_widget goni_dapm_widgets[] = {
	SND_SOC_DAPM_SPK("Ext Left Spk", NULL),
	SND_SOC_DAPM_SPK("Ext Right Spk", NULL),
	SND_SOC_DAPM_SPK("Ext Rcv", NULL),
	SND_SOC_DAPM_HP("Headset Stereophone", NULL),
	SND_SOC_DAPM_MIC("Headset Mic", NULL),
	SND_SOC_DAPM_MIC("Main Mic", NULL),
	SND_SOC_DAPM_MIC("2nd Mic", NULL),
开发者ID:454053205,项目名称:linux,代码行数:31,代码来源:goni_wm8994.c

示例12: ARRAY_SIZE

	{ MAX8998_LDO12, &goni_ldo12_data },
	{ MAX8998_LDO13, &goni_ldo13_data },
	{ MAX8998_LDO14, &goni_ldo14_data },
	{ MAX8998_LDO15, &goni_ldo15_data },
	{ MAX8998_LDO16, &goni_ldo16_data },
	{ MAX8998_LDO17, &goni_ldo17_data },
	{ MAX8998_BUCK1, &goni_buck1_data },
	{ MAX8998_BUCK2, &goni_buck2_data },
	{ MAX8998_BUCK3, &goni_buck3_data },
	{ MAX8998_BUCK4, &goni_buck4_data },
};

static struct max8998_platform_data goni_max8998_pdata = {
	.num_regulators	= ARRAY_SIZE(goni_regulators),
	.regulators	= goni_regulators,
	.buck1_set1	= S5PV210_GPH0(3),
	.buck1_set2	= S5PV210_GPH0(4),
	.buck2_set3	= S5PV210_GPH0(5),
	.buck1_voltage1	= 1200000,
	.buck1_voltage2	= 1200000,
	.buck1_voltage3	= 1200000,
	.buck1_voltage4	= 1200000,
	.buck2_voltage1	= 1200000,
	.buck2_voltage2	= 1200000,
};
#endif

static struct regulator_consumer_supply wm8994_fixed_voltage0_supplies[] = {
	REGULATOR_SUPPLY("DBVDD", "5-001a"),
	REGULATOR_SUPPLY("AVDD2", "5-001a"),
	REGULATOR_SUPPLY("CPVDD", "5-001a"),
开发者ID:5victor,项目名称:linux,代码行数:31,代码来源:mach-goni.c

示例13: button_close

static int button_close(struct inode *inode, struct file *file)
{
	printk("%s\n", __FUNCTION__);
	gpio_direction_output(S5PV210_GPH0(0), 0);
	return 0;
}
开发者ID:huaweili,项目名称:esd,代码行数:6,代码来源:charregister.c

示例14: S5PV210_GPH0

	.pwm_period_ns	= 2500000,
	.init		= smdkv210_backlight_init,
	.exit		= smdkv210_backlight_exit,
};

static struct platform_device smdkv210_backlight_device = {
	.name		= "pwm-backlight",
	.dev		= {
		.parent		= &s3c_device_timer[3].dev,
		.platform_data	= &smdkv210_backlight_data,
	},
};
static struct gpio_keys_button origen_gpio_keys_table[] = {
        {
                .code = KEY_MENU,
                .gpio = S5PV210_GPH0(4),
                .desc = "gpio-keys: KEY_MENU",
                .type = EV_KEY,
                .active_low = 1,
                .wakeup = 1,
                .debounce_interval = 1,
        },
#if 1
        {
                .code = 26,
                .gpio = S5PV210_GPH3(7),
                .desc = "gpio-keys: KEY_MENU",
                .type = EV_KEY,
                .active_low = 1,
                .wakeup = 1,
                .debounce_interval = 1,
开发者ID:gotokernel,项目名称:qt210_ics_kernel3.0.8,代码行数:31,代码来源:mach-smdkv210.c

示例15: setup_sdhci0_gpio_wp

static void setup_sdhci0_gpio_wp(void)
{
	s3c_gpio_cfgpin(S5PV210_GPH0(7), S3C_GPIO_INPUT);
	s3c_gpio_setpull(S5PV210_GPH0(7), S3C_GPIO_PULL_DOWN);
}
开发者ID:lyfu,项目名称:SmartHome,代码行数:5,代码来源:setup-sdhci.c


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