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

C++ debugfs_create_u32函数代码示例

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

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



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

示例1: indra_alloc

static void *
indra_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
{
	struct indra_priv *ip;

	ip = kzalloc(sizeof(struct indra_priv), GFP_ATOMIC);
	if (!ip)
		return NULL;
		
	ip->cw_min = 15;

	if (hw->max_rate_tries > 0)
		ip->max_retry = hw->max_rate_tries;
	else
		/* safe default, does not necessarily have to match hw properties */
		ip->max_retry = 7;

	if (hw->max_rates >= 4)
		ip->has_mrr = true;

	ip->hw = hw;
	
#ifdef CPTCFG_MAC80211_DEBUGFS
	ip->st_deadline = (u32) 2000;
	ip->dbg_st_deadline = debugfs_create_u32("deadline",
			S_IRUGO | S_IWUGO, debugfsdir, &ip->st_deadline);
	ip->ref_payload_size = (u32) 100;											
	ip->dbg_ref_payload_size = debugfs_create_u32("ref_payload_size",			
			S_IRUGO | S_IWUGO, debugfsdir, &ip->ref_payload_size);				
#endif

	indra_init_cck_rates(ip);

	return ip;
}
开发者ID:trama,项目名称:ieiit-kbp4111-80211,代码行数:35,代码来源:rc80211_indra.c


示例2: simon_debugfs_init

static int __init simon_debugfs_init(void)
{
	int i;
	struct tegra_simon_grader *grader;
	struct dentry *dir;

	dir = debugfs_create_dir("tegra_simon", NULL);
	if (!dir)
		return -ENOMEM;

	if (!debugfs_create_u32("grading_sec", S_IWUSR | S_IRUGO, dir,
				&grading_sec))
		goto err_out;

	if (!debugfs_create_u32("timeout_sec", S_IWUSR | S_IRUGO, dir,
				&timeout_sec))
		goto err_out;

	for (i = 0; i < TEGRA_SIMON_DOMAIN_NUM; i++) {
		grader = &simon_graders[i];

		if (!grader->domain_name)
			continue;

		if (simon_debugfs_init_domain(dir, grader))
			goto err_out;
	}

	return 0;

err_out:
	debugfs_remove_recursive(dir);
	return -ENOMEM;
}
开发者ID:Jetson-TK1-AndroidTV,项目名称:android_kernel_nvidia_aosp,代码行数:34,代码来源:tegra_simon.c


示例3: fpga_mgr_debugfs_add

void fpga_mgr_debugfs_add(struct fpga_manager *mgr)
{
	struct fpga_mgr_debugfs *debugfs;
	struct fpga_image_info *info;

	if (!fpga_mgr_debugfs_root)
		return;

	debugfs = kzalloc(sizeof(*debugfs), GFP_KERNEL);
	if (!debugfs)
		return;

	debugfs->debugfs_dir = debugfs_create_dir(dev_name(&mgr->dev),
						  fpga_mgr_debugfs_root);

	debugfs_create_file("firmware_name", 0600, debugfs->debugfs_dir, mgr,
			    &fpga_mgr_firmware_fops);

	debugfs_create_file("image", 0200, debugfs->debugfs_dir, mgr,
			    &fpga_mgr_image_fops);

	info = &debugfs->info;
	debugfs_create_u32("flags", 0600, debugfs->debugfs_dir, &info->flags);
	debugfs_create_u32("enable_to", 0600, debugfs->debugfs_dir,
			   &info->enable_timeout_us);
	debugfs_create_u32("disable_to", 0600, debugfs->debugfs_dir,
			   &info->disable_timeout_us);
	debugfs_create_u32("config_to", 0600, debugfs->debugfs_dir,
			   &info->config_complete_timeout_us);

	mgr->debugfs = debugfs;
}
开发者ID:ernesto1209,项目名称:fpga-partial-reconfig,代码行数:32,代码来源:fpga-mgr-debugfs.c


示例4: pfn_inject_init

