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


C++ s3c_gpio_cfgpin函数代码示例

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


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

示例1: s5pv210_setup_sdhci3_cfg_gpio

void s5pv210_setup_sdhci3_cfg_gpio(struct platform_device *dev, int width)
{
	unsigned int gpio;
#if defined (CONFIG_TARGET_LOCALE_EUR) || defined(CONFIG_TARGET_LOCALE_HKTW) || defined (CONFIG_TARGET_LOCALE_HKTW_FET) || defined(CONFIG_TARGET_LOCALE_VZW) || defined(CONFIG_TARGET_LOCALE_USAGSM)
	if (HWREV >= 12) {
#else /* CONFIG_TARGET_LOCALE_KOR */
	if (HWREV >= 10 && HWREV != 17) {
#endif /* CONFIG_TARGET_LOCALE */
		switch (width) {
		/* Channel 3 supports 4-bit bus width */
		case 0:
		case 1:
		case 4:
			/* Set all the necessary GPIO function and pull up/down */
			for (gpio = S5PV210_GPG3(0); gpio <= S5PV210_GPG3(6); gpio++) {
				if (gpio != S5PV210_GPG3(2)) {
					s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
					s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
				}
			}

			writel(0x2aaa, S5PV210_GPG3DRV);

			/* Chip detect pin Pull up*/
			/* S5PV210_GPG3(2) is WLAN_reset, Chip detect pin is not required. */
//			s3c_gpio_setpull(S5PV210_GPG3(2), S3C_GPIO_PULL_UP);

			break;
		default:
			printk(KERN_ERR "Wrong SD/MMC bus width : %d\n", width);
		}
	}
}

#define S3C_SDHCI_CTRL3_FCSELTX_INVERT  (0)
#define S3C_SDHCI_CTRL3_FCSELTX_BASIC   (S3C_SDHCI_CTRL3_FCSEL3 | S3C_SDHCI_CTRL3_FCSEL2)
#define S3C_SDHCI_CTRL3_FCSELRX_INVERT  (0)
#define S3C_SDHCI_CTRL3_FCSELRX_BASIC   (S3C_SDHCI_CTRL3_FCSEL1 | S3C_SDHCI_CTRL3_FCSEL0)

void s5pv210_setup_sdhci_cfg_card(struct platform_device *dev,
				    void __iomem *r,
				    struct mmc_ios *ios,
				    struct mmc_card *card)
{
	u32 ctrl2;
	u32 ctrl3;

	ctrl2 = readl(r + S3C_SDHCI_CONTROL2);
	ctrl2 &= S3C_SDHCI_CTRL2_SELBASECLK_MASK;
	ctrl2 |= (S3C64XX_SDHCI_CTRL2_ENSTAASYNCCLR |
		  S3C64XX_SDHCI_CTRL2_ENCMDCNFMSK |
		  S3C_SDHCI_CTRL2_DFCNT_NONE |
		  S3C_SDHCI_CTRL2_ENCLKOUTHOLD);

	if (ios->clock <= (400 * 1000)) {
		ctrl2 &= ~(S3C_SDHCI_CTRL2_ENFBCLKTX | S3C_SDHCI_CTRL2_ENFBCLKRX);
		ctrl3 = 0;
	} else {
		u32 range_start;
		u32 range_end;

		ctrl2 |= S3C_SDHCI_CTRL2_ENFBCLKTX | S3C_SDHCI_CTRL2_ENFBCLKRX;

		if (card->type == MMC_TYPE_MMC)  /* MMC */
			range_start = 20 * 1000 * 1000;
		else    /* SD, SDIO */
			range_start = 25 * 1000 * 1000;

		range_end = 37 * 1000 * 1000;

		if ((ios->clock > range_start) && (ios->clock < range_end)) {
			ctrl3 = S3C_SDHCI_CTRL3_FCSELTX_BASIC |
				S3C_SDHCI_CTRL3_FCSELRX_BASIC;
		} else {
#if defined (CONFIG_TARGET_LOCALE_EUR) || defined (CONFIG_TARGET_LOCALE_HKTW) || defined (CONFIG_TARGET_LOCALE_HKTW_FET) || defined (CONFIG_TARGET_LOCALE_USAGSM)
			if (card->type == MMC_TYPE_SD)
				ctrl3 = S3C_SDHCI_CTRL3_FCSELTX_BASIC |
					S3C_SDHCI_CTRL3_FCSELRX_BASIC;
			else
#endif /* CONFIG_TARGET_LOCALE_EUR */
				ctrl3 = S3C_SDHCI_CTRL3_FCSELTX_BASIC |
					S3C_SDHCI_CTRL3_FCSELRX_INVERT;
		}
	}

	writel(ctrl2, r + S3C_SDHCI_CONTROL2);
	writel(ctrl3, r + S3C_SDHCI_CONTROL3);
}
开发者ID:xxSynGatesA7Xxx,项目名称:sgtkernel_tmobile,代码行数:88,代码来源:setup-sdhci.c

示例2: s6d6aa1_probe

static int s6d6aa1_probe(struct device *dev)
{
	int ret = 0;
	struct lcd_info *lcd;

	lcd = kzalloc(sizeof(struct lcd_info), GFP_KERNEL);
	if (!lcd) {
		pr_err("failed to allocate for lcd\n");
		ret = -ENOMEM;
		goto err_alloc;
	}

	g_lcd = lcd;

	lcd->ld = lcd_device_register("panel", dev, lcd, &panel_lcd_ops);
	if (IS_ERR(lcd->ld)) {
		pr_err("failed to register lcd device\n");
		ret = PTR_ERR(lcd->ld);
		goto out_free_lcd;
	}

	lcd->bd = backlight_device_register("panel", dev, lcd, &panel_backlight_ops, NULL);
	if (IS_ERR(lcd->bd)) {
		pr_err("failed to register backlight device\n");
		ret = PTR_ERR(lcd->bd);
		goto out_free_backlight;
	}

	lcd->dev = dev;
	lcd->dsim = (struct dsim_global *)dev_get_drvdata(dev->parent);
	lcd->bd->props.max_brightness = MAX_BRIGHTNESS;
	lcd->bd->props.brightness = DEFAULT_BRIGHTNESS;
	lcd->bl = 0;
	lcd->current_bl = lcd->bl;

	lcd->power = FB_BLANK_UNBLANK;
	lcd->ldi_enable = 1;
	lcd->connected = 1;

	ret = device_create_file(&lcd->ld->dev, &dev_attr_lcd_type);
	if (ret < 0)
		dev_err(&lcd->ld->dev, "failed to add sysfs entries, %d\n", __LINE__);

	ret = device_create_file(&lcd->bd->dev, &dev_attr_auto_brightness);
	if (ret < 0)
		dev_err(&lcd->ld->dev, "failed to add sysfs entries, %d\n", __LINE__);

	dev_set_drvdata(dev, lcd);

	mutex_init(&lcd->lock);
	mutex_init(&lcd->bl_lock);

	dev_info(&lcd->ld->dev, "s6e8aa0 lcd panel driver has been probed.\n");

#if defined(GPIO_OLED_DET)
	if (lcd->connected) {
		INIT_DELAYED_WORK(&lcd->oled_detection, oled_detection_work);

		lcd->irq = gpio_to_irq(GPIO_OLED_DET);

		s3c_gpio_cfgpin(GPIO_OLED_DET, S3C_GPIO_SFN(0xf));
		s3c_gpio_setpull(GPIO_OLED_DET, S3C_GPIO_PULL_NONE);
		if (request_irq(lcd->irq, oled_detection_int,
			IRQF_TRIGGER_FALLING, "oled_detection", lcd))
			pr_err("failed to reqeust irq. %d\n", lcd->irq);
		}
#endif

	lcd_early_suspend = s6d6aa1_early_suspend;
	lcd_late_resume = s6d6aa1_late_resume;

	return 0;

out_free_backlight:
	lcd_device_unregister(lcd->ld);
	kfree(lcd);
	return ret;

out_free_lcd:
	kfree(lcd);
	return ret;

err_alloc:
	return ret;
}
开发者ID:android-armv7a-belalang-tempur,项目名称:android_kernel_samsung_smdk4210-1,代码行数:85,代码来源:s6d6aa1.c

示例3: max8997_motor_init

static void max8997_motor_init(void)
{
    gpio_request(GPIO_VIBTONE_EN, "VIBTONE_EN");
    s3c_gpio_cfgpin(GPIO_VIBTONE_EN, S3C_GPIO_OUTPUT);
    s3c_gpio_setpull(GPIO_VIBTONE_EN, S3C_GPIO_PULL_NONE);
}
开发者ID:rfcclub,项目名称:Googy-Max2-Kernel,代码行数:6,代码来源:naples-power.c

示例4: modemctl_cfg_gpio

static void modemctl_cfg_gpio(void)
{
	int err = 0;
	
	unsigned gpio_phone_on = mdmctl_data.gpio_phone_on;
	unsigned gpio_phone_active = mdmctl_data.gpio_phone_active;
	unsigned gpio_cp_rst = mdmctl_data.gpio_cp_reset;
	unsigned gpio_pda_active = mdmctl_data.gpio_pda_active;
	unsigned gpio_usim_boot = mdmctl_data.gpio_usim_boot;
	unsigned gpio_flm_sel = mdmctl_data.gpio_flm_sel;	
	unsigned gpio_flm_sel_03 = mdmctl_data.gpio_flm_sel_03;	
	//unsigned gpio_sim_ndetect = mdmctl_data.gpio_sim_ndetect;
	
	err = gpio_request(gpio_phone_on, "PHONE_ON");
	if (err) {
		printk("fail to request gpio %s\n","PHONE_ON");
	} else {
		gpio_direction_output(gpio_phone_on, GPIO_LEVEL_LOW);
		s3c_gpio_setpull(gpio_phone_on, S3C_GPIO_PULL_NONE);
	}
	err = gpio_request(gpio_cp_rst, "CP_RST");
	if (err) {
		printk("fail to request gpio %s\n","CP_RST");
	} else {
		gpio_direction_output(gpio_cp_rst, GPIO_LEVEL_LOW);
		s3c_gpio_setpull(gpio_cp_rst, S3C_GPIO_PULL_NONE);
	}
	err = gpio_request(gpio_pda_active, "PDA_ACTIVE");
	if (err) {
		printk("fail to request gpio %s\n","PDA_ACTIVE");
	} else {
		gpio_direction_output(gpio_pda_active, GPIO_LEVEL_LOW);
		s3c_gpio_setpull(gpio_pda_active, S3C_GPIO_PULL_NONE);
	}
	err = gpio_request(gpio_usim_boot, "USIM_BOOT");
	if (err) {
		printk("fail to request gpio %s\n","USIM_BOOT");
	} else {
		gpio_direction_output(gpio_usim_boot, GPIO_LEVEL_LOW);
		s3c_gpio_setpull(gpio_usim_boot, S3C_GPIO_PULL_NONE);
	}

	if(HWREV > 3) {
		err = gpio_request(gpio_flm_sel, "FLM_SEL");
		if (err) {
			printk("fail to request gpio %s\n","FLM_SEL");
		} else {
			gpio_direction_output(gpio_flm_sel, GPIO_LEVEL_LOW);
			s3c_gpio_setpull(gpio_flm_sel, S3C_GPIO_PULL_NONE);
		}
	} else {
		err = gpio_request(gpio_flm_sel_03, "FLM_SEL");
		if (err) {
			printk("fail to request gpio %s\n","FLM_SEL");
		} else {
			gpio_direction_output(gpio_flm_sel_03, GPIO_LEVEL_LOW);
			s3c_gpio_setpull(gpio_flm_sel_03, S3C_GPIO_PULL_NONE);
		}
	}

	s3c_gpio_cfgpin(gpio_phone_active, S3C_GPIO_SFN(0xF));
	s3c_gpio_setpull(gpio_phone_active, S3C_GPIO_PULL_NONE);
	irq_set_irq_type(gpio_phone_active, IRQ_TYPE_EDGE_BOTH);

	/*s3c_gpio_cfgpin(gpio_sim_ndetect, S3C_GPIO_SFN(0xF));
	s3c_gpio_setpull(gpio_sim_ndetect, S3C_GPIO_PULL_NONE);
	irq_set_irq_type(gpio_sim_ndetect, IRQ_TYPE_EDGE_BOTH);*/
}
开发者ID:AttiJeong98,项目名称:android_kernel_samsung_aries-kor,代码行数:68,代码来源:dev-s1-phone.c

示例5: smartq_bl_init

static int smartq_bl_init(struct device *dev)
{
    s3c_gpio_cfgpin(S3C64XX_GPF(15), S3C_GPIO_SFN(2));

    return 0;
}
开发者ID:08opt,项目名称:linux,代码行数:6,代码来源:mach-smartq.c

示例6: exynos4_setup_mshci_set_power

void exynos4_setup_mshci_set_power(struct platform_device *dev, int en)
{
	struct s3c_mshci_platdata *pdata = dev->dev.platform_data;
	unsigned int gpio = 0;

	if (pdata->int_power_gpio) {
		if (en) {
#if defined(CONFIG_MACH_Q1_BD)
			mdelay(20);
#elif defined(CONFIG_MACH_PX)
			mdelay(10);
#endif
			/*CMD/CLK*/
			for (gpio = EXYNOS4_GPK0(0); gpio < EXYNOS4_GPK0(2);
					gpio++) {
				s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3));
				s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
			}
			/*DAT[0]~[3]*/
			for (gpio = EXYNOS4_GPK0(3); gpio <= EXYNOS4_GPK0(6);
					gpio++) {
				s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3));
				s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
			}
			/*DAT[4]~[7]*/
			for (gpio = EXYNOS4_GPK1(3); gpio <= EXYNOS4_GPK1(6);
					gpio++) {
				s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(4));
				s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
			}

			gpio_set_value(pdata->int_power_gpio, 1);
			pr_info("%s : internal MMC Card ON samsung-mshc.\n",
					__func__);
		} else {
#if defined(CONFIG_MACH_M0_CTC)
			s3c_gpio_cfgpin(pdata->int_power_gpio, S3C_GPIO_OUTPUT);
			s3c_gpio_setpull(pdata->int_power_gpio,
					S3C_GPIO_PULL_NONE);
#endif
			gpio_set_value(pdata->int_power_gpio, 0);

			/*CMD/CLK*/
			for (gpio = EXYNOS4_GPK0(0); gpio < EXYNOS4_GPK0(2);
					gpio++) {
				s3c_gpio_cfgpin(gpio, S3C_GPIO_INPUT);
				s3c_gpio_setpull(gpio, S3C_GPIO_PULL_DOWN);
			}
			/*DAT[0]~[3]*/
			for (gpio = EXYNOS4_GPK0(3); gpio <= EXYNOS4_GPK0(6);
					gpio++) {
				s3c_gpio_cfgpin(gpio, S3C_GPIO_INPUT);
				s3c_gpio_setpull(gpio, S3C_GPIO_PULL_DOWN);
			}
			/*DAT[4]~[7]*/
			for (gpio = EXYNOS4_GPK1(3); gpio <= EXYNOS4_GPK1(6);
					gpio++) {
				s3c_gpio_cfgpin(gpio, S3C_GPIO_INPUT);
				s3c_gpio_setpull(gpio, S3C_GPIO_PULL_DOWN);
			}
			pr_info("%s : internal MMC Card OFF samsung-mshc.\n",
					__func__);
			mdelay(50);
		}
	}
}
开发者ID:Lukiqq,项目名称:GT-I9100-Galaxian-ICS-Kernel,代码行数:66,代码来源:setup-mshci-gpio.c

