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

C++ IRQ_EINT函数代码示例

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

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



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

示例1: bt_host_wake_irq_handler

irqreturn_t bt_host_wake_irq_handler(int irq, void *dev_id)
{
	disable_irq(IRQ_EINT(22));
	schedule_work(&bt_host_wake_work);

	return IRQ_HANDLED;
}
开发者ID:Xmister,项目名称:cm-kernel,代码行数:7,代码来源:board-rfkill.c


示例2: bt_host_wake_work_func

static void bt_host_wake_work_func(struct work_struct *ignored)
{
	int gpio_val;

	gpio_val = gpio_get_value(GPIO_BT_HOST_WAKE);
	printk(KERN_DEBUG "[BT] GPIO_BT_HOST_WAKE = %d\n", gpio_val);
/*
	if(gpio_val == GPIO_LEVEL_LOW)
	{
		//wake_unlock^M
		printk("[BT]:wake_unlock \n");
		wake_unlock(&rfkill_wake_lock);
	}
	else
	{
		//wake_lock
		printk("[BT]:wake_lock \n");
		wake_lock(&rfkill_wake_lock);
	}
*/

	if(gpio_val == GPIO_LEVEL_HIGH)
	{
		printk(KERN_DEBUG "[BT] wake_lock timeout = 5 sec\n");
		wake_lock_timeout(&rfkill_wake_lock, 5*HZ);
	}

	enable_irq(IRQ_EINT(22));
}
开发者ID:Xmister,项目名称:cm-kernel,代码行数:29,代码来源:board-rfkill.c


示例3: universal_sdhci2_cfg_ext_cd

void universal_sdhci2_cfg_ext_cd(void)
{
	printk(KERN_DEBUG "Universal :SD Detect configuration\n");
	s3c_gpio_cfgpin(GPIO_T_FLASH_DETECT, S3C_GPIO_SFN(GPIO_T_FLASH_DETECT_AF));
	s3c_gpio_setpull(S5PV210_GPH3(4), S3C_GPIO_PULL_NONE);
	set_irq_type(IRQ_EINT(28), IRQ_TYPE_EDGE_BOTH);
}
开发者ID:Angel666,项目名称:ICS_kernel_P1000_CM_version,代码行数:7,代码来源:setup-sdhci.c


示例4: s5pv310_irq_demux_eint16_31

static void s5pv310_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc)
{
	struct irq_chip *chip = get_irq_chip(irq);
	u32 a16_23, a24_31;

	if (chip->ack)
		chip->ack(irq);

	a16_23 = s5pv310_irq_demux_eint(irq, IRQ_EINT(16));
	a24_31 = s5pv310_irq_demux_eint(irq, IRQ_EINT(24));
		
	if (!a16_23 && !a24_31)
		do_bad_IRQ(irq, desc);

	chip->unmask(irq);
}
开发者ID:eaglerazor,项目名称:neak-kernel-sgs2,代码行数:16,代码来源:irq-eint.c


示例5: universal_sdhci2_cfg_ext_cd

void universal_sdhci2_cfg_ext_cd(void)
{
	printk(" Universal :SD Detect configuration \n");

#if defined(CONFIG_MACH_S5PC110_P1)
	s3c_gpio_cfgpin(GPIO_T_FLASH_DETECT, S3C_GPIO_SFN(GPIO_T_FLASH_DETECT_AF));
	s3c_gpio_setpull(S5PV210_GPH3(4), S3C_GPIO_PULL_NONE);
	set_irq_type(IRQ_EINT(28), IRQ_TYPE_EDGE_BOTH);	
#else
	if(((HWREV >= 7) || (HWREV == 0x3)) && (HWREV !=8))
		s3c_gpio_setpull(S5PV210_GPH3(4), S3C_GPIO_PULL_NONE);
	else
		s3c_gpio_setpull(S5PV210_GPH3(4), S3C_GPIO_PULL_DOWN);
#endif
	set_irq_type(IRQ_EINT(28), IRQ_TYPE_EDGE_BOTH);
}
开发者ID:xxSynGatesA7Xxx,项目名称:sgtkernel_tmobile,代码行数:16,代码来源:setup-sdhci.c


