drivers/mfd/rk8xx-core.c
Source file repositories/reference/linux-study-clean/drivers/mfd/rk8xx-core.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mfd/rk8xx-core.c- Extension
.c- Size
- 26974 bytes
- Lines
- 962
- 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/bitfield.hlinux/interrupt.hlinux/mfd/rk808.hlinux/mfd/core.hlinux/module.hlinux/property.hlinux/regmap.hlinux/reboot.h
Detected Declarations
struct rk808_reg_datafunction rk816_get_irq_regfunction rk808_power_offfunction rk808_restartfunction rk8xx_shutdownfunction rk8xx_probefunction rk8xx_suspendfunction rk8xx_resumeexport rk8xx_shutdownexport rk8xx_probeexport rk8xx_suspendexport rk8xx_resume
Annotated Snippet
struct rk808_reg_data {
int addr;
int mask;
int value;
};
static const struct resource rtc_resources[] = {
DEFINE_RES_IRQ(RK808_IRQ_RTC_ALARM),
};
static const struct resource rk816_rtc_resources[] = {
DEFINE_RES_IRQ(RK816_IRQ_RTC_ALARM),
};
static const struct resource rk817_rtc_resources[] = {
DEFINE_RES_IRQ(RK817_IRQ_RTC_ALARM),
};
static const struct resource rk801_key_resources[] = {
DEFINE_RES_IRQ(RK801_IRQ_PWRON_FALL),
DEFINE_RES_IRQ(RK801_IRQ_PWRON_RISE),
};
static const struct resource rk805_key_resources[] = {
DEFINE_RES_IRQ(RK805_IRQ_PWRON_RISE),
DEFINE_RES_IRQ(RK805_IRQ_PWRON_FALL),
};
static struct resource rk806_pwrkey_resources[] = {
DEFINE_RES_IRQ(RK806_IRQ_PWRON_FALL),
DEFINE_RES_IRQ(RK806_IRQ_PWRON_RISE),
};
static const struct resource rk817_pwrkey_resources[] = {
DEFINE_RES_IRQ(RK817_IRQ_PWRON_FALL),
DEFINE_RES_IRQ(RK817_IRQ_PWRON_RISE),
};
static const struct resource rk817_charger_resources[] = {
DEFINE_RES_IRQ(RK817_IRQ_PLUG_IN),
DEFINE_RES_IRQ(RK817_IRQ_PLUG_OUT),
};
static const struct mfd_cell rk801s[] = {
{ .name = "rk808-regulator", },
{ .name = "rk805-pwrkey",
.num_resources = ARRAY_SIZE(rk801_key_resources),
.resources = &rk801_key_resources[0],
},
};
static const struct mfd_cell rk805s[] = {
{ .name = "rk808-clkout", },
{ .name = "rk808-regulator", },
{ .name = "rk805-pinctrl", },
{
.name = "rk808-rtc",
.num_resources = ARRAY_SIZE(rtc_resources),
.resources = &rtc_resources[0],
},
{ .name = "rk805-pwrkey",
.num_resources = ARRAY_SIZE(rk805_key_resources),
.resources = &rk805_key_resources[0],
},
};
static const struct mfd_cell rk806s[] = {
{ .name = "rk805-pinctrl", },
{ .name = "rk808-regulator", },
{
.name = "rk805-pwrkey",
.resources = rk806_pwrkey_resources,
.num_resources = ARRAY_SIZE(rk806_pwrkey_resources),
},
};
static const struct mfd_cell rk808s[] = {
{ .name = "rk808-clkout", },
{ .name = "rk808-regulator", },
{
.name = "rk808-rtc",
.num_resources = ARRAY_SIZE(rtc_resources),
.resources = rtc_resources,
},
};
static const struct mfd_cell rk816s[] = {
{ .name = "rk805-pinctrl", },
{ .name = "rk808-clkout", },
{ .name = "rk808-regulator", },
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/interrupt.h`, `linux/mfd/rk808.h`, `linux/mfd/core.h`, `linux/module.h`, `linux/property.h`, `linux/regmap.h`, `linux/reboot.h`.
- Detected declarations: `struct rk808_reg_data`, `function rk816_get_irq_reg`, `function rk808_power_off`, `function rk808_restart`, `function rk8xx_shutdown`, `function rk8xx_probe`, `function rk8xx_suspend`, `function rk8xx_resume`, `export rk8xx_shutdown`, `export rk8xx_probe`.
- 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.