• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ s3c2410_gpio_cfgpin函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: IO_irq_release

int IO_irq_release(struct inode *inode, struct file *filp)
{
	
	free_irq(IO_irq_devices->IO_irq1, NULL);
	free_irq(IO_irq_devices->IO_irq2, NULL);
	free_irq(IO_irq_devices->IO_irq3, NULL);
	free_irq(IO_irq_devices->IO_irq4, NULL);
	s3c2410_gpio_cfgpin(S3C2410_GPG11, S3C2410_GPG11_INP);
	s3c2410_gpio_cfgpin(S3C2410_GPG3, S3C2410_GPG3_INP);
	s3c2410_gpio_cfgpin(S3C2410_GPF2, S3C2410_GPF2_INP);
	s3c2410_gpio_cfgpin(S3C2410_GPF0, S3C2410_GPF0_INP);
	IO_irq_devices->IO_status = 0 ;

	tasklet_kill(&keytask);

	if(!cancel_delayed_work(&irq_work_delay)) flush_workqueue(tekkamanwork);
	destroy_workqueue(tekkamanwork);
	
	kfifo_free(tekkamanfifo);
	kfree(tekkamantmp);
	kfree(tekkamanbuf);
	atomic_inc(&IO_irq_available); /* release the device */
	wake_up_interruptible_sync(&IO_irq_wait); /* awake other uid's */
	printk( "IO_irq: release !  \n");

	return 0;
}
开发者ID:cutecheng,项目名称:rounder,代码行数:27,代码来源:IO_irq.c


示例2: gta02_lis302dl_suspend_io

void gta02_lis302dl_suspend_io(struct lis302dl_info *lis, int resume)
{
	struct lis302dl_platform_data *pdata = lis->pdata;

	if (!resume) {
		 /*
		 * we don't want to power them with a high level
		 * because GSENSOR_3V3 is not up during suspend
		 */
		s3c2410_gpio_setpin(pdata->pin_chip_select, 0);
		s3c2410_gpio_setpin(pdata->pin_clk, 0);
		s3c2410_gpio_setpin(pdata->pin_mosi, 0);
		/* misnomer: it is a pullDOWN in 2442 */
		s3c2410_gpio_pullup(pdata->pin_miso, 1);
		return;
	}

	/* back to normal */
	s3c2410_gpio_setpin(pdata->pin_chip_select, 1);
	s3c2410_gpio_setpin(pdata->pin_clk, 1);
	/* misnomer: it is a pullDOWN in 2442 */
	s3c2410_gpio_pullup(pdata->pin_miso, 0);

	s3c2410_gpio_cfgpin(pdata->pin_chip_select, S3C2410_GPIO_OUTPUT);
	s3c2410_gpio_cfgpin(pdata->pin_clk, S3C2410_GPIO_OUTPUT);
	s3c2410_gpio_cfgpin(pdata->pin_mosi, S3C2410_GPIO_OUTPUT);
	s3c2410_gpio_cfgpin(pdata->pin_miso, S3C2410_GPIO_INPUT);

}
开发者ID:mirko,项目名称:openwrt-x-burst,代码行数:29,代码来源:mach-gta02.c


示例3: qt2410_machine_init

static void __init qt2410_machine_init(void)
{
	s3c_device_nand.dev.platform_data = &qt2410_nand_info;

	switch (tft_type) {
	case 'p': /* production */
		qt2410_fb_info.default_display = 1;
		break;
	case 'b': /* big */
		qt2410_fb_info.default_display = 0;
		break;
	case 's': /* small */
	default:
		qt2410_fb_info.default_display = 2;
		break;
	}
	s3c24xx_fb_set_platdata(&qt2410_fb_info);

	s3c2410_gpio_cfgpin(S3C2410_GPB(0), S3C2410_GPIO_OUTPUT);
	s3c2410_gpio_setpin(S3C2410_GPB(0), 1);

	s3c24xx_udc_set_platdata(&qt2410_udc_cfg);
	s3c_i2c0_set_platdata(NULL);

	s3c2410_gpio_cfgpin(S3C2410_GPB(5), S3C2410_GPIO_OUTPUT);

	platform_add_devices(qt2410_devices, ARRAY_SIZE(qt2410_devices));
	s3c_pm_init();
}
开发者ID:ArthySundaram,项目名称:firstrepo,代码行数:29,代码来源:mach-qt2410.c