示例6: s5p_init_irq_eint

int __init s5p_init_irq_eint(void)
{
	int irq;

	for (irq = IRQ_EINT(0); irq <= IRQ_EINT(15); irq++)
		set_irq_chip(irq, &s5p_irq_vic_eint);

	for (irq = IRQ_EINT(16); irq <= IRQ_EINT(31); irq++) {
		set_irq_chip(irq, &s5p_irq_eint);
		set_irq_handler(irq, handle_level_irq);
		set_irq_flags(irq, IRQF_VALID);
	}

	set_irq_chained_handler(IRQ_EINT16_31, s5p_irq_demux_eint16_31);
	return 0;
}
开发者ID:12019,项目名称:android_kernel_samsung_xcover,代码行数:16,代码来源:irq-eint.c


示例7: s5p64x0_irq_demux_eint

/*
 * s5p64x0_irq_demux_eint
 *
 * This function demuxes the IRQ from the group0 external interrupts,
 * from IRQ_EINT(0) to IRQ_EINT(15). It is designed to be inlined into
 * the specific handlers s5p64x0_irq_demux_eintX_Y.
 */
static inline void s5p64x0_irq_demux_eint(unsigned int start, unsigned int end)
{
	u32 status = __raw_readl(S5P64X0_EINT0PEND);
	u32 mask = __raw_readl(S5P64X0_EINT0MASK);
	unsigned int irq;

	status &= ~mask;
	status >>= start;
	status &= (1 << (end - start + 1)) - 1;

	for (irq = IRQ_EINT(start); irq <= IRQ_EINT(end); irq++) {
		if (status & 1)
			generic_handle_irq(irq);
		status >>= 1;
	}
}
开发者ID:7L,项目名称:pi_plus,代码行数:23,代码来源:common.c


示例8: tiny6410_keys_irq

static irqreturn_t tiny6410_keys_irq(int irq, void *dev_id)
{
    unsigned int tmp;
    irq_dev = (struct key_desc *)dev_id;

    if ((irq_dev->irq == IRQ_EINT(19)) || (irq_dev->irq == IRQ_EINT(20))) {
        tmp = readl(S3C64XX_GPLDAT);
        irq_dev->pin_val = tmp & (1<<irq_dev->pin);
    }else {
        tmp = readl(S3C64XX_GPNDAT);
        irq_dev->pin_val = tmp & (1<<irq_dev->pin);
    }
    
    /* Start the timer after 10ms */
    mod_timer(&keys_timers, jiffies+HZ/100);
    return IRQ_RETVAL(IRQ_HANDLED);
}
开发者ID:uwyyk,项目名称:LINUX_DRIVERS,代码行数:17,代码来源:tiny6410_input_key.c


示例9: s3c64xx_init_irq_eint

int __init s3c64xx_init_irq_eint(void)
{
	int irq;

	for (irq = IRQ_EINT(0); irq <= IRQ_EINT(27); irq++) {
		set_irq_chip(irq, &s3c_irq_eint);
		set_irq_handler(irq, handle_level_irq);
		set_irq_flags(irq, IRQF_VALID);
	}

	set_irq_chained_handler(IRQ_EINT0_3, s3c_irq_demux_eint0_3);
	set_irq_chained_handler(IRQ_EINT4_11, s3c_irq_demux_eint4_11);
	set_irq_chained_handler(IRQ_EINT12_19, s3c_irq_demux_eint12_19);
	set_irq_chained_handler(IRQ_EINT20_27, s3c_irq_demux_eint20_27);

	return 0;
}
开发者ID:illyah,项目名称:samsung_kernel_volans,代码行数:17,代码来源:irq-eint.c


示例10: s5pv310_init_irq_eint

