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


C++ S3C2410_GPF函数代码示例

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


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

示例1: nexcoder_sensorboard_init

static void __init nexcoder_sensorboard_init(void)
{
	// Initialize SCCB bus
	s3c2410_gpio_setpin(S3C2410_GPE(14), 1); // IICSCL
	s3c_gpio_cfgpin(S3C2410_GPE(14), S3C2410_GPIO_OUTPUT);
	s3c2410_gpio_setpin(S3C2410_GPE(15), 1); // IICSDA
	s3c_gpio_cfgpin(S3C2410_GPE(15), S3C2410_GPIO_OUTPUT);

	// Power up the sensor board
	s3c2410_gpio_setpin(S3C2410_GPF(1), 1);
	s3c_gpio_cfgpin(S3C2410_GPF(1), S3C2410_GPIO_OUTPUT); // CAM_GPIO7 => nLDO_PWRDN
	s3c2410_gpio_setpin(S3C2410_GPF(2), 0);
	s3c_gpio_cfgpin(S3C2410_GPF(2), S3C2410_GPIO_OUTPUT); // CAM_GPIO6 => CAM_PWRDN
}
开发者ID:007kumarraja,项目名称:rockchip-rk3188-mk908,代码行数:14,代码来源:mach-nexcoder.c

示例2: nexcoder_sensorboard_init

static void __init nexcoder_sensorboard_init(void)
{
	/* Initialize SCCB bus */
	gpio_request_one(S3C2410_GPE(14), GPIOF_OUT_INIT_HIGH, NULL);
	gpio_free(S3C2410_GPE(14)); /* IICSCL */
	gpio_request_one(S3C2410_GPE(15), GPIOF_OUT_INIT_HIGH, NULL);
	gpio_free(S3C2410_GPE(15)); /* IICSDA */

	/* Power up the sensor board */
	gpio_request_one(S3C2410_GPF(1), GPIOF_OUT_INIT_HIGH, NULL);
	gpio_free(S3C2410_GPF(1)); /* CAM_GPIO7 => nLDO_PWRDN */
	gpio_request_one(S3C2410_GPF(2), GPIOF_OUT_INIT_LOW, NULL);
	gpio_free(S3C2410_GPF(2)); /* CAM_GPIO6 => CAM_PWRDN */
}
开发者ID:03199618,项目名称:linux,代码行数:14,代码来源:mach-nexcoder.c

示例3: s3c2412_gpio_set_sleepcfg

int s3c2412_gpio_set_sleepcfg(unsigned int pin, unsigned int state)
{
	struct samsung_gpio_chip *chip = samsung_gpiolib_getchip(pin);
	unsigned long offs = pin - chip->chip.base;
	unsigned long flags;
	unsigned long slpcon;

	offs *= 2;

	if (pin < S3C2410_GPB(0))
		return -EINVAL;

	if (pin >= S3C2410_GPF(0) &&
	    pin <= S3C2410_GPG(16))
		return -EINVAL;

	if (pin > S3C2410_GPH(16))
		return -EINVAL;

	local_irq_save(flags);

	slpcon = __raw_readl(chip->base + 0x0C);

	slpcon &= ~(3 << offs);
	slpcon |= state << offs;

	__raw_writel(slpcon, chip->base + 0x0C);

	local_irq_restore(flags);

	return 0;
}
开发者ID:Jackeagle,项目名称:android_kernel_sony_c2305,代码行数:32,代码来源:gpio.c

示例4: smdk2416_hsudc_gpio_init

void smdk2416_hsudc_gpio_init(void)
{
	s3c_gpio_setpull(S3C2410_GPH(14), S3C_GPIO_PULL_UP);
	s3c_gpio_setpull(S3C2410_GPF(2), S3C_GPIO_PULL_NONE);
	s3c_gpio_cfgpin(S3C2410_GPH(14), S3C_GPIO_SFN(1));
	s3c2410_modify_misccr(S3C2416_MISCCR_SEL_SUSPND, 0);
}
开发者ID:08opt,项目名称:linux,代码行数:7,代码来源:mach-smdk2416.c

示例5: amlm5900_init_pm

