drivers/spi/spi-offload-trigger-adi-util-sigma-delta.c
Source file repositories/reference/linux-study-clean/drivers/spi/spi-offload-trigger-adi-util-sigma-delta.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/spi/spi-offload-trigger-adi-util-sigma-delta.c- Extension
.c- Size
- 1804 bytes
- Lines
- 63
- Domain
- Driver Families
- Bucket
- drivers/spi
- 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/clk.hlinux/dev_printk.hlinux/err.hlinux/mod_devicetable.hlinux/module.hlinux/platform_device.hlinux/property.hlinux/spi/offload/provider.hlinux/spi/offload/types.hlinux/types.h
Detected Declarations
function Copyrightfunction adi_util_sigma_delta_probe
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2025 Analog Devices Inc.
* Copyright (C) 2025 BayLibre, SAS
*/
#include <linux/clk.h>
#include <linux/dev_printk.h>
#include <linux/err.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/spi/offload/provider.h>
#include <linux/spi/offload/types.h>
#include <linux/types.h>
static bool adi_util_sigma_delta_match(struct spi_offload_trigger *trigger,
enum spi_offload_trigger_type type,
u64 *args, u32 nargs)
{
return type == SPI_OFFLOAD_TRIGGER_DATA_READY && nargs == 0;
}
static const struct spi_offload_trigger_ops adi_util_sigma_delta_ops = {
.match = adi_util_sigma_delta_match,
};
static int adi_util_sigma_delta_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct spi_offload_trigger_info info = {
.fwnode = dev_fwnode(dev),
.ops = &adi_util_sigma_delta_ops,
};
struct clk *clk;
clk = devm_clk_get_enabled(dev, NULL);
if (IS_ERR(clk))
return dev_err_probe(dev, PTR_ERR(clk), "Failed to get clock\n");
return devm_spi_offload_trigger_register(dev, &info);
}
static const struct of_device_id adi_util_sigma_delta_of_match_table[] = {
{ .compatible = "adi,util-sigma-delta-spi", },
{ }
};
MODULE_DEVICE_TABLE(of, adi_util_sigma_delta_of_match_table);
static struct platform_driver adi_util_sigma_delta_driver = {
.probe = adi_util_sigma_delta_probe,
.driver = {
.name = "adi-util-sigma-delta-spi",
.of_match_table = adi_util_sigma_delta_of_match_table,
},
};
module_platform_driver(adi_util_sigma_delta_driver);
MODULE_AUTHOR("David Lechner <dlechner@baylibre.com>");
MODULE_DESCRIPTION("ADI Sigma-Delta SPI offload trigger utility driver");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/clk.h`, `linux/dev_printk.h`, `linux/err.h`, `linux/mod_devicetable.h`, `linux/module.h`, `linux/platform_device.h`, `linux/property.h`, `linux/spi/offload/provider.h`.
- Detected declarations: `function Copyright`, `function adi_util_sigma_delta_probe`.
- Atlas domain: Driver Families / drivers/spi.
- 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.