int __init s5pv310_init_irq_eint(void)
{
	int irq;

	for( irq = 0 ; irq <= 31 ; irq++) {
		set_irq_chip(IRQ_EINT(irq), &s5pv310_irq_eint);
		set_irq_handler(IRQ_EINT(irq), handle_level_irq);
		set_irq_flags(IRQ_EINT(irq), IRQF_VALID);
	}

	set_irq_chained_handler(IRQ_EINT16_31, s5pv310_irq_demux_eint16_31);

	for ( irq = 0 ; irq <= 15 ; irq++)
		set_irq_chained_handler(s5pv310_get_irq_nr(irq), s5pv310_irq_eint0_15);

	return 0;
}
开发者ID:eaglerazor,项目名称:neak-kernel-sgs2,代码行数:17,代码来源:irq-eint.c


示例11: s5pc210_extint_to_irq

static int s5pc210_extint_to_irq(struct gpio_chip *gpio, unsigned int offset)
{
	struct s3c_gpio_chip *chip = to_s3c_gpio(gpio);
	int irq;

	irq = (chip->group * 8) + offset;
	return IRQ_EINT(irq);
}
开发者ID:Ateeq72,项目名称:lulz-kernel_gt-i9100,代码行数:8,代码来源:gpiolib.c


示例12: s5pc1xx_gpiolib_to_eint

static int s5pc1xx_gpiolib_to_eint(struct gpio_chip *chip, unsigned int offset)
{
	int base;

	base = chip->base - S5PC100_GPH0(0);
	if (base == 0)
		return IRQ_EINT(offset);
	base = chip->base - S5PC100_GPH1(0);
	if (base == 0)
		return IRQ_EINT(8 + offset);
	base = chip->base - S5PC100_GPH2(0);
	if (base == 0)
		return IRQ_EINT(16 + offset);
	base = chip->base - S5PC100_GPH3(0);
	if (base == 0)
		return IRQ_EINT(24 + offset);
	return -EINVAL;
}
开发者ID:1plus4,项目名称:ev3sources,代码行数:18,代码来源:gpiolib.c


示例13: init_gpio

static void init_gpio(void)
{
	int i;
	for(i =0;i < KEYNUM;i++)
	{
		s3c_gpio_cfgpin(S3C64XX_GPN(i),2);
		irq_set_irq_type(IRQ_EINT(i),dev_info[i].flags);
	}
}
开发者ID:houstar,项目名称:driver,代码行数:9,代码来源:misc_key.c


示例14: s5p_init_irq_eint

static int __init s5p_init_irq_eint(void)
{
	int irq;

	if (of_have_populated_dt())
		return -ENODEV;

	for (irq = IRQ_EINT(0); irq <= IRQ_EINT(15); irq++)
		irq_set_chip(irq, &s5p_irq_vic_eint);

	for (irq = IRQ_EINT(16); irq <= IRQ_EINT(31); irq++) {
		irq_set_chip_and_handler(irq, &s5p_irq_eint, handle_level_irq);
		set_irq_flags(irq, IRQF_VALID);
	}

	irq_set_chained_handler(IRQ_EINT16_31, s5p_irq_demux_eint16_31);
	return 0;
}
开发者ID:01org,项目名称:KVMGT-kernel,代码行数:18,代码来源:s5p-irq-eint.c


示例15: s5p64xx_pm_configure_extint

static void s5p64xx_pm_configure_extint(void)
{
#if 0 
	s3c_gpio_cfgpin(S5P64XX_GPN(10), S5P64XX_GPN10_EINT10);
	s3c_gpio_setpull(S5P64XX_GPN(10), S3C_GPIO_PULL_UP);
#else
	__raw_writel((__raw_readl(S5P64XX_GPNCON) & ~(0x3 << 20)) |
		     (0x2 << 20), S5P64XX_GPNCON);
	__raw_writel((__raw_readl(S5P64XX_GPNPUD) & ~(0x3 << 20)) |
		     (0x2 << 20), S5P64XX_GPNPUD);
#endif
	udelay(50);

	__raw_writel((__raw_readl(S5P64XX_EINT0CON0) & ~(0x7 << 20)) |
		     (0x2 << 20), S5P64XX_EINT0CON0);

	__raw_writel(1UL << (IRQ_EINT(10) - IRQ_EINT(0)), S5P64XX_EINT0PEND);
	__raw_writel(__raw_readl(S5P64XX_EINT0MASK)&~(1UL << (IRQ_EINT(10) - IRQ_EINT(0))), S5P64XX_EINT0MASK);
}
开发者ID:Arakmar,项目名称:G3MOD,代码行数:19,代码来源:pm.c


