drivers/mfd/sec-common.c
Source file repositories/reference/linux-study-clean/drivers/mfd/sec-common.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mfd/sec-common.c- Extension
.c- Size
- 9960 bytes
- Lines
- 363
- Domain
- Driver Families
- Bucket
- drivers/mfd
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/err.hlinux/export.hlinux/interrupt.hlinux/mfd/core.hlinux/mfd/samsung/core.hlinux/mfd/samsung/irq.hlinux/mfd/samsung/s2mps11.hlinux/mfd/samsung/s2mps13.hlinux/mfd/samsung/s2mu005.hlinux/module.hlinux/of.hlinux/pm.hlinux/pm_runtime.hlinux/regmap.hsec-core.h
Detected Declarations
function sec_pmic_dump_revfunction sec_pmic_configurefunction sec_pmic_parse_dt_pdatafunction sec_pmic_probefunction sec_pmic_shutdownfunction sec_pmic_suspendfunction sec_pmic_resumeexport sec_pmic_probeexport sec_pmic_shutdownexport sec_pmic_pm_ops
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2012 Samsung Electronics Co., Ltd
* http://www.samsung.com
* Copyright 2025 Linaro Ltd.
*
* Samsung SxM core driver
*/
#include <linux/device.h>
#include <linux/err.h>
#include <linux/export.h>
#include <linux/interrupt.h>
#include <linux/mfd/core.h>
#include <linux/mfd/samsung/core.h>
#include <linux/mfd/samsung/irq.h>
#include <linux/mfd/samsung/s2mps11.h>
#include <linux/mfd/samsung/s2mps13.h>
#include <linux/mfd/samsung/s2mu005.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/pm.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include "sec-core.h"
static const struct resource s5m8767_rtc_resources[] = {
DEFINE_RES_IRQ_NAMED(S5M8767_IRQ_RTCA1, "alarm"),
};
static const struct mfd_cell s5m8767_devs[] = {
MFD_CELL_NAME("s5m8767-pmic"),
MFD_CELL_RES("s5m-rtc", s5m8767_rtc_resources),
MFD_CELL_OF("s5m8767-clk", NULL, NULL, 0, 0, "samsung,s5m8767-clk"),
};
static const struct mfd_cell s2dos05_devs[] = {
MFD_CELL_NAME("s2dos05-regulator"),
};
static const struct resource s2mpg10_rtc_resources[] = {
DEFINE_RES_IRQ_NAMED(S2MPG10_IRQ_RTCA0, "alarm"),
};
static const struct mfd_cell s2mpg10_devs[] = {
MFD_CELL_NAME("s2mpg10-meter"),
MFD_CELL_NAME("s2mpg10-regulator"),
MFD_CELL_RES("s2mpg10-rtc", s2mpg10_rtc_resources),
MFD_CELL_OF("s2mpg10-clk", NULL, NULL, 0, 0, "samsung,s2mpg10-clk"),
MFD_CELL_OF("s2mpg10-gpio", NULL, NULL, 0, 0, "samsung,s2mpg10-gpio"),
};
static const struct mfd_cell s2mpg11_devs[] = {
MFD_CELL_NAME("s2mpg11-meter"),
MFD_CELL_NAME("s2mpg11-regulator"),
MFD_CELL_OF("s2mpg11-gpio", NULL, NULL, 0, 0, "samsung,s2mpg11-gpio"),
};
static const struct resource s2mps11_rtc_resources[] = {
DEFINE_RES_IRQ_NAMED(S2MPS11_IRQ_RTCA0, "alarm"),
};
static const struct mfd_cell s2mps11_devs[] = {
MFD_CELL_NAME("s2mps11-regulator"),
MFD_CELL_RES("s2mps14-rtc", s2mps11_rtc_resources),
MFD_CELL_OF("s2mps11-clk", NULL, NULL, 0, 0, "samsung,s2mps11-clk"),
};
static const struct resource s2mps14_rtc_resources[] = {
DEFINE_RES_IRQ_NAMED(S2MPS14_IRQ_RTCA0, "alarm"),
};
static const struct mfd_cell s2mps13_devs[] = {
MFD_CELL_NAME("s2mps13-regulator"),
MFD_CELL_RES("s2mps13-rtc", s2mps14_rtc_resources),
MFD_CELL_OF("s2mps13-clk", NULL, NULL, 0, 0, "samsung,s2mps13-clk"),
};
static const struct mfd_cell s2mps14_devs[] = {
MFD_CELL_NAME("s2mps14-regulator"),
MFD_CELL_RES("s2mps14-rtc", s2mps14_rtc_resources),
MFD_CELL_OF("s2mps14-clk", NULL, NULL, 0, 0, "samsung,s2mps14-clk"),
};
static const struct mfd_cell s2mps15_devs[] = {
MFD_CELL_NAME("s2mps15-regulator"),
MFD_CELL_RES("s2mps15-rtc", s2mps14_rtc_resources),
MFD_CELL_OF("s2mps13-clk", NULL, NULL, 0, 0, "samsung,s2mps13-clk"),
};
Annotation
- Immediate include surface: `linux/device.h`, `linux/err.h`, `linux/export.h`, `linux/interrupt.h`, `linux/mfd/core.h`, `linux/mfd/samsung/core.h`, `linux/mfd/samsung/irq.h`, `linux/mfd/samsung/s2mps11.h`.
- Detected declarations: `function sec_pmic_dump_rev`, `function sec_pmic_configure`, `function sec_pmic_parse_dt_pdata`, `function sec_pmic_probe`, `function sec_pmic_shutdown`, `function sec_pmic_suspend`, `function sec_pmic_resume`, `export sec_pmic_probe`, `export sec_pmic_shutdown`, `export sec_pmic_pm_ops`.
- Atlas domain: Driver Families / drivers/mfd.
- Implementation status: integration 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.