示例4: glamo_irq_is_wired

static int glamo_irq_is_wired(void)
{
	int rc;
	int count = 0;

	/*
	* GTA02 S-Media IRQs prior to A5 are broken due to a lack of
	* a pullup on the INT# line.  Check for the bad behaviour.
	*/
	s3c2410_gpio_setpin(S3C2410_GPG4, 0);
	s3c2410_gpio_cfgpin(S3C2410_GPG4, S3C2410_GPG4_OUTP);
	s3c2410_gpio_cfgpin(S3C2410_GPG4, S3C2410_GPG4_INP);
	/*
	* we force it low ourselves for a moment and resume being input.
	* If there is a pullup, it won't stay low for long.  But if the
	* level converter is there as on < A5 revision, the weak keeper
	* on the input of the LC will hold the line low indefinitiely
	*/
	do
		rc = s3c2410_gpio_getpin(S3C2410_GPG4);
	while ((!rc) && ((count++) < 10));
	if (rc) { /* it got pulled back up, it's good */
		printk(KERN_INFO "Detected S-Media IRQ# pullup, "
		"enabling interrupt\n");
		return 0;
	} else  /* Gah we can't work with this level converter */
		printk(KERN_WARNING "** Detected bad IRQ# circuit found"
		" on pre-A5 GTA02: S-Media interrupt disabled **\n");
	return -ENODEV;
}
开发者ID:mirko,项目名称:openwrt-x-burst,代码行数:30,代码来源:mach-gta02.c


示例5: lcd_gpio_init

void lcd_gpio_init(void)
{
	u32 val;

	// set gpio out for lcd reset 
	s3c2410_gpio_setpin(S3C2410_GPG6, 1);
	s3c2410_gpio_cfgpin(S3C2410_GPG6, S3C2410_GPG6_OUTP);

	if (!q_hw_ver(KTQOOK)) {
		// set lcd interface
		val = __raw_readl(S3C2410_GPCCON) & 0x0fcc0;
		__raw_writel(val | 0xaaaa022a, S3C2410_GPCCON);

		// set lcd interface
		val = __raw_readl(S3C2410_GPDCON) & ~(0x003fffff);
		__raw_writel(val | 0x002aaaaa, S3C2410_GPDCON);
	} else {
		// set camera backend reset
		s3c2410_gpio_setpin(S3C2410_GPG7, 1);
		s3c2410_gpio_cfgpin(S3C2410_GPG7, S3C2410_GPG7_OUTP);

		// set clockout0 to 12MHz
		s3c2410_gpio_cfgpin(S3C2443_GPH13, S3C2443_GPH13_CLKOUT0);
	}
}
开发者ID:cyox93,项目名称:s3c-linux-2.6.21,代码行数:25,代码来源:common-smdk.c


示例6: smdk_machine_init

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

	s3c2410_gpio_cfgpin(S3C2410_GPF4, S3C2410_GPF4_OUTP);
	s3c2410_gpio_cfgpin(S3C2410_GPF5, S3C2410_GPF5_OUTP);
	s3c2410_gpio_cfgpin(S3C2410_GPF6, S3C2410_GPF6_OUTP);
	s3c2410_gpio_cfgpin(S3C2410_GPF7, S3C2410_GPF7_OUTP);

	s3c2410_gpio_setpin(S3C2410_GPF4, 1);
	s3c2410_gpio_setpin(S3C2410_GPF5, 1);
	s3c2410_gpio_setpin(S3C2410_GPF6, 1);
	s3c2410_gpio_setpin(S3C2410_GPF7, 1);

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

	s3c_device_nand.dev.platform_data = &smdk_nand_info;
#ifdef CONFIG_TOUCHSCREEN_S3C2410
	set_s3c2410ts_info(&s3c2410_ts_cfg);
#endif
	platform_add_devices(smdk_devs, ARRAY_SIZE(smdk_devs));

	s3c2410_pm_init();
}
开发者ID:dhcstruggle,项目名称:jz2440-kernel,代码行数:25,代码来源:common-smdk.c


示例7: s3c24xx_i2s_probe

static int s3c24xx_i2s_probe(struct platform_device *pdev,
			     struct snd_soc_dai *dai)
{
	pr_debug("Entered %s\n", __func__);