示例16: universal_sdhci2_cfg_ext_cd

void universal_sdhci2_cfg_ext_cd(void)
{
	printk(KERN_DEBUG "Universal :SD Detect configuration\n");
#if defined(CONFIG_SAMSUNG_CAPTIVATE) || defined(CONFIG_SAMSUNG_VIBRANT)
    s3c_gpio_setpull(S5PV210_GPH3(4), S3C_GPIO_PULL_UP);
#else
    s3c_gpio_setpull(S5PV210_GPH3(4), S3C_GPIO_PULL_NONE);
#endif
	set_irq_type(IRQ_EINT(28), IRQ_TYPE_EDGE_BOTH);
}
开发者ID:explodingboy70,项目名称:android_kernel_samsung_aries,代码行数:10,代码来源:setup-sdhci.c


示例17: char_open

int char_open(struct inode * inode, struct file * fp) 
{
	int rc, irq;

	printk("device open \n");

	//printk("dev is 0x%x\n", inode->i_rdev);
	//printk("major is %d\n", MAJOR(inode->i_rdev));
	//printk("minor is %d\n", MINOR(inode->i_rdev));

	printk("S5PV210 IRQ:%d--%d--%d\n",S5PV210_GPH2(0),IRQ_EINT(16),gpio_to_irq(S5PV210_GPH2(0)));

	rc = gpio_request (S5PV210_GPH2(0), "K1"); // kiem tra xem chan co free khong
	if (rc) { // =1
		printk (KERN_ALERT "Unable to request pin %d\n",S5PV210_GPH2(0));
		return -1;
	}
	

	rc = gpio_request (S5PV210_GPH2(1), "K2"); 
	if (rc) { // =0
		printk (KERN_ALERT "Unable to request pin %d\n",S5PV210_GPH2(1));
		return -1;
	}

	//led_no = MINOR(inode->i_rdev);
	//printk("Reg:%x<----\n",*portj);
	irq = gpio_to_irq(S5PV210_GPH2(0)); //IRQ_EINT(16) lay so ngat
	printk (KERN_ALERT "IRQ K1= %d\n", irq); // in ra so ngat

	rc = request_irq(irq, k1_handler, IRQF_TRIGGER_FALLING, "mybtnk1", NULL);	 // dang ky interrupt
	if(rc) 
	{
		printk("register irq %d error",irq);
		return -1;
	}

	irq = gpio_to_irq(S5PV210_GPH2(1)); //IRQ_EINT(17)
	// irq = IRG_EINT(17)
	printk (KERN_ALERT "IRQ K2= %d\n", irq);
	rc = request_irq(irq, k2_handler, IRQF_TRIGGER_FALLING, "mybtnk2", NULL);
	if(rc) 
	{
		printk("register irq %d error",irq);
		return -1;
	}
	  // my_timer.function, my_timer.data
	
  	//setup_timer( &my_timer, my_timer_callback, 0 ); // chong doi
	//printk("start timer at %ld\n",jiffies);
	//mod_timer( &my_timer, jiffies + msecs_to_jiffies(1000) );
	init_waitqueue_head(&wq);
	//printk("Reg:%x<----\n",*portj);
	return 0;
}
开发者ID:quangthanh010290,项目名称:tiny210,代码行数:55,代码来源:irq.c


示例18: smdk6410_rfkill_probe