示例7: origen_power_init

static void __init origen_power_init(void)
{
	gpio_request(EXYNOS4_GPX0(4), "PMIC_IRQ");
	s3c_gpio_cfgpin(EXYNOS4_GPX0(4), S3C_GPIO_SFN(0xf));
	s3c_gpio_setpull(EXYNOS4_GPX0(4), S3C_GPIO_PULL_NONE);
}
开发者ID:0x000000FF,项目名称:Linux4Edison,代码行数:6,代码来源:mach-origen.c

示例8: s5pv310_cfg_i2s

static int s5pv310_cfg_i2s(struct platform_device *pdev)
{
	/* configure GPIO for i2s port */
	switch (pdev->id) {
	case 1:
		s3c_gpio_cfgpin(S5PV310_GPC0(0), S3C_GPIO_SFN(2));
		s3c_gpio_cfgpin(S5PV310_GPC0(1), S3C_GPIO_SFN(2));
		s3c_gpio_cfgpin(S5PV310_GPC0(2), S3C_GPIO_SFN(2));
		s3c_gpio_cfgpin(S5PV310_GPC0(3), S3C_GPIO_SFN(2));
		s3c_gpio_cfgpin(S5PV310_GPC0(4), S3C_GPIO_SFN(2));
		break;
	case 2:
		s3c_gpio_cfgpin(S5PV310_GPC1(0), S3C_GPIO_SFN(2));
		s3c_gpio_cfgpin(S5PV310_GPC1(1), S3C_GPIO_SFN(2));
		s3c_gpio_cfgpin(S5PV310_GPC1(2), S3C_GPIO_SFN(2));
		s3c_gpio_cfgpin(S5PV310_GPC1(3), S3C_GPIO_SFN(2));
		s3c_gpio_cfgpin(S5PV310_GPC1(4), S3C_GPIO_SFN(2));
		break;
	case -1:
		s3c_gpio_cfgpin(S5PV310_GPZ(0), S3C_GPIO_SFN(2));
		s3c_gpio_cfgpin(S5PV310_GPZ(1), S3C_GPIO_SFN(2));
		s3c_gpio_cfgpin(S5PV310_GPZ(2), S3C_GPIO_SFN(2));
		s3c_gpio_cfgpin(S5PV310_GPZ(3), S3C_GPIO_SFN(2));
		s3c_gpio_cfgpin(S5PV310_GPZ(4), S3C_GPIO_SFN(2));
		s3c_gpio_cfgpin(S5PV310_GPZ(5), S3C_GPIO_SFN(2));
		s3c_gpio_cfgpin(S5PV310_GPZ(6), S3C_GPIO_SFN(2));
		break;

	default:
		printk(KERN_ERR "Invalid Device %d\n", pdev->id);
		return -EINVAL;
	}

	return 0;
}
开发者ID:alanorth,项目名称:samsung-kernel-p6200,代码行数:35,代码来源:dev-audio.c