static int pfn_inject_init(void)
{
	struct dentry *dentry;

	hwpoison_dir = debugfs_create_dir("hwpoison", NULL);
	if (hwpoison_dir == NULL)
		return -ENOMEM;

	/*
	 * Note that the below poison/unpoison interfaces do not involve
	 * hardware status change, hence do not require hardware support.
	 * They are mainly for testing hwpoison in software level.
	 */
	dentry = debugfs_create_file("corrupt-pfn", 0600, hwpoison_dir,
					  NULL, &hwpoison_fops);
	if (!dentry)
		goto fail;

	dentry = debugfs_create_file("unpoison-pfn", 0600, hwpoison_dir,
				     NULL, &unpoison_fops);
	if (!dentry)
		goto fail;

	dentry = debugfs_create_u32("corrupt-filter-enable", 0600,
				    hwpoison_dir, &hwpoison_filter_enable);
	if (!dentry)
		goto fail;

	dentry = debugfs_create_u32("corrupt-filter-dev-major", 0600,
				    hwpoison_dir, &hwpoison_filter_dev_major);
	if (!dentry)
		goto fail;

	dentry = debugfs_create_u32("corrupt-filter-dev-minor", 0600,
				    hwpoison_dir, &hwpoison_filter_dev_minor);
	if (!dentry)
		goto fail;

	dentry = debugfs_create_u64("corrupt-filter-flags-mask", 0600,
				    hwpoison_dir, &hwpoison_filter_flags_mask);
	if (!dentry)
		goto fail;

	dentry = debugfs_create_u64("corrupt-filter-flags-value", 0600,
				    hwpoison_dir, &hwpoison_filter_flags_value);
	if (!dentry)
		goto fail;

#ifdef CONFIG_MEMCG_SWAP
	dentry = debugfs_create_u64("corrupt-filter-memcg", 0600,
				    hwpoison_dir, &hwpoison_filter_memcg);
	if (!dentry)
		goto fail;
#endif

	return 0;
fail:
	pfn_inject_exit();
	return -ENOMEM;
}
开发者ID:AD5GB,项目名称:kernel_n5_3.10-experimental,代码行数:60,代码来源:hwpoison-inject.c


示例5: host1x_debugfs_init

static void host1x_debugfs_init(struct host1x *host1x)
{
	struct dentry *de = debugfs_create_dir("tegra-host1x", NULL);

	if (!de)
		return;

	/* Store the created entry */
	host1x->debugfs = de;

	debugfs_create_file("status", S_IRUGO, de, host1x, &host1x_debug_fops);
	debugfs_create_file("status_all", S_IRUGO, de, host1x,
			    &host1x_debug_all_fops);

	debugfs_create_u32("trace_cmdbuf", S_IRUGO|S_IWUSR, de,
			   &host1x_debug_trace_cmdbuf);

	host1x_hw_debug_init(host1x, de);

	debugfs_create_u32("force_timeout_pid", S_IRUGO|S_IWUSR, de,
			   &host1x_debug_force_timeout_pid);
	debugfs_create_u32("force_timeout_val", S_IRUGO|S_IWUSR, de,
			   &host1x_debug_force_timeout_val);
	debugfs_create_u32("force_timeout_channel", S_IRUGO|S_IWUSR, de,
			   &host1x_debug_force_timeout_channel);
}
开发者ID:020gzh,项目名称:linux,代码行数:26,代码来源:debug.c


示例6: adreno_debugfs_init

void adreno_debugfs_init(struct kgsl_device *device)
{
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);

	if (!device->d_debugfs || IS_ERR(device->d_debugfs))
		return;

	debugfs_create_file("cff_dump", 0644, device->d_debugfs, device,
			    &kgsl_cff_dump_enable_fops);
	debugfs_create_u32("wait_timeout", 0644, device->d_debugfs,
		&adreno_dev->wait_timeout);
	debugfs_create_u32("ib_check", 0644, device->d_debugfs,
			   &adreno_dev->ib_check_level);

	/* By Default enable fast hang detection */
	adreno_dev->fast_hang_detect = 1;
	debugfs_create_u32("fast_hang_detect", 0644, device->d_debugfs,
			   &adreno_dev->fast_hang_detect);

	/* Create post mortem control files */

	pm_d_debugfs = debugfs_create_dir("postmortem", device->d_debugfs);

	if (IS_ERR(pm_d_debugfs))
		return;

	debugfs_create_file("dump",  0600, pm_d_debugfs, device,
			    &pm_dump_fops);
	debugfs_create_file("regs_enabled", 0644, pm_d_debugfs, device,
			    &pm_regs_enabled_fops);
	debugfs_create_file("ib_enabled", 0644, pm_d_debugfs, device,
				    &pm_ib_enabled_fops);
}
开发者ID:1111saeid,项目名称:jb_kernel_3.0.16_htc_golfu,代码行数:33,代码来源:adreno_debugfs.c


示例7: init_debug

