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


C++ debugfs_create_u32函数代码示例

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


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


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