sound/soc/intel/avs/sysfs.c
Source file repositories/reference/linux-study-clean/sound/soc/intel/avs/sysfs.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/intel/avs/sysfs.c- Extension
.c- Size
- 885 bytes
- Lines
- 36
- Domain
- Driver Families
- Bucket
- sound/soc
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/sysfs.havs.h
Detected Declarations
function fw_version_show
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
//
// Copyright(c) 2021-2024 Intel Corporation
//
// Authors: Cezary Rojewski <cezary.rojewski@intel.com>
// Amadeusz Slawinski <amadeuszx.slawinski@linux.intel.com>
//
#include <linux/sysfs.h>
#include "avs.h"
static ssize_t fw_version_show(struct device *dev, struct device_attribute *attr, char *buf)
{
struct avs_dev *adev = to_avs_dev(dev);
struct avs_fw_version *fw_version = &adev->fw_cfg.fw_version;
return sysfs_emit(buf, "%d.%d.%d.%d\n", fw_version->major, fw_version->minor,
fw_version->hotfix, fw_version->build);
}
static DEVICE_ATTR_RO(fw_version);
static struct attribute *avs_fw_attrs[] = {
&dev_attr_fw_version.attr,
NULL
};
static const struct attribute_group avs_attr_group = {
.name = "avs",
.attrs = avs_fw_attrs,
};
const struct attribute_group *avs_attr_groups[] = {
&avs_attr_group,
NULL
};
Annotation
- Immediate include surface: `linux/sysfs.h`, `avs.h`.
- Detected declarations: `function fw_version_show`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.