drivers/soc/sophgo/sg2044-topsys.c
Source file repositories/reference/linux-study-clean/drivers/soc/sophgo/sg2044-topsys.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/soc/sophgo/sg2044-topsys.c- Extension
.c- Size
- 1183 bytes
- Lines
- 46
- Domain
- Driver Families
- Bucket
- drivers/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/mfd/core.hlinux/mod_devicetable.hlinux/module.hlinux/property.hlinux/resource.h
Detected Declarations
function sg2044_topsys_probe
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* Sophgo SG2044 multi-function system controller driver
*
* Copyright (C) 2025 Inochi Amaoto <inochiama@gmail.com>
*/
#include <linux/mfd/core.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/property.h>
#include <linux/resource.h>
static const struct mfd_cell sg2044_topsys_subdev[] = {
{
.name = "sg2044-pll",
},
};
static int sg2044_topsys_probe(struct platform_device *pdev)
{
return devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO,
sg2044_topsys_subdev,
ARRAY_SIZE(sg2044_topsys_subdev),
NULL, 0, NULL);
}
static const struct of_device_id sg2044_topsys_of_match[] = {
{ .compatible = "sophgo,sg2044-top-syscon" },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, sg2044_topsys_of_match);
static struct platform_driver sg2044_topsys_driver = {
.probe = sg2044_topsys_probe,
.driver = {
.name = "sg2044-topsys",
.of_match_table = sg2044_topsys_of_match,
},
};
module_platform_driver(sg2044_topsys_driver);
MODULE_AUTHOR("Inochi Amaoto <inochiama@gmail.com>");
MODULE_DESCRIPTION("Sophgo SG2044 multi-function system controller driver");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/mfd/core.h`, `linux/mod_devicetable.h`, `linux/module.h`, `linux/property.h`, `linux/resource.h`.
- Detected declarations: `function sg2044_topsys_probe`.
- Atlas domain: Driver Families / drivers/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.