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

C++ disable_irq_wake函数代码示例

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

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



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

示例1: nokia_modem_remove

static int nokia_modem_remove(struct device *dev)
{
	struct nokia_modem_device *modem = dev_get_drvdata(dev);

	if (!modem)
		return 0;

	if (modem->ssi_protocol) {
		hsi_remove_client(&modem->ssi_protocol->device, NULL);
		modem->ssi_protocol = NULL;
	}

	nokia_modem_gpio_unexport(dev);
	dev_set_drvdata(dev, NULL);
	disable_irq_wake(modem->nokia_modem_rst_ind_irq);
	tasklet_kill(&modem->nokia_modem_rst_ind_tasklet);

	return 0;
}
开发者ID:383530895,项目名称:linux,代码行数:19,代码来源:nokia-modem.c


示例2: reset_mcu

void reset_mcu(struct ssp_data *data)
{
	disable_irq(data->iIrq);
	disable_irq_wake(data->iIrq);

	toggle_mcu_reset(data);
	msleep(SSP_SW_RESET_TIME);
	if (initialize_mcu(data) < 0)
		data->bCheckShutdown = true;

	sync_sensor_state(data);

	enable_irq(data->iIrq);
	enable_irq_wake(data->iIrq);

#ifdef CONFIG_SENSORS_SSP_SENSORHUB
	ssp_report_sensorhub_notice(data, MSG2SSP_AP_STATUS_RESET);
#endif
}
开发者ID:garwynn,项目名称:SC02E_LJF_Kernel,代码行数:19,代码来源:ssp_debug.c


示例3: seport_platform_unregister_plug_detect_gpio_callback

void seport_platform_unregister_plug_detect_gpio_callback(void *data)
{
	int irq;

	(void)gpio_direction_output(seport_conf->headset_detect_enable_pin, 0);

	if (seport_plug_detect_interrupt_enabled) {
		irq = gpio_to_irq(seport_conf->plug_detect_read_pin);
		if (0 <= irq) {
			disable_irq_wake(irq);
			free_irq(irq, data);
			seport_plug_detect_interrupt_enabled = 0;
		} else {
			printk(KERN_CRIT "%s - Failed to disable plug detect" \
			       "interrupt. GPIO (%d) does not exist\n",
			       __func__, seport_conf->plug_detect_read_pin);
		}
	}
}
开发者ID:10x-Amin,项目名称:nAa-kernel,代码行数:19,代码来源:semc_seport_platform.c


示例4: st_rc_resume

static int st_rc_resume(struct device *dev)
{
	struct st_rc_device *rc_dev = dev_get_drvdata(dev);
	struct rc_dev	*rdev = rc_dev->rdev;

	if (rc_dev->irq_wake) {
		disable_irq_wake(rc_dev->irq);
		rc_dev->irq_wake = 0;
	} else {
		pinctrl_pm_select_default_state(dev);
		st_rc_hardware_init(rc_dev);
		if (rdev->users) {
			writel(IRB_RX_INTS, rc_dev->rx_base + IRB_RX_INT_EN);
			writel(0x01, rc_dev->rx_base + IRB_RX_EN);
		}
	}

	return 0;
}
开发者ID:SantoshShilimkar,项目名称:linux,代码行数:19,代码来源:st_rc.c


示例5: gp2a_prox_work_func

static void gp2a_prox_work_func(struct work_struct *work)
{
    struct gp2a_data *gp2a = container_of(work,
                                          struct gp2a_data, work_prox);
    u8 vo, value;
    if (gp2a->irq != 0) {
        disable_irq_wake(gp2a->irq);
        disable_irq(gp2a->irq);
    } else {
        return ;
    }

    gp2a_i2c_read(gp2a, REGS_PROX, &vo);
    vo = 0x01 & vo;
    if (vo == gp2a->val_state) {
        if (!vo) {	/* close */
            vo = 0x01;
            value = nondetect;
        } else {	/* far */
            vo = 0x00;
            value = detect;
        }
        gp2a_i2c_write(gp2a, REGS_HYS, &value);
        gp2a->val_state = vo;
    }

    input_report_abs(gp2a->proximity_input_dev,
                     ABS_DISTANCE,
                     gp2a->val_state);
    input_sync(gp2a->proximity_input_dev);
    /* 1 : far, 0 : close */
    pr_info("%s: %d(1:far/0:close)\n", __func__, gp2a->val_state);
    msleep(20);

    value = 0x18;
    gp2a_i2c_write(gp2a, REGS_CON, &value);
    if (gp2a->irq != 0) {
        enable_irq(gp2a->irq);
        enable_irq_wake(gp2a->irq);
    }
    value = 0x00;
    gp2a_i2c_write(gp2a, REGS_CON, &value);
}
开发者ID:TeamBliss-Devices,项目名称:android_kernel_samsung_golden,代码行数:43,代码来源:gp2a.c