示例9: s5pv310_pcm_cfg_gpio

static int s5pv310_pcm_cfg_gpio(struct platform_device *pdev)
{
	switch (pdev->id) {
	case 1:
		s3c_gpio_cfgpin(S5PV310_GPC0(0), S3C_GPIO_SFN(3));
		s3c_gpio_cfgpin(S5PV310_GPC0(1), S3C_GPIO_SFN(3));
		s3c_gpio_cfgpin(S5PV310_GPC0(2), S3C_GPIO_SFN(3));
		s3c_gpio_cfgpin(S5PV310_GPC0(3), S3C_GPIO_SFN(3));
		s3c_gpio_cfgpin(S5PV310_GPC0(4), S3C_GPIO_SFN(3));
		break;
	case 2:
		s3c_gpio_cfgpin(S5PV310_GPC1(0), S3C_GPIO_SFN(3));
		s3c_gpio_cfgpin(S5PV310_GPC1(1), S3C_GPIO_SFN(3));
		s3c_gpio_cfgpin(S5PV310_GPC1(2), S3C_GPIO_SFN(3));
		s3c_gpio_cfgpin(S5PV310_GPC1(3), S3C_GPIO_SFN(3));
		s3c_gpio_cfgpin(S5PV310_GPC1(4), S3C_GPIO_SFN(3));
		break;
	case 0:
		s3c_gpio_cfgpin(S5PV310_GPZ(0), S3C_GPIO_SFN(3));
		s3c_gpio_cfgpin(S5PV310_GPZ(1), S3C_GPIO_SFN(3));
		s3c_gpio_cfgpin(S5PV310_GPZ(2), S3C_GPIO_SFN(3));
		s3c_gpio_cfgpin(S5PV310_GPZ(3), S3C_GPIO_SFN(3));
		s3c_gpio_cfgpin(S5PV310_GPZ(4), S3C_GPIO_SFN(3));
		s3c_gpio_cfgpin(S5PV310_GPZ(5), S3C_GPIO_SFN(3));
		s3c_gpio_cfgpin(S5PV310_GPZ(6), S3C_GPIO_SFN(3));
		break;
	default:
		printk(KERN_DEBUG "Invalid PCM Controller number!");
		return -EINVAL;
	}

	return 0;
}
开发者ID:alanorth,项目名称:samsung-kernel-p6200,代码行数:33,代码来源:dev-audio.c