	s3c24xx_i2s.regs = ioremap(S3C2410_PA_IIS, 0x100);
	if (s3c24xx_i2s.regs == NULL)
		return -ENXIO;

	s3c24xx_i2s.iis_clk = clk_get(&pdev->dev, "iis");
	if (s3c24xx_i2s.iis_clk == NULL) {
		pr_err("failed to get iis_clock\n");
		iounmap(s3c24xx_i2s.regs);
		return -ENODEV;
	}
	clk_enable(s3c24xx_i2s.iis_clk);

	/* Configure the I2S pins in correct mode */
	s3c2410_gpio_cfgpin(S3C2410_GPE0, S3C2410_GPE0_I2SLRCK);
	s3c2410_gpio_cfgpin(S3C2410_GPE1, S3C2410_GPE1_I2SSCLK);
	s3c2410_gpio_cfgpin(S3C2410_GPE2, S3C2410_GPE2_CDCLK);
	s3c2410_gpio_cfgpin(S3C2410_GPE3, S3C2410_GPE3_I2SSDI);
	s3c2410_gpio_cfgpin(S3C2410_GPE4, S3C2410_GPE4_I2SSDO);

	writel(S3C2410_IISCON_IISEN, s3c24xx_i2s.regs + S3C2410_IISCON);

	s3c24xx_snd_txctrl(0);
	s3c24xx_snd_rxctrl(0);

	return 0;
}
开发者ID:12rafael,项目名称:jellytimekernel,代码行数:31,代码来源:s3c24xx-i2s.c


示例8: s3c2410_ts_connect

static inline void s3c2410_ts_connect(void)
{
	s3c2410_gpio_cfgpin(S3C2410_GPG12, S3C2410_GPG12_XMON);
	s3c2410_gpio_cfgpin(S3C2410_GPG13, S3C2410_GPG13_nXPON);
	s3c2410_gpio_cfgpin(S3C2410_GPG14, S3C2410_GPG14_YMON);
	s3c2410_gpio_cfgpin(S3C2410_GPG15, S3C2410_GPG15_nYPON);
}
开发者ID:EvanHa,项目名称:networktest,代码行数:7,代码来源:s3c2410_ts.c


示例9: s3c24xx_ts_cfg_gpio

/**
 * s3c24xx_ts_cfg_gpio - configure gpio for s3c2410 systems
 *
 * Configure the GPIO for the S3C2410 system, where we have external FETs
 * connected to the device (later systems such as the S3C2440 integrate
 * these into the device).
 */
void s3c24xx_ts_cfg_gpio(struct platform_device *dev)
{
	s3c2410_gpio_cfgpin(S3C2410_GPG(12), S3C2410_GPG12_XMON);
	s3c2410_gpio_cfgpin(S3C2410_GPG(13), S3C2410_GPG13_nXPON);
	s3c2410_gpio_cfgpin(S3C2410_GPG(14), S3C2410_GPG14_YMON);
	s3c2410_gpio_cfgpin(S3C2410_GPG(15), S3C2410_GPG15_nYPON);
}
开发者ID:CSCLOG,项目名称:beaglebone,代码行数:14,代码来源:setup-ts.c


示例10: tq2440_pwm_ioctl

static int tq2440_pwm_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
{
	unsigned long tcfg0;
	unsigned long tcfg1;
	unsigned long tcntb;
	unsigned long tcmpb;
	unsigned long tcon;

	switch (cmd) {
	case BEEP_OFF:
		s3c2410_gpio_cfgpin(S3C2410_GPB(0), S3C2410_GPIO_OUTPUT);
		s3c2410_gpio_setpin(S3C2410_GPB(0), 0);
		break;
	case BEEP_ON_TIMES:
	{
		void __user *argp =  (void __user *)arg;
		unsigned int args = *((unsigned int *)argp);
		struct clk *clk_p;
		unsigned long pclk;

		//set GPB0 as tout0, pwm output
		s3c2410_gpio_cfgpin(S3C2410_GPB(0), S3C2410_GPB0_TOUT0);

		tcon = __raw_readl(S3C2410_TCON);
		tcfg1 = __raw_readl(S3C2410_TCFG1);
		tcfg0 = __raw_readl(S3C2410_TCFG0);

		//prescaler = 50
		tcfg0 &= ~S3C2410_TCFG_PRESCALER0_MASK;
		tcfg0 |= (50 - 1); 

		//mux = 1/16
		tcfg1 &= ~S3C2410_TCFG1_MUX0_MASK;
		tcfg1 |= S3C2410_TCFG1_MUX0_DIV16;

		__raw_writel(tcfg1, S3C2410_TCFG1);
		__raw_writel(tcfg0, S3C2410_TCFG0);

		clk_p = clk_get(NULL, "pclk");
		pclk  = clk_get_rate(clk_p);
		tcntb  = (pclk/128)/args;
		tcmpb = tcntb>>1;

		__raw_writel(tcntb, S3C2410_TCNTB(0));
		__raw_writel(tcmpb, S3C2410_TCMPB(0));
			
		tcon &= ~0x1f;
		tcon |= 0xb;		//start timer
		__raw_writel(tcon, S3C2410_TCON);

		tcon &= ~2;
		__raw_writel(tcon, S3C2410_TCON);
	}
		break;
	}

	
	return 0;
}
开发者ID:zhu8920253,项目名称:linux_driver,代码行数:59,代码来源:tq_pwm_drv.c