static void init_debug(void)
{
	struct dentry *dd, *df;

	if (!sysedp_debugfs_dir)
		return;

	dd = debugfs_create_dir("batmon", sysedp_debugfs_dir);
	WARN_ON(IS_ERR_OR_NULL(dd));

	df = debugfs_create_file("rbat", S_IRUGO, dd, NULL, &rbat_fops);
	WARN_ON(IS_ERR_OR_NULL(df));

	df = debugfs_create_file("ibat", S_IRUGO, dd, NULL, &ibat_fops);
	WARN_ON(IS_ERR_OR_NULL(df));

	df = debugfs_create_file("ocv", S_IRUGO, dd, NULL, &ocv_fops);
	WARN_ON(IS_ERR_OR_NULL(df));

	df = debugfs_create_u32("r_const", S_IRUGO, dd, &pdata->r_const);
	WARN_ON(IS_ERR_OR_NULL(df));

	df = debugfs_create_u32("vsys_min", S_IRUGO, dd, &pdata->vsys_min);
	WARN_ON(IS_ERR_OR_NULL(df));
}
开发者ID:1ee7,项目名称:linux_l4t_tx1,代码行数:25,代码来源:sysedp_batmon_calc.c


示例8: abe_init_debugfs

void abe_init_debugfs(struct omap_abe *abe)
{
    abe->debugfs.d_root = debugfs_create_dir("omap-abe", NULL);
    if (!abe->debugfs.d_root) {
        dev_err(abe->dev, "Failed to create debugfs directory\n");
        return;
    }

    abe->debugfs.d_fmt1 = debugfs_create_bool("format1", 0644,
                          abe->debugfs.d_root,
                          &abe->debugfs.format1);
    if (!abe->debugfs.d_fmt1)
        dev_err(abe->dev, "Failed to create format1 debugfs file\n");

    abe->debugfs.d_fmt2 = debugfs_create_bool("format2", 0644,
                          abe->debugfs.d_root,
                          &abe->debugfs.format2);
    if (!abe->debugfs.d_fmt2)
        dev_err(abe->dev, "Failed to create format2 debugfs file\n");

    abe->debugfs.d_fmt3 = debugfs_create_bool("format3", 0644,
                          abe->debugfs.d_root,
                          &abe->debugfs.format3);
    if (!abe->debugfs.d_fmt3)
        dev_err(abe->dev, "Failed to create format3 debugfs file\n");

    abe->debugfs.d_elem_bytes = debugfs_create_u32("element_bytes", 0604,
                                abe->debugfs.d_root,
                                &abe->debugfs.elem_bytes);
    if (!abe->debugfs.d_elem_bytes)
        dev_err(abe->dev, "Failed to create element size debugfs file\n");

    abe->debugfs.d_size = debugfs_create_u32("msecs", 0644,
                          abe->debugfs.d_root,
                          &abe->debugfs.buffer_msecs);
    if (!abe->debugfs.d_size)
        dev_err(abe->dev, "Failed to create buffer size debugfs file\n");

    abe->debugfs.d_circ = debugfs_create_bool("circular", 0644,
                          abe->debugfs.d_root,
                          &abe->debugfs.circular);
    if (!abe->debugfs.d_size)
        dev_err(abe->dev, "Failed to create circular mode debugfs file\n");

    abe->debugfs.d_data = debugfs_create_file("debug", 0644,
                          abe->debugfs.d_root,
                          abe, &omap_abe_fops);
    if (!abe->debugfs.d_data)
        dev_err(abe->dev, "Failed to create data debugfs file\n");

    abe->debugfs.d_opp = debugfs_create_u32("opp_level", 0604,
                                            abe->debugfs.d_root,
                                            &abe->opp.level);
    if (!abe->debugfs.d_opp)
        dev_err(abe->dev, "Failed to create OPP level debugfs file\n");

    init_waitqueue_head(&abe->debugfs.wait);
}
开发者ID:koh523,项目名称:kernel-pandaboard-ES-RevB3,代码行数:58,代码来源:omap-abe-dbg.c


示例9: balong_compose_debug_init

int __init balong_compose_debug_init(void)
{
    debugfs_create_u32("mit1_compose", 0664, NULL, &g_command_file_wr_enable);
    debugfs_create_u32("mit1_ade_off", 0664, NULL, &g_ade_power_off_enable);
    debugfs_create_u32("mit1_ade_isr_off", 0664, NULL, &g_ade_isr_disable);
    debugfs_create_u32("mit1_offline_disable", 0664, NULL, &g_ade_offline_disable);
    debugfs_create_u32("mit1_dis_ade_ioctl", 0664, NULL, &g_debug_dis_ade_ioctl);
    return 0;
}
开发者ID:CM13-HI6210SFT,项目名称:huawei_kernel_3.10.71_hi6210sft,代码行数:9,代码来源:balong_compose.c


示例10: wil6210_debugfs_init