示例10: bcm4329_wifi_power

int bcm4329_wifi_power(int on)
{
	int ret;
	struct regulator *wlan32k_regulator;
	static int regulator_flag = 0;

	printk("%s: %d\n", __func__, on);

	/*stuttgart, enable max77676 32khz for wlan*/
	wlan32k_regulator = regulator_get(NULL, "wlan_32khz");
	if(IS_ERR(wlan32k_regulator)){
		pr_err("%s: failed to get %s\n", __func__, "wlan_32khz");
		return -1;	
	};
	/*end*/

	mdelay(100);
		
	if(on)
	{
		/*stuttgart, enable max77676 32khz for wlan*/
		if(!regulator_flag) {
			regulator_enable(wlan32k_regulator);
			regulator_flag = 1;
		}
		/*end*/
/*		ret = gpio_request(WL_REG_ON, WL_REG_ON_DES);
		if (ret)
			printk(KERN_ERR "#### failed to request GPK3-2\n ");
*/              s3c_gpio_cfgpin(WL_REG_ON, S3C_GPIO_OUTPUT);
		s3c_gpio_setpull(WL_REG_ON, S3C_GPIO_PULL_NONE);
		gpio_set_value(WL_REG_ON, 1);
		s5p_gpio_set_pd_cfg(WL_REG_ON, S5P_GPIO_PD_OUTPUT1);
		s5p_gpio_set_pd_pull(WL_REG_ON, S5P_GPIO_PD_UPDOWN_DISABLE);

/*
		ret = gpio_request(EXYNOS4_GPX2(7), "GPX2");
		if (ret)
			printk(KERN_ERR "#### failed to request GPX2-7\n ");			
		s3c_gpio_cfgpin(EXYNOS4_GPX2(7), S3C_GPIO_SFN(0x2));
		s3c_gpio_setpull	(EXYNOS4_GPX2(7),S3C_GPIO_PULL_NONE);
*/
		//irq_set_irq_wake(gpio_to_irq(EXYNOS4_GPX2(7)), 1);
	}
	else
	{
		s3c_gpio_cfgpin(WL_REG_ON, S3C_GPIO_INPUT);
		s3c_gpio_setpull(WL_REG_ON, S3C_GPIO_PULL_DOWN);
		s5p_gpio_set_pd_cfg(WL_REG_ON, S5P_GPIO_PD_INPUT);
		s5p_gpio_set_pd_pull(WL_REG_ON, S5P_GPIO_PD_DOWN_ENABLE);
		
		//irq_set_irq_wake(gpio_to_irq(EXYNOS4_GPX2(7)), 0);
/*
		s3c_gpio_cfgpin(EXYNOS4_GPX2(7), S3C_GPIO_INPUT);             
		s3c_gpio_setpull	(EXYNOS4_GPX2(7),S3C_GPIO_PULL_DOWN);	
*/

		/*gpio_free(WL_REG_ON);*/
		/*gpio_free(EXYNOS4_GPX2(7));*/
		/*stuttgart, disable max77676 32khz for wlan*/
		if(regulator_flag) {
			regulator_disable(wlan32k_regulator);
			regulator_flag = 0;
		}
		/*end*/
		
	}

	/*stuttgart, put regulator*/
	regulator_put(wlan32k_regulator);
	/*end*/

	mdelay(200);
	bcm4329_wifi_power_state = on;
	return 0;
}
开发者ID:Frontier314,项目名称:kernel_s702hf,代码行数:76,代码来源:dev-hsmmc3.c