示例11: s3c2410_spigpio_probe

static int s3c2410_spigpio_probe(struct platform_device *dev)
{
	struct spi_master	*master;
	struct s3c2410_spigpio  *sp;
	int ret;
	int i;

	master = spi_alloc_master(&dev->dev, sizeof(struct s3c2410_spigpio));
	if (master == NULL) {
		dev_err(&dev->dev, "failed to allocate spi master\n");
		ret = -ENOMEM;
		goto err;
	}

	sp = spi_master_get_devdata(master);

	platform_set_drvdata(dev, sp);

	/* copy in the plkatform data */
	sp->info = dev->dev.platform_data;

	/* setup spi bitbang adaptor */
	sp->bitbang.master = spi_master_get(master);
	sp->bitbang.chipselect = s3c2410_spigpio_chipselect;

	sp->bitbang.txrx_word[SPI_MODE_0] = s3c2410_spigpio_txrx_mode0;
	sp->bitbang.txrx_word[SPI_MODE_1] = s3c2410_spigpio_txrx_mode1;

	/* set state of spi pins */
	s3c2410_gpio_setpin(sp->info->pin_clk, 0);
	s3c2410_gpio_setpin(sp->info->pin_mosi, 0);

	s3c2410_gpio_cfgpin(sp->info->pin_clk, S3C2410_GPIO_OUTPUT);
	s3c2410_gpio_cfgpin(sp->info->pin_mosi, S3C2410_GPIO_OUTPUT);
	s3c2410_gpio_cfgpin(sp->info->pin_miso, S3C2410_GPIO_INPUT);

	ret = spi_bitbang_start(&sp->bitbang);
	if (ret)
		goto err_no_bitbang;

	/* register the chips to go with the board */

	for (i = 0; i < sp->info->board_size; i++) {
		dev_info(&dev->dev, "registering %p: %s\n",
			 &sp->info->board_info[i],
			 sp->info->board_info[i].modalias);

		sp->info->board_info[i].controller_data = sp;
		spi_new_device(master, sp->info->board_info + i);
	}

	return 0;

 err_no_bitbang:
	spi_master_put(sp->bitbang.master);
 err:
	return ret;

}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:59,代码来源:spi_s3c24xx_gpio.c


示例12: s3c2410_spigpio_probe