int wil6210_debugfs_init(struct wil6210_priv *wil)
{
	struct dentry *dbg = wil->debug = debugfs_create_dir(WIL_NAME,
			wil_to_wiphy(wil)->debugfsdir);

	if (IS_ERR_OR_NULL(dbg))
		return -ENODEV;

	debugfs_create_file("mbox", S_IRUGO, dbg, wil, &fops_mbox);
	debugfs_create_file("vrings", S_IRUGO, dbg, wil, &fops_vring);
	debugfs_create_file("stations", S_IRUGO, dbg, wil, &fops_sta);
	debugfs_create_file("desc", S_IRUGO, dbg, wil, &fops_txdesc);
	debugfs_create_u32("desc_index", S_IRUGO | S_IWUSR, dbg,
			   &dbg_txdesc_index);
	debugfs_create_u32("vring_index", S_IRUGO | S_IWUSR, dbg,
			   &dbg_vring_index);

	debugfs_create_file("bf", S_IRUGO, dbg, wil, &fops_bf);
	debugfs_create_file("ssid", S_IRUGO | S_IWUSR, dbg, wil, &fops_ssid);
	debugfs_create_u32("secure_pcp", S_IRUGO | S_IWUSR, dbg,
			   &wil->secure_pcp);
	wil_debugfs_create_ulong("status", S_IRUGO | S_IWUSR, dbg,
				 &wil->status);
	debugfs_create_u32("fw_version", S_IRUGO, dbg, &wil->fw_version);
	debugfs_create_x32("hw_version", S_IRUGO, dbg, &wil->hw_version);

	wil6210_debugfs_create_ISR(wil, "USER_ICR", dbg,
				   HOSTADDR(RGF_USER_USER_ICR));
	wil6210_debugfs_create_ISR(wil, "DMA_EP_TX_ICR", dbg,
				   HOSTADDR(RGF_DMA_EP_TX_ICR));
	wil6210_debugfs_create_ISR(wil, "DMA_EP_RX_ICR", dbg,
				   HOSTADDR(RGF_DMA_EP_RX_ICR));
	wil6210_debugfs_create_ISR(wil, "DMA_EP_MISC_ICR", dbg,
				   HOSTADDR(RGF_DMA_EP_MISC_ICR));
	wil6210_debugfs_create_pseudo_ISR(wil, dbg);
	wil6210_debugfs_create_ITR_CNT(wil, dbg);

	wil_debugfs_create_iomem_x32("RGF_USER_USAGE_1", S_IRUGO, dbg,
				     wil->csr +
				     HOSTADDR(RGF_USER_USAGE_1));
	debugfs_create_u32("mem_addr", S_IRUGO | S_IWUSR, dbg, &mem_addr);
	debugfs_create_file("mem_val", S_IRUGO, dbg, wil, &fops_memread);

	debugfs_create_file("reset", S_IWUSR, dbg, wil, &fops_reset);
	debugfs_create_file("rxon", S_IWUSR, dbg, wil, &fops_rxon);
	debugfs_create_file("tx_mgmt", S_IWUSR, dbg, wil, &fops_txmgmt);
	debugfs_create_file("wmi_send", S_IWUSR, dbg, wil, &fops_wmi);
	debugfs_create_file("temp", S_IRUGO, dbg, wil, &fops_temp);
	debugfs_create_file("freq", S_IRUGO, dbg, wil, &fops_freq);
	debugfs_create_file("link", S_IRUGO, dbg, wil, &fops_link);
	debugfs_create_file("info", S_IRUGO, dbg, wil, &fops_info);

	wil6210_debugfs_init_blobs(wil, dbg);

	return 0;
}
开发者ID:AkyZero,项目名称:wrapfs-latest,代码行数:56,代码来源:debugfs.c


示例11: debugfs_init

static void debugfs_init(void)
{
	dentry_debug_root = debugfs_create_dir("power", NULL);
	if (IS_ERR(dentry_debug_root) || !dentry_debug_root) {
		printk("!!!powermanager Failed to create debugfs directory\n");
		dentry_debug_root = NULL;
		return;
	}
	debugfs_create_u32("print_sleep_mode", 0644, dentry_debug_root,
			   &is_print_sleep_mode);
	debugfs_create_u32("print_linux_clock", 0644, dentry_debug_root,
			   &is_print_linux_clock);
	debugfs_create_u32("print_modem_clock", 0644, dentry_debug_root,
			   &is_print_modem_clock);
	debugfs_create_u32("print_irq", 0644, dentry_debug_root,
			   &is_print_irq);
	debugfs_create_u32("print_wakeup", 0644, dentry_debug_root,
			   &is_print_wakeup);
	debugfs_create_u32("print_irq_runtime", 0644, dentry_debug_root,
			   &is_print_irq_runtime);
	debugfs_create_u32("print_time", 0644, dentry_debug_root,
			   &is_print_time);
	debugfs_create_u32("print_thread_enable", 0644, dentry_debug_root,
			   &print_thread_enable);
	debugfs_create_u32("print_thread_interval", 0644, dentry_debug_root,
			   &print_thread_interval);
}
开发者ID:bigzz,项目名称:sc7715-kernel,代码行数:27,代码来源:pm_debug_scx35.c


