您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ usecs_to_jiffies函数代码示例

51自学网 2021-06-03 09:22:43
  C++
这篇教程C++ usecs_to_jiffies函数代码示例写得很实用,希望能帮到您。

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

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

示例1: tmu_irq

static irqreturn_t tmu_irq(int irq, void *id){	struct tmu_info *info = id;	unsigned int status;	disable_irq_nosync(irq);	status = __raw_readl(info->tmu_base + INTSTAT);	if (status & INTSTAT_RISE0) {		pr_info("Throttling interrupt occured!!!!/n");		__raw_writel(INTCLEAR_RISE0, info->tmu_base + INTCLEAR);		info->tmu_state = TMU_STATUS_THROTTLED;		queue_delayed_work_on(0, tmu_monitor_wq,				&info->polling, usecs_to_jiffies(500 * 1000));	} else if (status & INTSTAT_RISE1) {		pr_info("Warning interrupt occured!!!!/n");		__raw_writel(INTCLEAR_RISE1, info->tmu_base + INTCLEAR);		info->tmu_state = TMU_STATUS_WARNING;		queue_delayed_work_on(0, tmu_monitor_wq,				&info->polling, usecs_to_jiffies(500 * 1000));	} else if (status & INTSTAT_RISE2) {		pr_info("Tripping interrupt occured!!!!/n");		info->tmu_state = TMU_STATUS_TRIPPED;		__raw_writel(INTCLEAR_RISE2, info->tmu_base + INTCLEAR);		tmu_tripped_cb();	} else {		pr_err("%s: TMU interrupt error/n", __func__);		return -ENODEV;	}	return IRQ_HANDLED;}
开发者ID:0x7678,项目名称:SJKernel-gn2,代码行数:33,


示例2: cpufreq_interactive_timer_resched

static void cpufreq_interactive_timer_resched(	struct cpufreq_interactive_cpuinfo *pcpu){	struct cpufreq_interactive_tunables *tunables =		pcpu->policy->governor_data;	unsigned long expires;	unsigned long flags;	spin_lock_irqsave(&pcpu->load_lock, flags);	pcpu->time_in_idle =		get_cpu_idle_time(smp_processor_id(),				  &pcpu->time_in_idle_timestamp,				  tunables->io_is_busy);	pcpu->cputime_speedadj = 0;	pcpu->cputime_speedadj_timestamp = pcpu->time_in_idle_timestamp;	expires = jiffies + usecs_to_jiffies(tunables->timer_rate);	mod_timer_pinned(&pcpu->cpu_timer, expires);	if (tunables->timer_slack_val >= 0 &&	    pcpu->target_freq > pcpu->policy->min) {		expires += usecs_to_jiffies(tunables->timer_slack_val);		mod_timer_pinned(&pcpu->cpu_slack_timer, expires);	}	spin_unlock_irqrestore(&pcpu->load_lock, flags);}
开发者ID:PatrikKT,项目名称:android_kernel_htc_a11ul,代码行数:26,


示例3: cpufreq_interactive_timer_start

/* The caller shall take enable_sem write semaphore to avoid any timer race. * The cpu_timer and cpu_slack_timer must be deactivated when calling this * function. */static void cpufreq_interactive_timer_start(int cpu){	struct cpufreq_interactive_cpuinfo *pcpu = &per_cpu(cpuinfo, cpu);	unsigned long expires = jiffies +		usecs_to_jiffies(pcpu->timer_rate);	unsigned long flags;	u64 now = ktime_to_us(ktime_get());	pcpu->cpu_timer.expires = expires;	add_timer_on(&pcpu->cpu_timer, cpu);	if (pcpu->timer_slack_val >= 0 &&	    (pcpu->target_freq > pcpu->policy->min ||		(pcpu->target_freq == pcpu->policy->min &&		 now < boostpulse_endtime))) {		expires += usecs_to_jiffies(pcpu->timer_slack_val);		pcpu->cpu_slack_timer.expires = expires;		add_timer_on(&pcpu->cpu_slack_timer, cpu);	}	spin_lock_irqsave(&pcpu->load_lock, flags);	pcpu->time_in_idle =		get_cpu_idle_time(cpu, &pcpu->time_in_idle_timestamp);	pcpu->cputime_speedadj = 0;	pcpu->cputime_speedadj_timestamp = pcpu->time_in_idle_timestamp;	spin_unlock_irqrestore(&pcpu->load_lock, flags);}
开发者ID:hastalafiesta,项目名称:Samsung_STE_Kernel,代码行数:30,


示例4: cpufreq_interactive_timer_resched

static void cpufreq_interactive_timer_resched(	struct cpufreq_interactive_cpuinfo *pcpu){	unsigned long expires;	unsigned long flags;	u64 now = ktime_to_us(ktime_get());	spin_lock_irqsave(&pcpu->load_lock, flags);	pcpu->time_in_idle =		get_cpu_idle_time(smp_processor_id(),				     &pcpu->time_in_idle_timestamp);	pcpu->cputime_speedadj = 0;	pcpu->cputime_speedadj_timestamp = pcpu->time_in_idle_timestamp;	expires = jiffies + usecs_to_jiffies(pcpu->timer_rate);	mod_timer_pinned(&pcpu->cpu_timer, expires);	if (pcpu->timer_slack_val >= 0 &&	    (pcpu->target_freq > pcpu->policy->min ||		(pcpu->target_freq == pcpu->policy->min &&		 now < boostpulse_endtime))) {		expires += usecs_to_jiffies(pcpu->timer_slack_val);		mod_timer_pinned(&pcpu->cpu_slack_timer, expires);	}	spin_unlock_irqrestore(&pcpu->load_lock, flags);}
开发者ID:hastalafiesta,项目名称:Samsung_STE_Kernel,代码行数:26,


示例5: cpufreq_interactive_timer_start

/* The caller shall take enable_sem write semaphore to avoid any timer race. * The cpu_timer and cpu_slack_timer must be deactivated when calling this * function. */static void cpufreq_interactive_timer_start(int cpu, int time_override){	struct cpufreq_interactive_cpuinfo *pcpu = &per_cpu(cpuinfo, cpu);	unsigned long flags;	unsigned long expires;	if (time_override)		expires = jiffies + time_override;	else		expires = jiffies + usecs_to_jiffies(timer_rate);	pcpu->cpu_timer.expires = expires;	add_timer_on(&pcpu->cpu_timer, cpu);	if (timer_slack_val >= 0 && pcpu->target_freq > pcpu->policy->min) {		expires += usecs_to_jiffies(timer_slack_val);		pcpu->cpu_slack_timer.expires = expires;		add_timer_on(&pcpu->cpu_slack_timer, cpu);	}	spin_lock_irqsave(&pcpu->load_lock, flags);	pcpu->time_in_idle =		get_cpu_idle_time(cpu, &pcpu->time_in_idle_timestamp, io_is_busy);	pcpu->cputime_speedadj = 0;	pcpu->cputime_speedadj_timestamp = pcpu->time_in_idle_timestamp;	spin_unlock_irqrestore(&pcpu->load_lock, flags);}
开发者ID:MattCrystal,项目名称:tripping-wookie,代码行数:29,


示例6: rmnet_cause_wakeup

/* Returns 1 if packet caused rmnet to wakeup, 0 otherwise. */static int rmnet_cause_wakeup(struct rmnet_private *p) {	int ret = 0;	ktime_t now;	if (p->timeout_us == 0) /* Check if disabled */		return 0;	/* Start timer on a wakeup packet */	if (p->active_countdown == 0) {		ret = 1;		now = ktime_get_real();		p->last_packet = now;		if (in_suspend)			queue_delayed_work(rmnet_wq, &p->work,					usecs_to_jiffies(p->timeout_us));		else			queue_delayed_work(rmnet_wq, &p->work,					usecs_to_jiffies(POLL_DELAY));	}	if (in_suspend)		p->active_countdown++;	else		p->active_countdown = p->timeout_us / POLL_DELAY;	return ret;}
开发者ID:AKToronto,项目名称:htc-kernel-msm7227,代码行数:27,


示例7: set_temperature_params

static void set_temperature_params(struct s5p_tmu_info *info){#ifdef CONFIG_TMU_DEBUG	struct s5p_platform_tmu *data = info->dev->platform_data;	if (tmu_test_on) {		/* In the tmu_test mode, change temperature_params value		 * input data.		*/		data->ts.stop_1st_throttle = in.stop_1st_throttle;		data->ts.start_1st_throttle = in.start_1st_throttle;		data->ts.stop_2nd_throttle = in.stop_2nd_throttle;		data->ts.start_2nd_throttle = in.start_2nd_throttle;		data->ts.start_tripping = in.start_tripping;		data->ts.start_emergency = in.start_emergency;		data->ts.stop_mem_throttle = in.start_mem_throttle - 5;		data->ts.start_mem_throttle = in.start_mem_throttle;	}	if (tmu_limit_on) {		info->cpufreq_level_1st_throttle = freq_limit_1st_throttle;		info->cpufreq_level_2nd_throttle = freq_limit_2nd_throttle;	}	if (set_sampling_rate) {		info->sampling_rate =			usecs_to_jiffies(set_sampling_rate * 1000);		info->monitor_period =			usecs_to_jiffies(set_sampling_rate * 10 * 1000);	}#endif	print_temperature_params(info);}
开发者ID:moguriso,项目名称:isw11sc-kernel,代码行数:31,


示例8: si4713_send_command

/* * si4713_send_command - sends a command to si4713 and waits its response * @sdev: si4713_device structure for the device we are communicating * @command: command id * @args: command arguments we are sending (up to 7) * @argn: actual size of @args * @response: buffer to place the expected response from the device (up to 15) * @respn: actual size of @response * @usecs: amount of time to wait before reading the response (in usecs) */static int si4713_send_command(struct si4713_device *sdev, const u8 command,				const u8 args[], const int argn,				u8 response[], const int respn, const int usecs){	struct i2c_client *client = v4l2_get_subdevdata(&sdev->sd);	unsigned long until_jiffies;	u8 data1[MAX_ARGS + 1];	int err;	if (!client->adapter)		return -ENODEV;	/* First send the command and its arguments */	data1[0] = command;	memcpy(data1 + 1, args, argn);	DBG_BUFFER(&sdev->sd, "Parameters", data1, argn + 1);	err = i2c_master_send(client, data1, argn + 1);	if (err != argn + 1) {		v4l2_err(&sdev->sd, "Error while sending command 0x%02x/n",			command);		return err < 0 ? err : -EIO;	}	until_jiffies = jiffies + usecs_to_jiffies(usecs) + 1;	/* Wait response from interrupt */	if (client->irq) {		if (!wait_for_completion_timeout(&sdev->work,				usecs_to_jiffies(usecs) + 1))			v4l2_warn(&sdev->sd,				"(%s) Device took too much time to answer./n",				__func__);	}	do {		err = i2c_master_recv(client, response, respn);		if (err != respn) {			v4l2_err(&sdev->sd,				"Error %d while reading response for command 0x%02x/n",				err, command);			return err < 0 ? err : -EIO;		}		DBG_BUFFER(&sdev->sd, "Response", response, respn);		if (!check_command_failed(response[0]))			return 0;		if (client->irq)			return -EBUSY;		if (usecs <= 1000)			usleep_range(usecs, 1000);		else			usleep_range(1000, 2000);	} while (time_is_after_jiffies(until_jiffies));	return -EBUSY;}
开发者ID:forgivemyheart,项目名称:linux,代码行数:68,


示例9: hpios_delay_micro_seconds

void hpios_delay_micro_seconds(u32 num_micro_sec){	if ((usecs_to_jiffies(num_micro_sec) > 1) && !in_interrupt()) {		/* MUST NOT SCHEDULE IN INTERRUPT CONTEXT! */		schedule_timeout_uninterruptible(usecs_to_jiffies			(num_micro_sec));	} else if (num_micro_sec <= 2000)		udelay(num_micro_sec);	else		mdelay(num_micro_sec / 1000);}
开发者ID:CSCLOG,项目名称:beaglebone,代码行数:12,


示例10: timeriomem_rng_probe

static int __init timeriomem_rng_probe(struct platform_device *pdev){	struct resource *res, *mem;	int ret;	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);	if (!res)		return -ENOENT;	mem = request_mem_region(res->start, res->end - res->start + 1,				 pdev->name);	if (mem == NULL)		return -EBUSY;	dev_set_drvdata(&pdev->dev, mem);	timeriomem_rng_data = pdev->dev.platform_data;	timeriomem_rng_data->address = ioremap(res->start,						res->end - res->start + 1);	if (!timeriomem_rng_data->address) {		ret = -ENOMEM;		goto err_ioremap;	}	if (timeriomem_rng_data->period != 0		&& usecs_to_jiffies(timeriomem_rng_data->period) > 0) {		timeriomem_rng_timer.expires = jiffies;		timeriomem_rng_ops.priv = usecs_to_jiffies(						timeriomem_rng_data->period);	}	timeriomem_rng_data->present = 1;	ret = hwrng_register(&timeriomem_rng_ops);	if (ret)		goto err_register;	dev_info(&pdev->dev, "32bits from 0x%p @ %dus/n",			timeriomem_rng_data->address,			timeriomem_rng_data->period);	return 0;err_register:	dev_err(&pdev->dev, "problem registering/n");	iounmap(timeriomem_rng_data->address);err_ioremap:	release_resource(mem);	return ret;}
开发者ID:ClarkChen633,项目名称:rtl819x-toolchain,代码行数:53,


示例11: HpiOs_DelayMicroSeconds

void HpiOs_DelayMicroSeconds(	uint32_t dwNumMicroSec){	if ((usecs_to_jiffies(dwNumMicroSec) > 1) && !in_interrupt()) {		/* MUST NOT SCHEDULE IN INTERRUPT CONTEXT! */		schedule_timeout_uninterruptible(usecs_to_jiffies			(dwNumMicroSec));	} else if (dwNumMicroSec <= 2000)		udelay(dwNumMicroSec);	else		mdelay(dwNumMicroSec / 1000);}
开发者ID:canalplus,项目名称:r7oss,代码行数:14,


示例12: msm8625_release_secondary

static int  __cpuinit msm8625_release_secondary(unsigned int cpu){	void __iomem *base_ptr;	int value = 0;	unsigned long timeout;	timeout = jiffies + usecs_to_jiffies(20);	while (time_before(jiffies, timeout)) {		value = __raw_readl(MSM_CFG_CTL_BASE + cpu_data[cpu].offset);				if ((value & MSM_CORE_STATUS_MSK) ==				MSM_CORE_STATUS_MSK)			break;			udelay(1);	}	if (!value) {		pr_err("Core %u cannot be brought out of Reset!!!/n", cpu);		return -ENODEV;	}	base_ptr = ioremap_nocache(CORE_RESET_BASE + cpu_data[cpu].reset_off, SZ_4);		if (!base_ptr)		return -ENODEV;		__raw_writel(0x0, base_ptr);	mb();	cpu_data[cpu].reset_core_base = base_ptr;	return 0;}
开发者ID:MardonHH,项目名称:kernel_3.4_pico,代码行数:31,


示例13: iadc_do_conversion

static int iadc_do_conversion(struct iadc_chip *iadc, int chan, u16 *data){	unsigned int wait;	int ret;	ret = iadc_configure(iadc, chan);	if (ret < 0)		goto exit;	wait = BIT(IADC_DEF_AVG_SAMPLES) * IADC_CONV_TIME_MIN_US * 2;	if (iadc->poll_eoc) {		ret = iadc_poll_wait_eoc(iadc, wait);	} else {		ret = wait_for_completion_timeout(&iadc->complete,			usecs_to_jiffies(wait));		if (!ret)			ret = -ETIMEDOUT;		else			/* double check conversion status */			ret = iadc_poll_wait_eoc(iadc, IADC_CONV_TIME_MIN_US);	}	if (!ret)		ret = iadc_read_result(iadc, data);exit:	iadc_set_state(iadc, false);	if (ret < 0)		dev_err(iadc->dev, "conversion failed/n");	return ret;}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:32,


示例14: cpufreq_interactive_timer_resched

static void cpufreq_interactive_timer_resched(unsigned long cpu){	struct cpufreq_interactive_cpuinfo *pcpu = &per_cpu(cpuinfo, cpu);	u64 expires;	unsigned long flags;	u64 now = ktime_to_us(ktime_get());	spin_lock_irqsave(&pcpu->load_lock, flags);	pcpu->time_in_idle =		get_cpu_idle_time(smp_processor_id(),				     &pcpu->time_in_idle_timestamp, io_is_busy);	pcpu->cputime_speedadj = 0;	pcpu->cputime_speedadj_timestamp = pcpu->time_in_idle_timestamp;	expires = round_to_nw_start(pcpu->last_evaluated_jiffy);	del_timer(&pcpu->cpu_timer);	pcpu->cpu_timer.expires = expires;	add_timer_on(&pcpu->cpu_timer, cpu);	if (timer_slack_val >= 0 &&	    (pcpu->target_freq > pcpu->policy->min ||		(pcpu->target_freq == pcpu->policy->min &&		 now < boostpulse_endtime))) {		expires += usecs_to_jiffies(timer_slack_val);		del_timer(&pcpu->cpu_slack_timer);		pcpu->cpu_slack_timer.expires = expires;		add_timer_on(&pcpu->cpu_slack_timer, cpu);	}	spin_unlock_irqrestore(&pcpu->load_lock, flags);}
开发者ID:Tkkg1994,项目名称:StockKernel,代码行数:30,


示例15: set_low_bus_freq

/* * Set the DDR, AHB to 24MHz. * This mode will be activated only when none of the modules that * need a higher DDR or AHB frequency are active. */int set_low_bus_freq(void){	if (busfreq_suspended)		return 0;	if (!bus_freq_scaling_initialized || !bus_freq_scaling_is_active)		return 0;	/*	 * Check to see if we need to got from	 * low bus freq mode to audio bus freq mode.	 * If so, the change needs to be done immediately.	 */	if (audio_bus_count && (low_bus_freq_mode || ultra_low_bus_freq_mode))		reduce_bus_freq();	else		/*		 * Don't lower the frequency immediately. Instead		 * scheduled a delayed work and drop the freq if		 * the conditions still remain the same.		 */		schedule_delayed_work(&low_bus_freq_handler,					usecs_to_jiffies(3000000));	return 0;}
开发者ID:gvdglind,项目名称:Pluto_UbuntuBuild,代码行数:30,


示例16: msm_ulpi_write

static int msm_ulpi_write(struct msm_hcd *mhcd, u32 val, u32 reg){	struct usb_hcd *hcd = mhcd_to_hcd(mhcd);	unsigned long timeout;	/* initiate write operation */	writel_relaxed(ULPI_RUN | ULPI_WRITE |	       ULPI_ADDR(reg) | ULPI_DATA(val),	       USB_ULPI_VIEWPORT);	/* wait for completion */	timeout = jiffies + usecs_to_jiffies(ULPI_IO_TIMEOUT_USECS);	while (readl_relaxed(USB_ULPI_VIEWPORT) & ULPI_RUN) {		if (time_after(jiffies, timeout)) {			dev_err(mhcd->dev, "msm_ulpi_write: timeout/n");			dev_err(mhcd->dev, "PORTSC: %08x USBCMD: %08x/n",				readl_relaxed(USB_PORTSC),				readl_relaxed(USB_USBCMD));			return -ETIMEDOUT;		}		udelay(1);	}	return 0;}
开发者ID:Runner85sx,项目名称:android_kernel_huawei_msm8909,代码行数:25,


示例17: tcp_westwood_pkts_acked

/* * @westwood_pkts_acked * Called after processing group of packets. * but all westwood needs is the last sample of srtt. */static void tcp_westwood_pkts_acked(struct sock *sk, u32 cnt, s32 rtt){	struct westwood *w = inet_csk_ca(sk);	if (rtt > 0)		w->rtt = usecs_to_jiffies(rtt);}
开发者ID:12rafael,项目名称:jellytimekernel,代码行数:12,


示例18: serial_omap_start_rxdma

static void serial_omap_start_rxdma(struct uart_omap_port *up){#ifdef CONFIG_OMAP3_PM	/* Disallow OCP bus idle. UART TX irqs are not seen during	 * bus idle. Alternative is to set kernel timer at fifo	 * drain rate.	 */	unsigned int tmp;	tmp = (serial_in(up, UART_OMAP_SYSC) & 0x7) | (1 << 3);	serial_out(up, UART_OMAP_SYSC, tmp); /* no-idle */#endif	if (up->uart_dma.rx_dma_channel == 0xFF) {		omap_request_dma(uart_dma_rx[up->pdev->id-1],"UART Rx DMA",				(void *)uart_rx_dma_callback,up,				&(up->uart_dma.rx_dma_channel));		omap_set_dma_src_params(up->uart_dma.rx_dma_channel, 0,					OMAP_DMA_AMODE_CONSTANT,					UART_BASE(up->pdev->id - 1), 0, 0);		omap_set_dma_dest_params(up->uart_dma.rx_dma_channel, 0,					OMAP_DMA_AMODE_POST_INC,					up->uart_dma.rx_buf_dma_phys, 0, 0);		omap_set_dma_transfer_params(up->uart_dma.rx_dma_channel,					OMAP_DMA_DATA_TYPE_S8,					up->uart_dma.rx_buf_size, 1,					OMAP_DMA_SYNC_ELEMENT,					uart_dma_rx[up->pdev->id-1], 0);	}	up->uart_dma.prev_rx_dma_pos = up->uart_dma.rx_buf_dma_phys;	omap_writel(0, OMAP34XX_DMA4_BASE +		OMAP_DMA4_CDAC(up->uart_dma.rx_dma_channel));	omap_start_dma(up->uart_dma.rx_dma_channel);	mod_timer(&up->uart_dma.rx_timer, jiffies +			usecs_to_jiffies(up->uart_dma.rx_timeout));	up->uart_dma.rx_dma_state = 1;}
开发者ID:moko365,项目名称:moko365-devkit8000-kernel,代码行数:35,


示例19: si4713_wait_stc

/* * si4713_wait_stc - Waits STC interrupt and clears status bits. Useful *		     for TX_TUNE_POWER, TX_TUNE_FREQ and TX_TUNE_MEAS * @sdev: si4713_device structure for the device we are communicating * @usecs: timeout to wait for STC interrupt signal */static int si4713_wait_stc(struct si4713_device *sdev, const int usecs){	int err;	u8 resp[SI4713_GET_STATUS_NRESP];	/* Wait response from STC interrupt */	if (!wait_for_completion_timeout(&sdev->work,			usecs_to_jiffies(usecs) + 1))		v4l2_warn(&sdev->sd,			"%s: device took too much time to answer (%d usec)./n",				__func__, usecs);	/* Clear status bits */	err = si4713_send_command(sdev, SI4713_CMD_GET_INT_STATUS,					NULL, 0,					resp, ARRAY_SIZE(resp),					DEFAULT_TIMEOUT);	if (err < 0)		goto exit;	v4l2_dbg(1, debug, &sdev->sd,			"%s: status bits: 0x%02x/n", __func__, resp[0]);	if (!(resp[0] & SI4713_STC_INT))		err = -EIO;exit:	return err;}
开发者ID:03199618,项目名称:linux,代码行数:36,


示例20: usleep

static void usleep(unsigned int usecs){        unsigned long timeout = usecs_to_jiffies(usecs);        while (timeout)                timeout = schedule_timeout_interruptible(timeout);}
开发者ID:qwerty1023,项目名称:wive-rtnl-firmware,代码行数:7,


示例21: tmu_irq

static irqreturn_t tmu_irq(int irq, void *id){	struct tmu_info *info = id;	unsigned int status;	disable_irq_nosync(irq);	status = __raw_readl(info->tmu_base + INTSTAT);	/* To handle multiple interrupt pending,	* interrupt by high temperature are serviced with priority.	*/	if (status & INTSTAT_RISE1) {		dev_info(info->dev, "Tripping interrupt/n");		info->tmu_state = TMU_STATUS_TRIPPED;		__raw_writel(INTCLEAR_RISE1, info->tmu_base + INTCLEAR);	} else if (status & INTSTAT_RISE0) {		dev_info(info->dev, "Throttling interrupt/n");		__raw_writel(INTCLEAR_RISE0, info->tmu_base + INTCLEAR);		info->tmu_state = TMU_STATUS_THROTTLED;	} else {		dev_err(info->dev, "%s: TMU interrupt error. INTSTAT : %x/n", __func__, status);		__raw_writel(status, info->tmu_base + INTCLEAR);		return IRQ_HANDLED;	}	queue_delayed_work_on(0, tmu_monitor_wq, &info->polling, usecs_to_jiffies(0));	return IRQ_HANDLED;}
开发者ID:droidroidz,项目名称:Manta_kernel,代码行数:29,


示例22: serial_omap_start_rxdma

static int serial_omap_start_rxdma(struct uart_omap_port *up){	int ret = 0;	if (up->uart_dma.rx_dma_channel == -1) {		pm_runtime_get_sync(&up->pdev->dev);		ret = omap_request_dma(up->uart_dma.uart_dma_rx,				"UART Rx DMA",				(void *)uart_rx_dma_callback, up,				&(up->uart_dma.rx_dma_channel));		if (ret < 0)			return ret;		omap_set_dma_src_params(up->uart_dma.rx_dma_channel, 0,				OMAP_DMA_AMODE_CONSTANT,				up->uart_dma.uart_base, 0, 0);		omap_set_dma_dest_params(up->uart_dma.rx_dma_channel, 0,				OMAP_DMA_AMODE_POST_INC,				up->uart_dma.rx_buf_dma_phys, 0, 0);		omap_set_dma_transfer_params(up->uart_dma.rx_dma_channel,				OMAP_DMA_DATA_TYPE_S8,				up->uart_dma.rx_buf_size, 1,				OMAP_DMA_SYNC_ELEMENT,				up->uart_dma.uart_dma_rx, 0);	}	up->uart_dma.prev_rx_dma_pos = up->uart_dma.rx_buf_dma_phys;		omap_start_dma(up->uart_dma.rx_dma_channel);	mod_timer(&up->uart_dma.rx_timer, jiffies +				usecs_to_jiffies(up->uart_dma.rx_poll_rate));	up->uart_dma.rx_dma_used = true;	return ret;}
开发者ID:mjduddin,项目名称:B14CKB1RD_kernel_m8,代码行数:33,


示例23: cpufreq_hardlimit_resume

static void cpufreq_hardlimit_resume(struct power_suspend * h){	current_screen_state = CPUFREQ_HARDLIMIT_SCREEN_ON;	if(wakeup_kick_delay == CPUFREQ_HARDLIMIT_WAKEUP_KICK_DISABLED) {		#ifdef CPUFREQ_HARDLIMIT_DEBUG		pr_info("[HARDLIMIT] resume (no wakeup kick) : old_min = %u / old_max = %u / new_min = %u / new_max = %u /n",				current_limit_min,				current_limit_max,				hardlimit_min_screen_on,				hardlimit_max_screen_on			);		#endif		wakeup_kick_active = CPUFREQ_HARDLIMIT_WAKEUP_KICK_INACTIVE;	} else {		#ifdef CPUFREQ_HARDLIMIT_DEBUG		pr_info("[HARDLIMIT] resume (with wakeup kick) : old_min = %u / old_max = %u / new_min = %u / new_max = %u /n",				current_limit_min,				current_limit_max,				wakeup_kick_freq,				max(hardlimit_max_screen_on, min(hardlimit_max_screen_on, wakeup_kick_freq))			);		#endif		wakeup_kick_active = CPUFREQ_HARDLIMIT_WAKEUP_KICK_ACTIVE;		/* Schedule delayed work to restore stock scaling min after wakeup kick delay */		schedule_delayed_work(&stop_wakeup_kick_work, usecs_to_jiffies(wakeup_kick_delay * 1000));	}	reapply_hard_limits();	return;}
开发者ID:Hundsbuah,项目名称:KK_Xplorer-9005,代码行数:30,


示例24: round_to_nw_start

/* Round to starting jiffy of next evaluation window */static u64 round_to_nw_start(u64 jif){	unsigned long step = usecs_to_jiffies(timer_rate);	do_div(jif, step);	return (jif + 1) * step;}
开发者ID:lurepheonix,项目名称:kernel_asus_a500cg,代码行数:8,


示例25: vivid_cec_adap_transmit

static int vivid_cec_adap_transmit(struct cec_adapter *adap, u8 attempts,				   u32 signal_free_time, struct cec_msg *msg){	struct vivid_dev *dev = adap->priv;	struct vivid_cec_work *cw = kzalloc(sizeof(*cw), GFP_KERNEL);	long delta_jiffies = 0;	if (cw == NULL)		return -ENOMEM;	cw->dev = dev;	cw->adap = adap;	cw->usecs = CEC_FREE_TIME_TO_USEC(signal_free_time) +		    msg->len * USECS_PER_BYTE;	cw->msg = *msg;	spin_lock(&dev->cec_slock);	list_add(&cw->list, &dev->cec_work_list);	if (dev->cec_xfer_time_jiffies == 0) {		INIT_DELAYED_WORK(&cw->work, vivid_cec_xfer_done_worker);		dev->cec_xfer_start_jiffies = jiffies;		dev->cec_xfer_time_jiffies = usecs_to_jiffies(cw->usecs);		delta_jiffies = dev->cec_xfer_time_jiffies;	} else {		INIT_DELAYED_WORK(&cw->work, vivid_cec_xfer_try_worker);		delta_jiffies = dev->cec_xfer_start_jiffies +			dev->cec_xfer_time_jiffies - jiffies;	}	spin_unlock(&dev->cec_slock);	schedule_delayed_work(&cw->work, delta_jiffies < 0 ? 0 : delta_jiffies);	return 0;}
开发者ID:ChineseDr,项目名称:linux,代码行数:31,



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


C++ used函数代码示例
C++ useVBOs函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。