static int s3c2410_spigpio_probe(struct platform_device *dev)
{
	struct s3c2410_spigpio_info *info;
	struct spi_master	*master;
	struct s3c2410_spigpio  *sp;
	int ret;

	master = spi_alloc_master(&dev->dev, sizeof(struct s3c2410_spigpio));
	if (master == NULL) {
		dev_err(&dev->dev, "failed to allocate spi master\n");
		ret = -ENOMEM;
		goto err;
	}

	sp = spi_master_get_devdata(master);

	platform_set_drvdata(dev, sp);

	/* copy in the plkatform data */
	info = sp->info = dev->dev.platform_data;

	/* setup spi bitbang adaptor */
	sp->bitbang.master = spi_master_get(master);
	sp->bitbang.master->bus_num = info->bus_num;
	sp->bitbang.master->num_chipselect = info->num_chipselect;
	sp->bitbang.chipselect = s3c2410_spigpio_chipselect;

	sp->bitbang.txrx_word[SPI_MODE_0] = s3c2410_spigpio_txrx_mode0;
	sp->bitbang.txrx_word[SPI_MODE_1] = s3c2410_spigpio_txrx_mode1;
	sp->bitbang.txrx_word[SPI_MODE_2] = s3c2410_spigpio_txrx_mode2;
	sp->bitbang.txrx_word[SPI_MODE_3] = s3c2410_spigpio_txrx_mode3;

	/* set state of spi pins, always assume that the clock is
	 * available, but do check the MOSI and MISO. */
	s3c2410_gpio_setpin(info->pin_clk, 0);
	s3c2410_gpio_cfgpin(info->pin_clk, S3C2410_GPIO_OUTPUT);

	if (info->pin_mosi < S3C2410_GPH10) {
		s3c2410_gpio_setpin(info->pin_mosi, 0);
		s3c2410_gpio_cfgpin(info->pin_mosi, S3C2410_GPIO_OUTPUT);
	}

	if (info->pin_miso != S3C2410_GPA0 && info->pin_miso < S3C2410_GPH10)
		s3c2410_gpio_cfgpin(info->pin_miso, S3C2410_GPIO_INPUT);

	ret = spi_bitbang_start(&sp->bitbang);
	if (ret)
		goto err_no_bitbang;

	return 0;

 err_no_bitbang:
	spi_master_put(sp->bitbang.master);
 err:
	return ret;

}
开发者ID:debugevery,项目名称:android-kernel-samsung-dev,代码行数:57,代码来源:spi_s3c24xx_gpio.c


示例13: led_open

static int led_open(struct inode *inode, struct file *filp)
{
    s3c2410_gpio_cfgpin(S3C2410_GPF4, S3C2410_GPF4_OUTP);
    s3c2410_gpio_cfgpin(S3C2410_GPF5, S3C2410_GPF5_OUTP);
    s3c2410_gpio_cfgpin(S3C2410_GPF6, S3C2410_GPF6_OUTP);
    s3c2410_gpio_cfgpin(S3C2410_GPF7, S3C2410_GPF7_OUTP);

    return 0;
}   
开发者ID:kametang,项目名称:Vending_Machine,代码行数:9,代码来源:led.c


示例14: s3cfb_spi_set_lcd_data

static inline void s3cfb_spi_set_lcd_data(int ch)
{
	s3c2410_gpio_cfgpin(S3C_FB_SPI_CLK(ch), 1);
	s3c2410_gpio_cfgpin(S3C_FB_SPI_MOSI(ch), 1);
	s3c2410_gpio_cfgpin(S3C_FB_SPI_CS(ch), 1);

	s3c2410_gpio_pullup(S3C_FB_SPI_CLK(ch), 2);
	s3c2410_gpio_pullup(S3C_FB_SPI_MOSI(ch), 2);
	s3c2410_gpio_pullup(S3C_FB_SPI_CS(ch), 2);
}
开发者ID:Astinj,项目名称:I5700-kernel-2.6.32.9,代码行数:10,代码来源:s3cfb_spi.c


示例15: rebis_keyscan_read

static ssize_t rebis_keyscan_read(struct file *filp, char *buff, size_t count, loff_t *offp)
{
	int i;
	//int key_base[5] = {KEY_MATRIX_BASE5, KEY_MATRIX_BASE4, KEY_MATRIX_BASE3, KEY_MATRIX_BASE2, KEY_MATRIX_BASE1};

	cur_key = 0;

	if(!(filp->f_flags & O_NONBLOCK)){
		#if 0
		interruptible_sleep_on(&wq);
		#else
		wait_event_interruptible(wq, flag != 0);
		//wait_event_interruptible_timeout(wq, flag != 0, 600);
		#endif
	}
	
	//for key scan
	#if 1
	cur_key = 0;
	s3c2410_gpio_cfgpin(S3C2410_GPF3, S3C2410_GPF3_INP);
	for(i=4; i>=0; i--)
	{
		writel(readl(S3C2410_GPBDAT) | (0x1f), S3C2410_GPBDAT);
		writel(readl(S3C2410_GPBDAT) & (~(0x1 << i)), S3C2410_GPBDAT);
		
		cur_key = scan_input();
		if(cur_key)
		//cur_key = scan_input();
		{
			cur_key += (i)*2;//key_base[i]; 
			if(cur_key == old_key)
				goto SameValue;
			old_key = cur_key;
			//printk("cur_key = %d \n\n", cur_key);
			put_user(cur_key,(char *)buff);
			break;
		}
	}
SameValue:
	old_key = 0;
	flag = 0;

	// set GPBDAT 0
	s3c2410_gpio_setpin(S3C2410_GPB0, 0);
	s3c2410_gpio_setpin(S3C2410_GPB1, 0);
	s3c2410_gpio_setpin(S3C2410_GPB2, 0);
	s3c2410_gpio_setpin(S3C2410_GPB3, 0);
	s3c2410_gpio_setpin(S3C2410_GPB4, 0);
	
	// change External Interrupts
	s3c2410_gpio_cfgpin(S3C2410_GPF3, S3C2410_GPF3_EINT3);
	#endif

	return count;
}
开发者ID:uvvu,项目名称:mds_edu,代码行数:55,代码来源:keyint_bottom_kscan_dd.c