示例12: mdss_panel_debugfs_setup

int mdss_panel_debugfs_setup(struct mdss_panel_info *panel_info, struct dentry
		*parent, char *dsi_str)
{
	struct mdss_panel_debugfs_info *debugfs_info;
	debugfs_info = kzalloc(sizeof(*debugfs_info), GFP_KERNEL);
	if (!debugfs_info) {
		pr_err("No memory to create panel debugfs info");
		return -ENOMEM;
	}

	debugfs_info->root = debugfs_create_dir(dsi_str, parent);
	if (IS_ERR_OR_NULL(debugfs_info->root)) {
		pr_err("Debugfs create dir failed with error: %ld\n",
					PTR_ERR(debugfs_info->root));
		kfree(debugfs_info);
		return -ENODEV;
	}

	debugfs_create_u32("override_flag", 0644, parent,
			(u32 *)&debugfs_info->override_flag);

	debugfs_create_u32("xres", 0644, debugfs_info->root,
			(u32 *)&debugfs_info->xres);
	debugfs_create_u32("yres", 0644, debugfs_info->root,
					(u32 *)&debugfs_info->yres);

	debugfs_create_u32("h_back_porch", 0644, debugfs_info->root,
			(u32 *)&debugfs_info->lcdc.h_back_porch);
	debugfs_create_u32("h_front_porch", 0644, debugfs_info->root,
			(u32 *)&debugfs_info->lcdc.h_front_porch);
	debugfs_create_u32("h_pulse_width", 0644, debugfs_info->root,
			(u32 *)&debugfs_info->lcdc.h_pulse_width);

	debugfs_create_u32("v_back_porch", 0644, debugfs_info->root,
			(u32 *)&debugfs_info->lcdc.v_back_porch);
	debugfs_create_u32("v_front_porch", 0644, debugfs_info->root,
			(u32 *)&debugfs_info->lcdc.v_front_porch);
	debugfs_create_u32("v_pulse_width", 0644, debugfs_info->root,
			(u32 *)&debugfs_info->lcdc.v_pulse_width);

	debugfs_create_u32("frame_rate", 0644, parent,
			(u32 *)&debugfs_info->frame_rate);

	mdss_panel_debugfs_fbc_setup(debugfs_info, panel_info,
		debugfs_info->root);

	debugfs_info->xres = panel_info->xres;
	debugfs_info->yres = panel_info->yres;
	debugfs_info->lcdc = panel_info->lcdc;
	debugfs_info->frame_rate = panel_info->mipi.frame_rate;
	debugfs_info->override_flag = 0;

	panel_info->debugfs_info = debugfs_info;
	return 0;
}
开发者ID:auras76,项目名称:aur-kernel-XZxx,代码行数:55,代码来源:mdss_panel.c


示例13: dprintk

struct dentry *msm_vidc_debugfs_init_core(struct msm_vidc_core *core,
		struct dentry *parent)
{
	struct dentry *dir = NULL;
	char debugfs_name[MAX_DEBUGFS_NAME];
	if (!core) {
		dprintk(VIDC_ERR, "Invalid params, core: %p\n", core);
		goto failed_create_dir;
	}