static void amlm5900_init_pm(void)
{
	int ret = 0;

	ret = request_irq(IRQ_EINT9, &amlm5900_wake_interrupt,
				IRQF_TRIGGER_RISING | IRQF_SHARED,
				"amlm5900_wakeup", &amlm5900_wake_interrupt);
	if (ret != 0) {
		printk(KERN_ERR "AML-M5900: no wakeup irq, %d?\n", ret);
	} else {
		enable_irq_wake(IRQ_EINT9);
		/* configure the suspend/resume status pin */
		s3c_gpio_cfgpin(S3C2410_GPF(2), S3C2410_GPIO_OUTPUT);
		s3c_gpio_setpull(S3C2410_GPF(2), S3C_GPIO_PULL_UP);
	}
}
开发者ID:01org,项目名称:XenGT-Preview-kernel,代码行数:16,代码来源:mach-amlm5900.c

示例6: s3c_pm_configure_extint

void s3c_pm_configure_extint(void)
{
	int pin;

	/*                                                       
                                                            
                                                  
 */

	for (pin = S3C2410_GPF(0); pin <= S3C2410_GPF(7); pin++) {
		s3c_pm_check_resume_pin(pin, pin - S3C2410_GPF(0));
	}

	for (pin = S3C2410_GPG(0); pin <= S3C2410_GPG(7); pin++) {
		s3c_pm_check_resume_pin(pin, (pin - S3C2410_GPG(0))+8);
	}
}
开发者ID:romanbb,项目名称:android_kernel_lge_d851,代码行数:17,代码来源:pm.c

示例7: s3c_pm_configure_extint

void s3c_pm_configure_extint(void)
{
	int pin;

	/* for each of the external interrupts (EINT0..EINT15) we
	 * need to check wether it is an external interrupt source,
	 * and then configure it as an input if it is not
	*/

	for (pin = S3C2410_GPF(0); pin <= S3C2410_GPF(7); pin++) {
		s3c_pm_check_resume_pin(pin, pin - S3C2410_GPF(0));
	}

	for (pin = S3C2410_GPG(0); pin <= S3C2410_GPG(7); pin++) {
		s3c_pm_check_resume_pin(pin, (pin - S3C2410_GPG(0))+8);
	}
}
开发者ID:andi34,项目名称:Dhollmen_Kernel,代码行数:17,代码来源:pm.c

示例8: smdk2413_udc_pullup

static void smdk2413_udc_pullup(enum s3c2410_udc_cmd_e cmd)
{
	printk(KERN_DEBUG "udc: pullup(%d)\n",cmd);

	switch (cmd)
	{
		case S3C2410_UDC_P_ENABLE :
			s3c2410_gpio_setpin(S3C2410_GPF(2), 1);
			break;
		case S3C2410_UDC_P_DISABLE :
			s3c2410_gpio_setpin(S3C2410_GPF(2), 0);
			break;
		case S3C2410_UDC_P_RESET :
			break;
		default:
			break;
	}
}
开发者ID:12019,项目名称:linux-2.6.34-ts471x,代码行数:18,代码来源:mach-smdk2413.c

示例9: smdk2413_machine_init

static void __init smdk2413_machine_init(void)
{	/* Turn off suspend on both USB ports, and switch the
	 * selectable USB port to USB device mode. */

	s3c2410_gpio_setpin(S3C2410_GPF(2), 0);
	s3c2410_gpio_cfgpin(S3C2410_GPF(2), S3C2410_GPIO_OUTPUT);

	s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST |
			      S3C2410_MISCCR_USBSUSPND0 |
			      S3C2410_MISCCR_USBSUSPND1, 0x0);


 	s3c24xx_udc_set_platdata(&smdk2413_udc_cfg);
	s3c_i2c0_set_platdata(NULL);

	platform_add_devices(smdk2413_devices, ARRAY_SIZE(smdk2413_devices));
	smdk_machine_init();
}
开发者ID:12019,项目名称:linux-2.6.34-ts471x,代码行数:18,代码来源:mach-smdk2413.c

示例10: smdk2413_machine_init