示例16: nexcoder_sensorboard_init

static void __init nexcoder_sensorboard_init(void)
{
	// Initialize SCCB bus
	s3c2410_gpio_setpin(S3C2410_GPE14, 1); // IICSCL
	s3c2410_gpio_cfgpin(S3C2410_GPE14, S3C2410_GPE14_OUTP);
	s3c2410_gpio_setpin(S3C2410_GPE15, 1); // IICSDA
	s3c2410_gpio_cfgpin(S3C2410_GPE15, S3C2410_GPE15_OUTP);

	// Power up the sensor board
	s3c2410_gpio_setpin(S3C2410_GPF1, 1);
	s3c2410_gpio_cfgpin(S3C2410_GPF1, S3C2410_GPF1_OUTP); // CAM_GPIO7 => nLDO_PWRDN
	s3c2410_gpio_setpin(S3C2410_GPF2, 0);
	s3c2410_gpio_cfgpin(S3C2410_GPF2, S3C2410_GPF2_OUTP); // CAM_GPIO6 => CAM_PWRDN
}
开发者ID:10x-Amin,项目名称:nAa-kernel,代码行数:14,代码来源:mach-nexcoder.c


示例17: smdk_machine_init

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

	s3c2410_gpio_cfgpin(S3C2410_GPF4, S3C2410_GPF4_OUTP);
	s3c2410_gpio_cfgpin(S3C2410_GPF5, S3C2410_GPF5_OUTP);
	s3c2410_gpio_cfgpin(S3C2410_GPF6, S3C2410_GPF6_OUTP);
	s3c2410_gpio_cfgpin(S3C2410_GPF7, S3C2410_GPF7_OUTP);

	s3c2410_gpio_setpin(S3C2410_GPF4, 1);
	s3c2410_gpio_setpin(S3C2410_GPF5, 1);
	s3c2410_gpio_setpin(S3C2410_GPF6, 1);
	s3c2410_gpio_setpin(S3C2410_GPF7, 1);

	s3c_device_nand.dev.platform_data = &smdk_nand_info;
#else
	canopus_gpio_init();
	q_s3c2416_init_clocks();

	if (q_hw_ver(SWP2000)
			|| q_hw_ver(7800_MP2)) {
		q_clock_init(0, 48000000); /* for USB */
	} else if (q_hw_ver(KTQOOK_TP2)
			|| q_hw_ver(KTQOOK_MP)
			|| q_hw_ver(SKATM)) {
		q_clock_init(1, 48000000); /* for USB */
	}

	if (q_hw_ver(SKATM)) {
		q_clock_init(0, 12000000); /* for SmartCard reader */
	}
#endif	// CONFIG_MACH_CANOPUS
	
	//For s3c nand partition
	s3c_device_nand.dev.platform_data = &nand_mtd_info;

	platform_add_devices(smdk_devs, ARRAY_SIZE(smdk_devs));

	if (q_hw_ver(KTQOOK))
		platform_add_devices(kt_devs, ARRAY_SIZE(kt_devs));

	s3c2410_pm_init();

#ifdef CONFIG_MACH_CANOPUS
	q_param_proc_init();
#endif
}
开发者ID:cyox93,项目名称:s3c-linux-2.6.21,代码行数:48,代码来源:common-smdk.c


示例18: gsm_write