static int __init smdk6410_rfkill_probe(struct platform_device *pdev)
#endif	/* #ifdef CONFIG_MACH_JET */
#endif	/* #ifdef CONFIG_MACH_SPICA */
#endif	/* #ifdef CONFIG_MACH_INSTINCTQ */
{
    int rc = 0;
    int irq,ret;

    //Initialize wake locks
    wake_lock_init(&rfkill_wake_lock, WAKE_LOCK_SUSPEND, "board-rfkill");
    wake_lock_init(&bt_wake_lock, WAKE_LOCK_SUSPEND, "bt-rfkill");

    //BT Host Wake IRQ
    irq = IRQ_BT_HOST_WAKE;

    ret = request_irq(irq, bt_host_wake_irq_handler, 0, "bt_host_wake_irq_handler", NULL);
    if(ret < 0)
#ifdef CONFIG_MACH_INSTINCTQ
        printk("[BT] Request_irq failed \n");
#else
        printk(KERN_DEBUG "[BT] Request_irq failed \n");
#endif	/* #else #ifdef CONFIG_MACH_INSTINCTQ */

    set_irq_type(irq, IRQ_TYPE_EDGE_BOTH);
    enable_irq(IRQ_EINT(22));

    //RFKILL init - default to bluetooth off
    rfkill_switch_all(RFKILL_TYPE_BLUETOOTH, RFKILL_STATE_SOFT_BLOCKED);

    bt_rfk = rfkill_allocate(&pdev->dev, RFKILL_TYPE_BLUETOOTH);
    if (!bt_rfk)
        return -ENOMEM;

    bt_rfk->name = bt_name;
    bt_rfk->state = RFKILL_STATE_SOFT_BLOCKED;
    /* userspace cannot take exclusive control */
    bt_rfk->user_claim_unsupported = 1;
    bt_rfk->user_claim = 0;
    bt_rfk->data = NULL;  // user data
    bt_rfk->toggle_radio = bluetooth_set_power;

#ifdef CONFIG_MACH_INSTINCTQ
    printk("[BT] rfkill_register(bt_rfk) \n");
#else
    printk(KERN_DEBUG "[BT] rfkill_register(bt_rfk) \n");
#endif	/* #ifdef CONFIG_MACH_INSTINCTQ */
    rc = rfkill_register(bt_rfk);
    if (rc)
        rfkill_free(bt_rfk);

    bluetooth_set_power(NULL, RFKILL_STATE_SOFT_BLOCKED);

    return rc;
}
开发者ID:8497165,项目名称:JetKernel,代码行数:54,代码来源:board-rfkill.c


示例19: universal_sdhci2_cfg_ext_cd

void universal_sdhci2_cfg_ext_cd(void)
{
	printk(" Universal :SD Detect configuration \n");

#if defined(CONFIG_MACH_S5PC110_P1)
	s3c_gpio_setpull(S5PV210_GPH3(4), S3C_GPIO_PULL_NONE);
#else
	s3c_gpio_setpull(S5PV210_GPH3(4), S3C_GPIO_PULL_NONE);
#endif
	set_irq_type(IRQ_EINT(28), IRQ_TYPE_EDGE_BOTH);
}
开发者ID:jdlfg,项目名称:fascinate-kernel,代码行数:11,代码来源:setup-sdhci.c


示例20: s3c64xx_init_irq_eint

static int __init s3c64xx_init_irq_eint(void)
{
	int irq;

	/* On DT-enabled systems EINTs are handled by pinctrl-s3c64xx driver. */
	if (of_have_populated_dt())
		return -ENODEV;

	for (irq = IRQ_EINT(0); irq <= IRQ_EINT(27); irq++) {
		irq_set_chip_and_handler(irq, &s3c_irq_eint, handle_level_irq);
		irq_set_chip_data(irq, (void *)eint_irq_to_bit(irq));
		set_irq_flags(irq, IRQF_VALID);
	}

	irq_set_chained_handler(IRQ_EINT0_3, s3c_irq_demux_eint0_3);
	irq_set_chained_handler(IRQ_EINT4_11, s3c_irq_demux_eint4_11);
	irq_set_chained_handler(IRQ_EINT12_19, s3c_irq_demux_eint12_19);
	irq_set_chained_handler(IRQ_EINT20_27, s3c_irq_demux_eint20_27);

	return 0;
}
开发者ID:01org,项目名称:XenGT-Preview-kernel,代码行数:21,代码来源:common.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ IRQ_EXIT函数代码示例发布时间:2022-05-30
下一篇:
C++ IRQ_CONNECT函数代码示例发布时间: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