示例11: cdma_manager_probe

static int cdma_manager_probe(struct platform_device *dev)
{
/*	if (gpio_is_valid(GPIO_CDMA_PWR_ON_OUT)) {
		if (gpio_request(GPIO_CDMA_PWR_ON_OUT, "GPH2")) 
			printk(KERN_ERR "Failed to request GPIO_CDMA_PWR_ON_OUT!\n");
		gpio_direction_output(GPIO_CDMA_PWR_ON_OUT, GPIO_LEVEL_LOW);
	}
	s3c_gpio_setpull(GPIO_CDMA_PWR_ON_OUT, S3C_GPIO_PULL_DOWN);

	if (gpio_is_valid(GPIO_CDMA_RESET_OUT)) {
		if (gpio_request(GPIO_CDMA_RESET_OUT, "GPH2")) 
			printk(KERN_ERR "Failed to request GPIO_CDMA_RESET_OUT!\n");
		gpio_direction_output(GPIO_CDMA_RESET_OUT, GPIO_LEVEL_LOW);
	}
	s3c_gpio_setpull(GPIO_CDMA_RESET_OUT, S3C_GPIO_PULL_NONE);

	if (gpio_is_valid(GPIO_CDMA_READY_SIGNAL_IN)) {
		if (gpio_request(GPIO_CDMA_READY_SIGNAL_IN, "GPH2")) 
			printk(KERN_ERR "Failed to request GPIO_CDMA_READY_SIGNAL_IN!\n");
		
		gpio_direction_input(GPIO_CDMA_READY_SIGNAL_IN);
	}
	s3c_gpio_setpull(GPIO_CDMA_READY_SIGNAL_IN, S3C_GPIO_PULL_DOWN);

	if (gpio_is_valid(GPIO_CDMA_SLEEP_CTL_OUT)) {
		if (gpio_request(GPIO_CDMA_SLEEP_CTL_OUT, "GPH2")) 
			printk(KERN_ERR "Failed to request GPIO_CDMA_SLEEP_CTL_OUT!\n");
		
		gpio_direction_output(GPIO_CDMA_SLEEP_CTL_OUT,1);
	}
	s3c_gpio_setpull(GPIO_CDMA_SLEEP_CTL_OUT, S3C_GPIO_PULL_UP);*/
	int ret = 0;
	int irq;
	ril_wakeup = 1;
	
	ret = device_create_file(&(dev->dev), &dev_attr_wakeup);
	if (ret < 0) {
		printk("failed to add sysfs entries\n");
		return -1;
	}
	
//[yoon 20110504]changed cdma power squency : iriver_init_gpio() -> cdma_manager_probe()
#if 1
	mx100_cdma_power(0); 
#endif

	
    s3c_gpio_cfgpin(GPIO_CDMA_HOST_WAKE, S3C_GPIO_SFN(0xF));
   	s3c_gpio_setpull(GPIO_CDMA_HOST_WAKE, S3C_GPIO_PULL_NONE);

	cdma_uart_port_config(3);

    irq = IRQ_CDMA_HOST_WAKE;
    wake_lock_init(&cdma_wake_lock, WAKE_LOCK_SUSPEND, "cdma_host_wake");
    ret = request_irq(irq, cdma_host_wake_irq_handler,IRQF_TRIGGER_RISING,
                        "cdma_host_wake_irq_handler", NULL);

    if (ret < 0) {
                pr_err("[CDMA] Request_irq failed\n");
                return ret;
    }
    disable_irq(irq);
    ret = enable_irq_wake(irq);
    if (ret < 0)
        pr_err("[CDMA] set wakeup src failed\n");
    enable_irq(irq);

	return 0;
}
开发者ID:sktjdgns1189,项目名称:android_kernel_iriver_MX100,代码行数:69,代码来源:cdma_manager.c