示例6: pmic8xxx_kp_resume

static int pmic8xxx_kp_resume(struct device *dev)
{
	struct platform_device *pdev = to_platform_device(dev);
	struct pmic8xxx_kp *kp = platform_get_drvdata(pdev);
	struct input_dev *input_dev = kp->input;

	if (device_may_wakeup(dev)) {
		disable_irq_wake(kp->key_sense_irq);
	} else {
		mutex_lock(&input_dev->mutex);

		if (input_dev->users)
			pmic8xxx_kp_enable(kp);

		mutex_unlock(&input_dev->mutex);
	}

	return 0;
}
开发者ID:3null,项目名称:linux,代码行数:19,代码来源:pmic8xxx-keypad.c


示例7: tegra_rtc_resume

static int tegra_rtc_resume(struct platform_device *pdev)
{
    struct device *dev=&pdev->dev;
    //unsigned long sl_irq_flags;
    unsigned int intr_status;

    /* clear */
    intr_status = tegra_rtc_read(RTC_TEGRA_REG_INTR_STATUS);
    if (intr_status & RTC_TEGRA_INTR_STATUS_SEC_ALARM0) {
        tegra_rtc_write_not_busy(dev, RTC_TEGRA_REG_INTR_MASK, 0);
        tegra_rtc_write_not_busy(dev, RTC_TEGRA_REG_INTR_STATUS, -1);
    }

    dev_vdbg(dev, "Resume (device_may_wakeup=%d)\n", device_may_wakeup(dev));
    /* alarms were left on as a wake source, turn them off. */
    if (device_may_wakeup(dev))
        disable_irq_wake(tegra_rtc_irq);
    return 0;
}
开发者ID:sechrist,项目名称:gtab-2632,代码行数:19,代码来源:rtc-tegra.c


示例8: cmos_resume

static int cmos_resume(struct device *dev)
{
	struct cmos_rtc	*cmos = dev_get_drvdata(dev);
	unsigned char	tmp = cmos->suspend_ctrl;

	/* re-enable any irqs previously active */
	if (tmp & RTC_IRQMASK) {
		unsigned char	mask;

		if (cmos->enabled_wake) {
			if (cmos->wake_off)
				cmos->wake_off(dev);
			else
				disable_irq_wake(cmos->irq);
			cmos->enabled_wake = 0;
		}

		spin_lock_irq(&rtc_lock);
		do {
			CMOS_WRITE(tmp, RTC_CONTROL);
			hpet_set_rtc_irq_bit(tmp & RTC_IRQMASK);

			mask = CMOS_READ(RTC_INTR_FLAGS);
			mask &= (tmp & RTC_IRQMASK) | RTC_IRQF;
			if (!is_hpet_enabled() || !is_intr(mask))
				break;

			/* force one-shot behavior if HPET blocked
			 * the wake alarm's irq
			 */
			rtc_update_irq(cmos->rtc, 1, mask);
			tmp &= ~RTC_AIE;
			hpet_mask_rtc_irq_bit(RTC_AIE);
		} while (mask & RTC_AIE);
		spin_unlock_irq(&rtc_lock);
	}

	pr_debug("%s: resume, ctrl %02x\n",
			dev_name(&cmos_rtc.rtc->dev),
			tmp);

	return 0;
}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:43,代码来源:rtc-cmos.c


示例9: xgene_rtc_resume

static int xgene_rtc_resume(struct device *dev)
{
	struct platform_device *pdev = to_platform_device(dev);
	struct xgene_rtc_dev *pdata = platform_get_drvdata(pdev);
	int irq;

	irq = platform_get_irq(pdev, 0);
	if (device_may_wakeup(&pdev->dev)) {
		if (pdata->irq_wake) {
			disable_irq_wake(irq);
			pdata->irq_wake = 0;
		}
	} else {
		clk_enable(pdata->clk);
		xgene_rtc_alarm_irq_enable(dev, 1);
	}

	return 0;
}
开发者ID:mikuhatsune001,项目名称:linux2.6.32,代码行数:19,代码来源:rtc-xgene.c


示例10: capts_resume

