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


C++ disable_irq_wake函数代码示例

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


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


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