示例12: 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:xxSynGatesA7Xxx,项目名称:sgtkernel_tmobile,代码行数:5,代码来源:setup-sdhci.c

示例13: bast_pm_resume

static void bast_pm_resume(void)
{
	s3c_gpio_cfgpin(S3C2410_GPA(21), S3C2410_GPA21_nRSTOUT);
}
开发者ID:Jackeagle,项目名称:android_kernel_sony_c2305,代码行数:4,代码来源:mach-bast.c

示例14: jive_machine_init


//.........这里部分代码省略.........
		     S3C2412_SLPCON_PULL(10) |
		     S3C2412_SLPCON_PULL(11) |
		     S3C2412_SLPCON_PULL(12) |
		     S3C2412_SLPCON_PULL(13) |
		     S3C2412_SLPCON_PULL(14) |
		     S3C2412_SLPCON_PULL(15), S3C2412_GPCSLPCON);

	/* Port D sleep */

	__raw_writel(S3C2412_SLPCON_ALL_PULL, S3C2412_GPDSLPCON);

	/* Port F sleep */

	__raw_writel(S3C2412_SLPCON_LOW(0)  |
		     S3C2412_SLPCON_LOW(1)  |
		     S3C2412_SLPCON_LOW(2)  |
		     S3C2412_SLPCON_EINT(3) |
		     S3C2412_SLPCON_EINT(4) |
		     S3C2412_SLPCON_EINT(5) |
		     S3C2412_SLPCON_EINT(6) |
		     S3C2412_SLPCON_EINT(7), S3C2412_GPFSLPCON);

	/* Port G sleep */

	__raw_writel(S3C2412_SLPCON_IN(0)    |
		     S3C2412_SLPCON_IN(1)    |
		     S3C2412_SLPCON_IN(2)    |
		     S3C2412_SLPCON_IN(3)    |
		     S3C2412_SLPCON_IN(4)    |
		     S3C2412_SLPCON_IN(5)    |
		     S3C2412_SLPCON_IN(6)    |
		     S3C2412_SLPCON_IN(7)    |
		     S3C2412_SLPCON_PULL(8)  |
		     S3C2412_SLPCON_PULL(9)  |
		     S3C2412_SLPCON_IN(10)   |
		     S3C2412_SLPCON_PULL(11) |
		     S3C2412_SLPCON_PULL(12) |
		     S3C2412_SLPCON_PULL(13) |
		     S3C2412_SLPCON_IN(14)   |
		     S3C2412_SLPCON_PULL(15), S3C2412_GPGSLPCON);

	/* Port H sleep */

	__raw_writel(S3C2412_SLPCON_PULL(0) |
		     S3C2412_SLPCON_PULL(1) |
		     S3C2412_SLPCON_PULL(2) |
		     S3C2412_SLPCON_PULL(3) |
		     S3C2412_SLPCON_PULL(4) |
		     S3C2412_SLPCON_PULL(5) |
		     S3C2412_SLPCON_PULL(6) |
		     S3C2412_SLPCON_IN(7)   |
		     S3C2412_SLPCON_IN(8)   |
		     S3C2412_SLPCON_PULL(9) |
		     S3C2412_SLPCON_IN(10), S3C2412_GPHSLPCON);

	/* initialise the power management now we've setup everything. */

	s3c_pm_init();

	/** TODO - check that this is after the cmdline option! */
	s3c_nand_set_platdata(&jive_nand_info);

	/* initialise the spi */

	gpio_request(S3C2410_GPG(13), "lcm reset");
	gpio_direction_output(S3C2410_GPG(13), 0);

	gpio_request(S3C2410_GPB(7), "jive spi");
	gpio_direction_output(S3C2410_GPB(7), 1);

	s3c2410_gpio_setpin(S3C2410_GPB(6), 0);
	s3c_gpio_cfgpin(S3C2410_GPB(6), S3C2410_GPIO_OUTPUT);

	s3c2410_gpio_setpin(S3C2410_GPG(8), 1);
	s3c_gpio_cfgpin(S3C2410_GPG(8), S3C2410_GPIO_OUTPUT);

	/* initialise the WM8750 spi */

	gpio_request(S3C2410_GPH(10), "jive wm8750 spi");
	gpio_direction_output(S3C2410_GPH(10), 1);

	/* Turn off suspend on both USB ports, and switch the
	 * selectable USB port to USB device mode. */

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

	s3c24xx_udc_set_platdata(&jive_udc_cfg);
	s3c24xx_fb_set_platdata(&jive_lcd_config);

	spi_register_board_info(jive_spi_devs, ARRAY_SIZE(jive_spi_devs));

	s3c_i2c0_set_platdata(&jive_i2c_cfg);
	i2c_register_board_info(0, jive_i2c_devs, ARRAY_SIZE(jive_i2c_devs));

	pm_power_off = jive_power_off;

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

示例15: onedram_cfg_gpio

/* onedram */
static void onedram_cfg_gpio(void)
{
	s3c_gpio_cfgpin(GPIO_nINT_ONEDRAM_AP, S3C_GPIO_SFN(GPIO_nINT_ONEDRAM_AP_AF));
	s3c_gpio_setpull(GPIO_nINT_ONEDRAM_AP, S3C_GPIO_PULL_UP);
	irq_set_irq_type(GPIO_nINT_ONEDRAM_AP, IRQ_TYPE_LEVEL_LOW);
}
开发者ID:AttiJeong98,项目名称:android_kernel_samsung_aries-kor,代码行数:7,代码来源:dev-s1-phone.c


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