int capts_resume(struct device *dev)
{
    struct capts *ts = dev_get_drvdata(dev);
    if(ts->pdata->power_on)
		ts->pdata->power_on();
    spin_lock_irq(&ts->lock);

    ts->is_suspended = 0;
    if (ts->irq) {
        enable_irq(ts->irq);
        if (device_may_wakeup(dev)) {
            disable_irq_wake(ts->irq);
        }
    }

    spin_unlock_irq(&ts->lock);
    
    return 0;
}
开发者ID:32743069,项目名称:amlogic_common_3050,代码行数:19,代码来源:capts.c


示例11: gpio_keys_resume

static int gpio_keys_resume(struct device *dev)
{
	struct platform_device *pdev = to_platform_device(dev);
	struct gpio_keys_drvdata *ddata = dev_get_drvdata(dev);
	struct gpio_keys_platform_data *pdata = pdev->dev.platform_data;
	int wakeup_key = KEY_RESERVED;
	int i;

	if (pdata && pdata->wakeup_key)
		wakeup_key = pdata->wakeup_key();
		
	for (i = 0; i < ddata->n_buttons; i++) {
		struct gpio_button_data *bdata = &ddata->data[i];

#ifdef CONFIG_MACH_BOSE_ATT		
		if (bdata->button->wakeup && device_may_wakeup(dev)) {
			disable_irq_wake(bdata->irq);
			if (wakeup_key == bdata->button->code) {

				if (gpio_powerkey_resume == 2) {
					unsigned int type = bdata->button->type ?: EV_KEY;
					input_event(ddata->input, type, bdata->button->code, 1);
					input_event(ddata->input, type, bdata->button->code, 0);
					input_sync(ddata->input);
					printk(KERN_DEBUG
						"[KEY] %s code : %d\n",
						__func__, bdata->button->code);
				} else if (gpio_powerkey_resume == 1) {
					printk(KERN_DEBUG
						"[KEY] %s do not report fake key\n",
						__func__);
				} else {
					gpio_powerkey_resume_error = true;
					unsigned int type = bdata->button->type ?: EV_KEY;
					input_event(ddata->input, type, bdata->button->code, 1);
					input_event(ddata->input, type, bdata->button->code, 0);
					input_sync(ddata->input);
					printk(KERN_DEBUG
						"[KEY] %s code : %d(%d)\n",
						__func__, bdata->button->code,
						gpio_powerkey_resume);
				}
			}
开发者ID:mapleshadow,项目名称:kernel-olympus-3.1,代码行数:43,代码来源:gpio_keys.c


示例12: smb347_remove

static int smb347_remove(struct i2c_client *client)
{
	struct smb347_charger *smb = i2c_get_clientdata(client);

	if (!IS_ERR_OR_NULL(smb->dentry))
		debugfs_remove(smb->dentry);

	if (client->irq) {
		smb347_irq_disable(smb);
		disable_irq_wake(client->irq);
		free_irq(client->irq, smb);
		gpio_free(smb->pdata->irq_gpio);
	}

	power_supply_unregister(&smb->battery);
	power_supply_unregister(&smb->usb);
	power_supply_unregister(&smb->mains);
	return 0;
}
开发者ID:ASAZING,项目名称:Android-Kernel-Gt-s7390l,代码行数:19,代码来源:smb347-charger.c


示例13: forced_to_download_binary

int forced_to_download_binary(struct ssp_data *data, int iBinType)
{
	int iRet = 0;

	ssp_dbg("[SSP]: %s - mcu binany update!\n", __func__);

	if (data->bSspShutdown == false) {
		data->bSspShutdown = true;
		disable_irq_wake(data->iIrq);
		disable_irq(data->iIrq);
	}

	iRet = update_mcu_bin(data, iBinType);
	if (iRet < 0) {
		iRet = ERROR;
		ssp_dbg("[SSP]: %s - update_mcu_bin failed!\n", __func__);
		goto out;
	}

	iRet = initialize_mcu(data);
	if (iRet < 0) {
		iRet = ERROR;
		ssp_dbg("[SSP]: %s - initialize_mcu failed!\n", __func__);
		goto out;
	}

	sync_sensor_state(data);

#ifdef CONFIG_SENSORS_SSP_SENSORHUB
	ssp_sensorhub_report_notice(data, MSG2SSP_AP_STATUS_RESET);
#endif

	if (data->bSspShutdown == true) {
		data->bSspShutdown = false;
		enable_irq(data->iIrq);
		enable_irq_wake(data->iIrq);
	}

	iRet = SUCCESS;
out:
	return iRet;
}
开发者ID:NoDEAL,项目名称:Dokdo-Leak-Kernel,代码行数:42,代码来源:ssp_firmware.c


示例14: s3c2410_rtc_setalarm

static int s3c2410_rtc_setalarm(struct rtc_wkalrm *alrm)
{
	struct rtc_time *tm = &alrm->time;
	unsigned int alrm_en;

	pr_debug("s3c2410_rtc_setalarm: %d, %02x/%02x/%02x %02x.%02x.%02x\n",
		 alrm->enabled,
		 tm->tm_mday & 0xff, tm->tm_mon & 0xff, tm->tm_year & 0xff,
		 tm->tm_hour & 0xff, tm->tm_min & 0xff, tm->tm_sec);

	if (alrm->enabled || 1) {
		alrm_en = readb(S3C2410_RTCALM) & S3C2410_RTCALM_ALMEN;
		writeb(0x00, S3C2410_RTCALM);

		if (tm->tm_sec < 60 && tm->tm_sec >= 0) {
			alrm_en |= S3C2410_RTCALM_SECEN;
			writeb(BIN2BCD(tm->tm_sec), S3C2410_ALMSEC);
		}

		if (tm->tm_min < 60 && tm->tm_min >= 0) {
			alrm_en |= S3C2410_RTCALM_MINEN;
			writeb(BIN2BCD(tm->tm_min), S3C2410_ALMMIN);
		}

		if (tm->tm_hour < 24 && tm->tm_hour >= 0) {
			alrm_en |= S3C2410_RTCALM_HOUREN;
			writeb(BIN2BCD(tm->tm_hour), S3C2410_ALMHOUR);
		}

		pr_debug("setting S3C2410_RTCALM to %08x\n", alrm_en);

		writeb(alrm_en, S3C2410_RTCALM);
		enable_irq_wake(s3c2410_rtc_alarmno);
	} else {
		alrm_en = readb(S3C2410_RTCALM);
		alrm_en &= ~S3C2410_RTCALM_ALMEN;
		writeb(alrm_en, S3C2410_RTCALM);
		disable_irq_wake(s3c2410_rtc_alarmno);
	}

	return 0;
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:42,代码来源:s3c2410-rtc.c


示例15: ehci_hsic_msm_remove

static int __devexit ehci_hsic_msm_remove(struct platform_device *pdev)
{
	struct usb_hcd *hcd = platform_get_drvdata(pdev);
	struct msm_hsic_hcd *mehci = hcd_to_hsic(hcd);

	if (mehci->peripheral_status_irq)
		free_irq(mehci->peripheral_status_irq, mehci);

	if (mehci->wakeup_irq) {
		if (mehci->wakeup_irq_enabled)
			disable_irq_wake(mehci->wakeup_irq);
		free_irq(mehci->wakeup_irq, mehci);
	}

	/*
	 * If the update request is called after unregister, the request will
	 * fail. Results are undefined if unregister is called in the middle of
	 * update request.
	 */
	mehci->bus_vote = false;
	cancel_work_sync(&mehci->bus_vote_w);

	if (mehci->bus_perf_client)
		msm_bus_scale_unregister_client(mehci->bus_perf_client);

	ehci_hsic_msm_debugfs_cleanup();
	device_init_wakeup(&pdev->dev, 0);
	pm_runtime_set_suspended(&pdev->dev);

	destroy_workqueue(ehci_wq);

	usb_remove_hcd(hcd);
	msm_hsic_config_gpios(mehci, 0);
	msm_hsic_init_vddcx(mehci, 0);

	msm_hsic_init_clocks(mehci, 0);
	wake_lock_destroy(&mehci->wlock);
	iounmap(hcd->regs);
	usb_put_hcd(hcd);

	return 0;
}
开发者ID:x942,项目名称:GuardianKernel-Mako,代码行数:42,代码来源:ehci-msm-hsic.c


示例16: tegra_sdhci_resume

static int tegra_sdhci_resume(struct platform_device *pdev)
{
	struct tegra_sdhci_host *host = platform_get_drvdata(pdev);
	int ret;
	u8 pwr;

	MMC_printk("%s:+", mmc_hostname(host->sdhci->mmc));

	if ((host->card_always_on && is_card_sdio(host->sdhci->mmc->card))||is_card_mmc(host->sdhci->mmc->card)) {
		int ret = 0;

		if (device_may_wakeup(&pdev->dev)) {
		        disable_irq_wake(host->sdhci->irq);
		}

		/* soft reset SD host controller and enable interrupts */
		ret = tegra_sdhci_restore(host->sdhci);
		if (ret) {
			pr_err("%s: failed, error = %d\n", __func__, ret);
			return ret;
		}

		mmiowb();
		host->sdhci->mmc->ops->set_ios(host->sdhci->mmc,
			&host->sdhci->mmc->ios);
		 printk("tegra_sdhci_suspend: skip %s resume(always on)!\n",is_card_mmc(host->sdhci->mmc->card)?"eMMC":"SDIO");
		return 0;
	}

	tegra_sdhci_enable_clock(host, 1);

	pwr = SDHCI_POWER_ON;
	sdhci_writeb(host->sdhci, pwr, SDHCI_POWER_CONTROL);
	host->sdhci->pwr = 0;

	ret = sdhci_resume_host(host->sdhci);
	if (ret)
		pr_err("%s: failed, error = %d\n", __func__, ret);

	MMC_printk("%s:-", mmc_hostname(host->sdhci->mmc));
	return ret;
}
开发者ID:m4ttyw,项目名称:linux_kernel_TF101,代码行数:42,代码来源:sdhci-tegra.c


示例17: max77804_resume

static int max77804_resume(struct device *dev)
{
    struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
    struct max77804_dev *max77804 = i2c_get_clientdata(i2c);

#if !defined(CONFIG_SAMSUNG_PRODUCT_SHIP)
    pr_info("%s:%s\n", MFD_DEV_NAME, __func__);
#endif /* CONFIG_SAMSUNG_PRODUCT_SHIP */

    if (device_may_wakeup(dev))
        disable_irq_wake(max77804->irq);

    enable_irq(max77804->irq);

#if defined(CONFIG_MFD_MAX77804)
    return max77804_irq_resume(max77804);
#elif defined(CONFIG_MFD_MAX77804K)
    return max77804k_irq_resume(max77804);
#endif
}
开发者ID:BigBot96,项目名称:android_kernel_samsung_gts2wifi,代码行数:20,代码来源:max77804.c


示例18: msm_hsic_pm_suspend

static int msm_hsic_pm_suspend(struct device *dev)
{
	int ret;
	struct usb_hcd *hcd = dev_get_drvdata(dev);
	struct msm_hsic_hcd *mehci = hcd_to_hsic(hcd);

	dev_dbg(dev, "ehci-msm-hsic PM suspend\n");

	dbg_log_event(NULL, "PM Suspend", 0);

	if (device_may_wakeup(dev))
		enable_irq_wake(hcd->irq);

	ret = msm_hsic_suspend(mehci);

	if (ret && device_may_wakeup(dev))
		disable_irq_wake(hcd->irq);

	return ret;
}
开发者ID:x942,项目名称:GuardianKernel-Mako,代码行数:20,代码来源:ehci-msm-hsic.c


示例19: s3c_rtc_resume

static int s3c_rtc_resume(struct platform_device *pdev)
{
	unsigned int tmp;

	clk_enable(rtc_clk);
	s3c_rtc_enable(pdev, 1);
	writeb(ticnt_save, s3c_rtc_base + S3C2410_TICNT);
	if (s3c_rtc_cpu_type == TYPE_S3C64XX && ticnt_en_save) {
		tmp = readw(s3c_rtc_base + S3C2410_RTCCON);
		writew(tmp | ticnt_en_save, s3c_rtc_base + S3C2410_RTCCON);
	}

	if (device_may_wakeup(&pdev->dev) && wake_en) {
		disable_irq_wake(s3c_rtc_alarmno);
		wake_en = false;
	}
	clk_disable(rtc_clk);

	return 0;
}
开发者ID:DirtyDroidX,项目名称:android_kernel_htc_m8ul,代码行数:20,代码来源:rtc-s3c.c


示例20: msm_serial_hsl_resume

static int msm_serial_hsl_resume(struct device *dev)
{
	struct platform_device *pdev = to_platform_device(dev);
	struct uart_port *port;
	port = get_port_from_line(pdev->id);

	D("%s ():port->line %d, ir\n", __func__, port->line);
	if (port) {
		D("%s ():uart_resume_port:port->line %d, ir\n", __func__, port->line);
		enable_irda(3);
		uart_resume_port(&msm_hsl_uart_driver, port);
		if (device_may_wakeup(dev))
			disable_irq_wake(port->irq);

		if (is_console(port))
			msm_hsl_init_clock(port);
	}

	return 0;
}
开发者ID:happyhere,项目名称:802Xtreem,代码行数:20,代码来源:msm_serial_hs_irda_lite.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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