static ssize_t gsm_write(struct device *dev, struct device_attribute *attr,
			 const char *buf, size_t count)
{
	unsigned long on = simple_strtoul(buf, NULL, 10);

	if (!strcmp(attr->attr.name, "power_on")) {
		gsm_on_off(dev, on);

		return count;
	}

	if (!strcmp(attr->attr.name, "download")) {
		/*
		 * the keyboard / buttons driver requests and enables
		 * the JACK_INSERT IRQ.  We have to take care about
		 * not enabling and disabling the IRQ when it was
		 * already in that state or we get "unblanaced IRQ"
		 * kernel warnings and stack dumps.  So we use the
		 * copy of the ndl_gsm state to figure out if we should
		 * enable or disable the jack interrupt
		 */
		if (on) {
			if (gta02_gsm.gpio_ndl_gsm)
				disable_irq(gpio_to_irq(
						   GTA02_GPIO_JACK_INSERT));
		} else {
			if (!gta02_gsm.gpio_ndl_gsm)
				enable_irq(gpio_to_irq(
						   GTA02_GPIO_JACK_INSERT));
		}

		gta02_gsm.gpio_ndl_gsm = !on;
		s3c2410_gpio_setpin(GTA02_GPIO_nDL_GSM, !on);

		return count;
	}

	if (!strcmp(attr->attr.name, "flowcontrolled")) {
		if (on) {
			gta_gsm_interrupts = 0;
			s3c2410_gpio_setpin(S3C2410_GPH1, 1);
			s3c2410_gpio_cfgpin(S3C2410_GPH1, S3C2410_GPH1_OUTP);
		} else
			s3c2410_gpio_cfgpin(S3C2410_GPH1, S3C2410_GPH1_nRTS0);
	}

	return count;
}
开发者ID:7LK,项目名称:McWRT,代码行数:48,代码来源:gta02-pm-gsm.c


示例19: _get_lcd_panel_id

static void
_get_lcd_panel_id(void)
{
	// set gpio in for lcd panel id
	s3c2410_gpio_cfgpin(S3C2410_GPD8, S3C2410_GPD8_INP);
	s3c2410_gpio_cfgpin(S3C2410_GPD9, S3C2410_GPD9_INP);
	s3c2410_gpio_cfgpin(S3C2410_GPD10, S3C2410_GPD10_INP);

	// set pull up/down disable for lcd panel id
	s3c2410_gpio_pullup(S3C2410_GPD8, 0);
	s3c2410_gpio_pullup(S3C2410_GPD9, 0);
	s3c2410_gpio_pullup(S3C2410_GPD10, 0);

	_lcd_panel_id = (__raw_readl(S3C2410_GPDDAT) & 0x700) >> 8;
	printk(KERN_INFO "CANOPUS LCD Panel ID [0x%x]\n", _lcd_panel_id);
}
开发者ID:cyox93,项目名称:s3c-linux-2.6.21,代码行数:16,代码来源:common-smdk.c


示例20: led_init

static int __init led_init(void)
{
    int retval;
    int bwscon;
    int bankcon1;
    
    retval = register_chrdev(LED_MAJOR,led_name,&led_fops);
    if(retval < 0)
    {
        printk(KERN_WARNING"Can't get major %d\n",LED_MAJOR);
        return retval;
    }
    s3c2410_gpio_cfgpin(S3C2410_GPA12, S3C2410_GPA12_nGCS1);
    bwscon = __raw_readl(S3C2410_BWSCON);
    bwscon&= ~(0xF << 4);
    bwscon|= (0x6 << 4);
    __raw_writel(bwscon, S3C2410_BWSCON);
    
    bankcon1 = __raw_readl(S3C2410_BANKCON1);
    bankcon1 =((0x3<<13)+(0x3<<11)+(0x7<<8)+(0x3<<6)\
        +(0x3<<4)+(0x3<<2)+(0x0));
    __raw_writel(bankcon1, S3C2410_BANKCON1);
    
    LED8X8_Address = ioremap(0x08000000,4);
    if (LED8X8_Address == 0) {
        printk(KERN_INFO  "failed to ioremap() region\n");
        return -EINVAL;
    }
    // printk("LED driver register success!\n");
    return 0;
}
开发者ID:kametang,项目名称:Vending_Machine,代码行数:31,代码来源:led.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ s3c2410_gpio_setpin函数代码示例发布时间:2022-05-30
下一篇:
C++ s3c2410_dma_ctrl函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap