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

C++ pm_notifier函数代码示例

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

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



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

示例1: tegra_cpufreq_init

static int __init tegra_cpufreq_init(void)
{
#ifdef CONFIG_HOTPLUG_CPU
	pm_notifier(tegra_cpufreq_pm_notifier, 0);
#endif
	return cpufreq_register_driver(&s_tegra_cpufreq_driver);
}
开发者ID:BuzzBumbleBee,项目名称:android_kernel_advent_vega,代码行数:7,代码来源:cpufreq.c


示例2: nvrm_init

static int __init nvrm_init(void)
{
    int ret = 0;
    printk(KERN_INFO "%s called\n", __func__);

    #if defined(CONFIG_PM)
    // Register PM notifier.
    pm_notifier(tegra_pm_notifier, 0);
    tegra_pm_notifier_continue_ok = 0;
    init_waitqueue_head(&tegra_pm_notifier_wait);

    #if defined(CONFIG_HAS_EARLYSUSPEND)
    register_early_suspend(&tegra_display_power);
    #endif

    // Create /sys/power/nvrm/notifier.
    nvrm_kobj = kobject_create_and_add("nvrm", power_kobj);
    sysfs_create_file(nvrm_kobj, &nvrm_lp2policy_attribute.attr);
    sysfs_create_file(nvrm_kobj, &nvrm_notifier_attribute.attr);
    sys_nvrm_notifier = NULL;
    init_waitqueue_head(&sys_nvrm_notifier_wait);
    #endif

    // Register NvRm platform driver.
    ret = platform_driver_register(&nvrm_driver);

    return ret;
}
开发者ID:Atrix-Dev-Team,项目名称:kernel-moto-atrix4g,代码行数:28,代码来源:nvrm_user.c


示例3: machine_kdump_pm_init

static int __init machine_kdump_pm_init(void)
{
	pm_notifier(machine_kdump_pm_cb, 0);
	/* Create initial mapping for crashkernel memory */
	arch_kexec_unprotect_crashkres();
	return 0;
}
开发者ID:1314cc,项目名称:linux,代码行数:7,代码来源:machine_kexec.c


示例4: cpu_hotplug_pm_sync_init

static int __init cpu_hotplug_pm_sync_init(void)
{
    /*
     * cpu_hotplug_pm_callback has higher priority than x86
     * bsp_pm_callback which depends on cpu_hotplug_pm_callback
     * to disable cpu hotplug to avoid cpu hotplug race.
     */
    pm_notifier(cpu_hotplug_pm_callback, 0);
    return 0;
}
开发者ID:rbheromax,项目名称:android_kernel_lge_dory,代码行数:10,代码来源:cpu.c


示例5: pbm_module_init

static int __init pbm_module_init(void)
{
	int ret = 0;

	#if 1 /* CONFIG_PBM_PROC_FS */
	mt_pbm_create_procfs();
	#endif

	pm_notifier(_mt_pbm_pm_callback, 0);

	register_dlpt_notify(&kicker_pbm_by_dlpt, DLPT_PRIO_PBM);
	ret = create_pbm_kthread();

	pbm_crit("pbm_module_init : Done\n");

	if (ret) {
		pbm_err("FAILED TO CREATE PBM KTHREAD\n");
		return ret;
	}
	return ret;
}
开发者ID:P-D-A,项目名称:android_kernel_lge_mt6753,代码行数:21,代码来源:mt_pbm.c


示例6: suspend_pm_init

static int __init suspend_pm_init(void)
{
	pm_notifier(suspend_pm_cb, 0);
	return 0;
}
开发者ID:18712886438,项目名称:android_kernel_motorola_quark,代码行数:5,代码来源:suspend.c


示例7: machine_kdump_pm_init

static int __init machine_kdump_pm_init(void)
{
	pm_notifier(machine_kdump_pm_cb, 0);
	return 0;
}
开发者ID:0-T-0,项目名称:ps4-linux,代码行数:5,代码来源:machine_kexec.c


示例8: pm_ext_init

int pm_ext_init(struct tty_struct *tty)
{
	int res;

	pm_ext_tty = tty;

	/*
	 * NOTE: No need to request AWR since this is done by the board
	 * file.
	 */

	/* AWR should be low initially. */
	gpio_direction_output(GPIO_MODEM_AWR, 0);

	/* Request and configure CWR. */
	res = gpio_request(GPIO_MODEM_CWR, "cwr");
	if (res < 0) {
		printk(KERN_ERR "pm_ext_init: request_gpio_cwr_failed: %d.\n", res);
		goto request_gpio_cwr_failed;
	}

	gpio_direction_input(GPIO_MODEM_CWR);

	/* Report initial state if different from low (WARN). */
	if (gpio_get_value(GPIO_MODEM_CWR)) {
		printk(KERN_WARNING "pm_ext_init: CWR already asserted.\n");
		cwr_notify(pm_ext_tty, true);
	}

	/* Trigger on both falling and rising edges on CWR. */
	res = request_irq(gpio_to_irq(GPIO_MODEM_CWR), cwr_irq,
					  IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
					  "cwr_irq", NULL);
	if (res < 0) {
		printk(KERN_ERR "pm_ext_init: request_irq_failed: %d.\n", res);
		goto request_irq_failed;
	}

	/* Make IRQ wakeup capable. */
	res = enable_irq_wake(gpio_to_irq(GPIO_MODEM_CWR));
	if (res < 0) {
		printk(KERN_ERR "pm_ext_init: enable_irq_wake_failed: %d.\n", res);
		goto enable_irq_wake_failed;
	}

#ifdef CONFIG_HAS_WAKELOCK
	wake_lock_init(&awr_wakelock, WAKE_LOCK_SUSPEND, "caif_awr");
	wake_lock_init(&cwr_wakelock, WAKE_LOCK_SUSPEND, "caif_cwr");
#endif /* CONFIG_HAS_WAKELOCK */

	pm_notifier(pm_notify, 0);

	return 0;

 enable_irq_wake_failed:
 request_irq_failed:
	gpio_free(GPIO_MODEM_CWR);
 request_gpio_cwr_failed:
	gpio_free(GPIO_MODEM_AWR);

	return -ENODEV;
}
开发者ID:ARMP,项目名称:ARM-Project,代码行数:62,代码来源:omap_pm.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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