drivers/crypto/intel/qat/qat_common/adf_pm_dbgfs.c

Source file repositories/reference/linux-study-clean/drivers/crypto/intel/qat/qat_common/adf_pm_dbgfs.c

File Facts

System
Linux kernel
Corpus path
drivers/crypto/intel/qat/qat_common/adf_pm_dbgfs.c
Extension
.c
Size
1152 bytes
Lines
49
Domain
Driver Families
Bucket
drivers/crypto
Inferred role
Driver Families: operation-table or driver-model contract
Status
pattern implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

static const struct file_operations pm_status_fops = {
	.owner = THIS_MODULE,
	.read = pm_status_read,
};

void adf_pm_dbgfs_add(struct adf_accel_dev *accel_dev)
{
	struct adf_pm *pm = &accel_dev->power_management;

	if (!pm->present || !pm->print_pm_status)
		return;

	pm->debugfs_pm_status = debugfs_create_file("pm_status", 0400,
						    accel_dev->debugfs_dir,
						    accel_dev, &pm_status_fops);
}

void adf_pm_dbgfs_rm(struct adf_accel_dev *accel_dev)
{
	struct adf_pm *pm = &accel_dev->power_management;

	if (!pm->present)
		return;

	debugfs_remove(pm->debugfs_pm_status);
	pm->debugfs_pm_status = NULL;
}

Annotation

Implementation Notes