	snprintf(debugfs_name, MAX_DEBUGFS_NAME, "core%d", core->id);
	dir = debugfs_create_dir(debugfs_name, parent);
	if (!dir) {
		dprintk(VIDC_ERR, "Failed to create debugfs for msm_vidc\n");
		goto failed_create_dir;
	}
	if (!debugfs_create_file("info", S_IRUGO, dir, core, &core_info_fops)) {
		dprintk(VIDC_ERR, "debugfs_create_file: fail\n");
		goto failed_create_dir;
	}
	if (!debugfs_create_u32("debug_level", S_IRUGO | S_IWUSR,
			parent,	&msm_vidc_debug)) {
		dprintk(VIDC_ERR, "debugfs_create_file: fail\n");
		goto failed_create_dir;
	}
	if (!debugfs_create_u32("fw_level", S_IRUGO | S_IWUSR,
			parent, &msm_fw_debug)) {
		dprintk(VIDC_ERR, "debugfs_create_file: fail\n");
		goto failed_create_dir;
	}
	if (!debugfs_create_file("trigger_ssr", S_IWUSR,
			dir, core, &ssr_fops)) {
		dprintk(VIDC_ERR, "debugfs_create_file: fail\n");
		goto failed_create_dir;
	}
	if (!debugfs_create_u32("fw_debug_mode", S_IRUGO | S_IWUSR,
			parent, &msm_fw_debug_mode)) {
		dprintk(VIDC_ERR, "debugfs_create_file: fail\n");
		goto failed_create_dir;
	}
	if (!debugfs_create_u32("fw_low_power_mode", S_IRUGO | S_IWUSR,
			parent, &msm_fw_low_power_mode)) {
		dprintk(VIDC_ERR, "debugfs_create_file: fail\n");
		goto failed_create_dir;
	}
	if (!debugfs_create_u32("vp8_low_tier", S_IRUGO | S_IWUSR,
			parent, &msm_vp8_low_tier)) {
		dprintk(VIDC_ERR, "debugfs_create_file: fail\n");
		goto failed_create_dir;
	}
failed_create_dir:
	return dir;
}
开发者ID:AbdulrahmanAmir,项目名称:Dorimanx-LG-G2-D802-Kernel,代码行数:53,代码来源:msm_vidc_debug.c


示例14: debugfs_init

/* Create debugfs counters for the device */
static inline void debugfs_init(struct cfv_info *cfv)
{
	cfv->debugfs =
		debugfs_create_dir(netdev_name(cfv->ndev), NULL);

	if (IS_ERR(cfv->debugfs))
		return;

	debugfs_create_u32("rx-napi-complete", S_IRUSR, cfv->debugfs,
			   &cfv->stats.rx_napi_complete);
	debugfs_create_u32("rx-napi-resched", S_IRUSR, cfv->debugfs,
			   &cfv->stats.rx_napi_resched);
	debugfs_create_u32("rx-nomem", S_IRUSR, cfv->debugfs,
			   &cfv->stats.rx_nomem);
	debugfs_create_u32("rx-kicks", S_IRUSR, cfv->debugfs,
			   &cfv->stats.rx_kicks);
	debugfs_create_u32("tx-full-ring", S_IRUSR, cfv->debugfs,
			   &cfv->stats.tx_full_ring);
	debugfs_create_u32("tx-no-mem", S_IRUSR, cfv->debugfs,
			   &cfv->stats.tx_no_mem);
	debugfs_create_u32("tx-kicks", S_IRUSR, cfv->debugfs,
			   &cfv->stats.tx_kicks);
	debugfs_create_u32("tx-flow-on", S_IRUSR, cfv->debugfs,
			   &cfv->stats.tx_flow_on);
}
开发者ID:ReneNyffenegger,项目名称:linux,代码行数:26,代码来源:caif_virtio.c


示例15: tegra_emc_timers_init

int tegra_emc_timers_init(struct dentry *parent)
{
#ifdef CONFIG_DEBUG_FS
	struct dentry *dram_therm_debugfs;
	struct dentry *training_debugfs;

	/*
	 * If caller doesn't want us to make a debugfs dir it can pass NULL.
	 * This should never be a top level debugfs dir. For subsequent debugfs
	 * errors return 0 - don't fail the entire EMC driver init if debugfs
	 * has problems. We do a best effort here.
	 */
	if (!parent)
		return 0;

	emc_timers_debugfs = debugfs_create_dir("emc_timers", parent);
	if (!emc_timers_debugfs)
		return 0;

	dram_therm_debugfs = debugfs_create_dir("dram_therm",
						emc_timers_debugfs);
	if (!dram_therm_debugfs)
		return 0;

	debugfs_create_u32("debug", S_IRUGO | S_IWUSR,
			   emc_timers_debugfs, &emc_timers_dbg);

	/* DRAM thermals. */
	debugfs_create_u32("timer_period", S_IRUGO | S_IWUSR,
			   dram_therm_debugfs, &timer_period_mr4);
	debugfs_create_u32("test_mode", S_IRUGO | S_IWUSR,
			   dram_therm_debugfs, &test_mode);
	debugfs_create_u32("dram_temp_override", S_IRUGO | S_IWUSR,
			   dram_therm_debugfs, &dram_temp_override);
	debugfs_create_file("force_poll", S_IRUGO | S_IWUSR,
			    dram_therm_debugfs, NULL, &mr4_force_poll_fops);

	if (tegra_emc_get_dram_type() == DRAM_TYPE_LPDDR4) {
		/* Training. */
		training_debugfs = debugfs_create_dir("training",
						      emc_timers_debugfs);
		if (!training_debugfs)
			return 0;

		debugfs_create_u32("timer_period", S_IRUGO | S_IWUSR,
				   training_debugfs, &timer_period_training);
	}
#endif
	return 0;
}
开发者ID:Toradex-Apalis-TK1-AndroidTV,项目名称:android_kernel_nvidia_mm,代码行数:50,代码来源:tegra_emc_timers.c