static void __init smdk2413_machine_init(void)
{	/* Turn off suspend on both USB ports, and switch the
	 * selectable USB port to USB device mode. */

	WARN_ON(gpio_request(S3C2410_GPF(2), "udc pull"));
	gpio_direction_output(S3C2410_GPF(2), 0);

	s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST |
			      S3C2410_MISCCR_USBSUSPND0 |
			      S3C2410_MISCCR_USBSUSPND1, 0x0);


 	s3c24xx_udc_set_platdata(&smdk2413_udc_cfg);
	s3c_i2c0_set_platdata(NULL);

	platform_add_devices(smdk2413_devices, ARRAY_SIZE(smdk2413_devices));
	smdk_machine_init();
}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:18,代码来源:mach-smdk2413.c

示例11: s3c2410_pm_prepare

static void s3c2410_pm_prepare(void)
{
	/* ensure at least GSTATUS3 has the resume address */

	__raw_writel(virt_to_phys(s3c_cpu_resume), S3C2410_GSTATUS3);

	S3C_PMDBG("GSTATUS3 0x%08x\n", __raw_readl(S3C2410_GSTATUS3));
	S3C_PMDBG("GSTATUS4 0x%08x\n", __raw_readl(S3C2410_GSTATUS4));

	if (machine_is_h1940()) {
		void *base = phys_to_virt(H1940_SUSPEND_CHECK);
		unsigned long ptr;
		unsigned long calc = 0;

		/* generate check for the bootloader to check on resume */

		for (ptr = 0; ptr < 0x40000; ptr += 0x400)
			calc += __raw_readl(base+ptr);

		__raw_writel(calc, phys_to_virt(H1940_SUSPEND_CHECKSUM));
	}

	/* RX3715 and RX1950 use similar to H1940 code and the
	 * same offsets for resume and checksum pointers */

	if (machine_is_rx3715() || machine_is_rx1950()) {
		void *base = phys_to_virt(H1940_SUSPEND_CHECK);
		unsigned long ptr;
		unsigned long calc = 0;

		/* generate check for the bootloader to check on resume */

		for (ptr = 0; ptr < 0x40000; ptr += 0x4)
			calc += __raw_readl(base+ptr);

		__raw_writel(calc, phys_to_virt(H1940_SUSPEND_CHECKSUM));
	}

	if ( machine_is_aml_m5900() )
		s3c2410_gpio_setpin(S3C2410_GPF(2), 1);

	if (machine_is_rx1950()) {
		/* According to S3C2442 user's manual, page 7-17,
		 * when the system is operating in NAND boot mode,
		 * the hardware pin configuration - EINT[23:21] –
		 * must be set as input for starting up after
		 * wakeup from sleep mode
		 */
		s3c_gpio_cfgpin(S3C2410_GPG(13), S3C2410_GPIO_INPUT);
		s3c_gpio_cfgpin(S3C2410_GPG(14), S3C2410_GPIO_INPUT);
		s3c_gpio_cfgpin(S3C2410_GPG(15), S3C2410_GPIO_INPUT);
	}
}
开发者ID:08opt,项目名称:linux,代码行数:53,代码来源:pm.c

示例12: s3c2410_pm_prepare

static void s3c2410_pm_prepare(void)
{
	/* ensure at least GSTATUS3 has the resume address */
	
	
	{
		volatile unsigned long *ptr = phys_to_virt(0x30000900);
		*ptr = 0x55;
	}

	__raw_writel(0x7, S3C2410_GSTATUS2);
	S3C_PMDBG("GSTATUS2 0x%08x\n", __raw_readl(S3C2410_GSTATUS2));

	__raw_writel(virt_to_phys(s3c_cpu_resume), S3C2410_GSTATUS3);
	S3C_PMDBG("GSTATUS3 0x%08x\n", __raw_readl(S3C2410_GSTATUS3));
	
	S3C_PMDBG("GSTATUS4 0x%08x\n", __raw_readl(S3C2410_GSTATUS4));
	

	if (machine_is_h1940()) {
		void *base = phys_to_virt(H1940_SUSPEND_CHECK);
		unsigned long ptr;
		unsigned long calc = 0;

		/* generate check for the bootloader to check on resume */

		for (ptr = 0; ptr < 0x40000; ptr += 0x400)
			calc += __raw_readl(base+ptr);

		__raw_writel(calc, phys_to_virt(H1940_SUSPEND_CHECKSUM));
	}

	/* the RX3715 uses similar code and the same H1940 and the
	 * same offsets for resume and checksum pointers */

	if (machine_is_rx3715()) {
		void *base = phys_to_virt(H1940_SUSPEND_CHECK);
		unsigned long ptr;
		unsigned long calc = 0;

		/* generate check for the bootloader to check on resume */

		for (ptr = 0; ptr < 0x40000; ptr += 0x4)
			calc += __raw_readl(base+ptr);

		__raw_writel(calc, phys_to_virt(H1940_SUSPEND_CHECKSUM));
	}

	if ( machine_is_aml_m5900() )
		s3c2410_gpio_setpin(S3C2410_GPF(2), 1);

}
开发者ID:AceecaNZ,项目名称:MEZ1500Rev2dLinux,代码行数:52,代码来源:pm.c