示例16: rhea_pm_debug_init

int __init rhea_pm_debug_init(void)
{
	int ret;

    INIT_DELAYED_WORK(&uartb_wq, uartb_wq_handler);
#ifdef CONFIG_UART_FORCE_RETENTION_TST
	if (pwr_mgr_register_event_handler(UBRX_EVENT,
			uartb_pwr_mgr_event_cb, NULL))
		return -ENOMEM;
#endif
	/* create root clock dir /clock */
    dent_rhea_pm_root_dir = debugfs_create_dir("rhea_pm", 0);
    if(!dent_rhea_pm_root_dir)
	return -ENOMEM;
	if (!debugfs_create_u32("log_mask", S_IRUGO | S_IWUSR,
		dent_rhea_pm_root_dir, (int *)&log_mask))
		return -ENOMEM;
	if (!debugfs_create_file("en_self_refresh", S_IRUGO | S_IWUSR,
		dent_rhea_pm_root_dir, NULL, &pm_en_self_refresh_fops))
		return -ENOMEM;
	if (!debugfs_create_u32("force_retention", S_IRUGO | S_IWUSR,
			dent_rhea_pm_root_dir, (int*)&force_retention))
		return -ENOMEM;

	/* A9 QOS interface is used to disable dormant C-states
	 * at runtime. To disable dormant set PM_QOS_CPU_DMA_LATENCY
	 * to the latency of the highest non-dormant state.
	 */
	ret = pi_mgr_qos_add_request(&arm_qos, "pm",
				     PI_MGR_PI_ID_ARM_CORE,
				     PI_MGR_QOS_DEFAULT_VALUE);
	if (ret < 0)
		return ret;

	/* If dormant is not enabled out of boot, prevent cpuidle
	 * from entering into dormant C-states.
	 */
	if (dormant_enable == 0)
		pi_mgr_qos_request_update(&arm_qos,
					  NON_DORMANT_MAX_EXIT_LATENCY);

	/* Interface to enable disable dormant mode at runtime */
	if (!debugfs_create_file("dormant_enable", S_IRUGO | S_IWUSR,
				 dent_rhea_pm_root_dir, NULL,
				 &dormant_enable_fops))
		return -ENOMEM;

	return 0;
}
开发者ID:Alonso1398,项目名称:android_kernel_samsung_coriplus,代码行数:49,代码来源:rhea_pm.c


示例17: cdc_dbg_init

static int cdc_dbg_init(struct cdc *cdc_info)
{
	int i;
	char buf[20];
	cdc_info->cdc_dir = debugfs_create_dir("cdc", 0);

	if (!cdc_info->cdc_dir)
		return -EINVAL;

	for (i = 0; i < cdc_info->nr_cpus; i++) {
		sprintf(buf, "cpu%d_status", i);
		if (!debugfs_create_file(buf,
				S_IRUSR, cdc_info->cdc_dir, (void *)i,
				&cdc_dbg_get_status_ops))
			goto err;
	}
	if (!debugfs_create_u32("dbg_mask", S_IRUSR | S_IWUSR,
		cdc_info->cdc_dir, (u32 *)dbg_mask))
			goto err;

	if (!debugfs_create_file("dbg_bus",
			S_IRUSR | S_IWUSR , cdc_info->cdc_dir, NULL,
			&cdc_dbg_bus_ops))
		goto err;
	return 0;
err:
	debugfs_remove_recursive(cdc_info->cdc_dir);
	return -EINVAL;
}
开发者ID:alexey6600,项目名称:mm_sony_tetra_3.14,代码行数:29,代码来源:cdc.c


示例18: wil6210_debugfs_init_offset

/**
 * wil6210_debugfs_init_offset - create set of debugfs files
 * @wil - driver's context, used for printing
 * @dbg - directory on the debugfs, where files will be created
 * @base - base address used in address calculation
 * @tbl - table with file descriptions. Should be terminated with empty element.
 *
 * Creates files accordingly to the @tbl.
 */