示例13: s3c2410_pm_resume

static void s3c2410_pm_resume(void)
{
	unsigned long tmp;

	/* unset the return-from-sleep flag, to ensure reset */

	tmp = __raw_readl(S3C2410_GSTATUS2);
	tmp &= S3C2410_GSTATUS2_OFFRESET;
	__raw_writel(tmp, S3C2410_GSTATUS2);

	if ( machine_is_aml_m5900() )
		s3c2410_gpio_setpin(S3C2410_GPF(2), 0);
}
开发者ID:08opt,项目名称:linux,代码行数:13,代码来源:pm.c

示例14: mini2440_machine_init

static void __init mini2440_machine_init(void)
{
	s3c24xx_fb_set_platdata(&s3c24xx_fb_info);
	
	s3c_i2c0_set_platdata(NULL);

	s3c2410_gpio_cfgpin(S3C2410_GPC(0), S3C2410_GPC0_LEND);
	printk("S3C2410_GPA=%d\n",S3C2410_GPA(0));
	printk("S3C2410_GPB=%d\n",S3C2410_GPB(0));
	printk("S3C2410_GPC=%d\n",S3C2410_GPC(0));
	printk("S3C2410_GPD=%d\n",S3C2410_GPD(0));
	printk("S3C2410_GPE=%d\n",S3C2410_GPE(0));
	printk("S3C2410_GPF=%d\n",S3C2410_GPF(0));
	printk("S3C2410_GPG=%d\n",S3C2410_GPG(0));
	printk("S3C2410_GPH=%d\n",S3C2410_GPH(0));
	s3c_device_nand.dev.platform_data = &friendly_arm_nand_info;
	s3c_device_sdi.dev.platform_data = &mini2440_mmc_cfg;
	platform_add_devices(mini2440_devices, ARRAY_SIZE(mini2440_devices));
	platform_device_register_simple("GPIODEV", 0, &gpiodev_resource, 1); //GPIO resource MAP
	s3c_pm_init();
}
开发者ID:IoveSunny,项目名称:DreamBox,代码行数:21,代码来源:mach-mini2440.c

示例15: smdk_machine_init

void __init smdk_machine_init(void)
{
	/* Configure the LEDs (even if we have no LED support)*/

	s3c_gpio_cfgpin(S3C2410_GPF(4), S3C2410_GPIO_OUTPUT);
	s3c_gpio_cfgpin(S3C2410_GPF(5), S3C2410_GPIO_OUTPUT);
	s3c_gpio_cfgpin(S3C2410_GPF(6), S3C2410_GPIO_OUTPUT);
	s3c_gpio_cfgpin(S3C2410_GPF(7), S3C2410_GPIO_OUTPUT);

	s3c2410_gpio_setpin(S3C2410_GPF(4), 1);
	s3c2410_gpio_setpin(S3C2410_GPF(5), 1);
	s3c2410_gpio_setpin(S3C2410_GPF(6), 1);
	s3c2410_gpio_setpin(S3C2410_GPF(7), 1);

	if (machine_is_smdk2443())
		smdk_nand_info.twrph0 = 50;

	s3c_nand_set_platdata(&smdk_nand_info);

	platform_add_devices(smdk_devs, ARRAY_SIZE(smdk_devs));

	s3c_pm_init();
}
开发者ID:08opt,项目名称:linux,代码行数:23,代码来源:common-smdk.c


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