static void wil6210_debugfs_init_offset(struct wil6210_priv *wil,
					struct dentry *dbg, void *base,
					const struct dbg_off * const tbl)
{
	int i;

	for (i = 0; tbl[i].name; i++) {
		struct dentry *f;

		switch (tbl[i].type) {
		case doff_u32:
			f = debugfs_create_u32(tbl[i].name, tbl[i].mode, dbg,
					       base + tbl[i].off);
			break;
		case doff_x32:
			f = debugfs_create_x32(tbl[i].name, tbl[i].mode, dbg,
					       base + tbl[i].off);
			break;
		case doff_ulong:
			f = wil_debugfs_create_ulong(tbl[i].name, tbl[i].mode,
						     dbg, base + tbl[i].off);
			break;
		case doff_io32:
			f = wil_debugfs_create_iomem_x32(tbl[i].name,
							 tbl[i].mode, dbg,
							 base + tbl[i].off);
			break;
		default:
			f = ERR_PTR(-EINVAL);
		}
		if (IS_ERR_OR_NULL(f))
			wil_err(wil, "Create file \"%s\": err %ld\n",
				tbl[i].name, PTR_ERR(f));
	}
}
开发者ID:3null,项目名称:linux,代码行数:44,代码来源:debugfs.c


示例19: ccmni_debug_file_init

/* ccmni debug sys file create */
int ccmni_debug_file_init(int md_id)
{
	int result = -1;
	char fname[16];
	struct dentry *dentry1, *dentry2, *dentry3;

	CCMNI_INF_MSG(md_id, "ccmni_debug_file_init\n");

	dentry1 = debugfs_create_dir("ccmni", NULL);
	if (!dentry1) {
		CCMNI_ERR_MSG(md_id, "create /proc/ccmni fail\n");
		return -ENOENT;
	}

	snprintf(fname, 16, "md%d", (md_id+1));

	dentry2 = debugfs_create_dir(fname, dentry1);
	if (!dentry2) {
		CCMNI_ERR_MSG(md_id, "create /proc/ccmni/md%d fail\n", (md_id+1));
		return -ENOENT;
	}

	dentry3 = debugfs_create_u32("debug_level", 0600, dentry2, &ccmni_debug_level);
	result = PTR_ERR(dentry3);
	if (IS_ERR(dentry3) && result != -ENODEV) {
		CCMNI_ERR_MSG(md_id, "create /proc/ccmni/md%d/debug_level fail: %d\n", md_id, result);
		return -ENOENT;
	}

	return 0;
}
开发者ID:John677,项目名称:Kernal_k3note,代码行数:32,代码来源:ccmni.c


示例20: ufs_test_debugfs_init

static int ufs_test_debugfs_init(void)
{
	struct dentry *utils_root, *tests_root;
	int ret = 0;

	utils_root = test_iosched_get_debugfs_utils_root();
	tests_root = test_iosched_get_debugfs_tests_root();

	utd->test_list = kmalloc(sizeof(struct dentry *) * NUM_TESTS,
			GFP_KERNEL);
	if (!utd->test_list) {
		pr_err("%s: failed to allocate tests dentrys", __func__);
		return -ENODEV;
	}

	if (!utils_root || !tests_root) {
		pr_err("%s: Failed to create debugfs root.", __func__);
		ret = -EINVAL;
		goto exit_err;
	}

	utd->random_test_seed_dentry = debugfs_create_u32("random_test_seed",
			S_IRUGO | S_IWUGO, utils_root, &utd->random_test_seed);

	if (!utd->random_test_seed_dentry) {
		pr_err("%s: Could not create debugfs random_test_seed.",
				__func__);
		ret = -ENOMEM;
		goto exit_err;
	}

	ret = add_test(utd, write_read_test, WRITE_READ_TEST);
	if (ret)
		goto exit_err;
	ret = add_test(utd, long_sequential_read, LONG_SEQUENTIAL_READ);
	if (ret)
		goto exit_err;
	ret = add_test(utd, long_sequential_write, LONG_SEQUENTIAL_WRITE);
	if (ret)
		goto exit_err;
	ret = add_test(utd, long_sequential_mixed, LONG_SEQUENTIAL_MIXED);
	if (ret)
		goto exit_err;
	add_test(utd, multi_query, MULTI_QUERY);
	if (ret)
		goto exit_err;
	add_test(utd, parallel_read_and_write, PARALLEL_READ_AND_WRITE);
	if (ret)
		goto exit_err;
	add_test(utd, lun_depth, LUN_DEPTH);
	if (ret)
		goto exit_err;

	goto exit;

exit_err:
	ufs_test_debugfs_cleanup();
exit:
	return ret;
}
开发者ID:AD5GB,项目名称:wicked_kernel_lge_hammerhead,代码行数:60,代码来源:ufs_test.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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