drivers/mfd/sec-acpm.c
Source file repositories/reference/linux-study-clean/drivers/mfd/sec-acpm.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mfd/sec-acpm.c- Extension
.c- Size
- 18819 bytes
- Lines
- 585
- Domain
- Driver Families
- Bucket
- drivers/mfd
- 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.
- 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/array_size.hlinux/bitops.hlinux/device.hlinux/firmware/samsung/exynos-acpm-protocol.hlinux/mfd/samsung/core.hlinux/mfd/samsung/rtc.hlinux/mfd/samsung/s2mpg10.hlinux/mfd/samsung/s2mpg11.hlinux/mod_devicetable.hlinux/module.hlinux/of.hlinux/platform_device.hlinux/pm.hlinux/property.hlinux/regmap.hsec-core.h
Detected Declarations
struct sec_pmic_acpm_platform_datastruct sec_pmic_acpm_shared_bus_contextstruct sec_pmic_acpm_bus_contextenum sec_pmic_acpm_accesstypefunction sec_pmic_acpm_bus_writefunction sec_pmic_acpm_bus_readfunction sec_pmic_acpm_bus_reg_update_bitsfunction sec_pmic_acpm_probefunction sec_pmic_acpm_shutdown
Annotated Snippet
struct sec_pmic_acpm_platform_data {
int device_type;
unsigned int acpm_chan_id;
u8 speedy_channel;
const struct regmap_config *regmap_cfg_common;
const struct regmap_config *regmap_cfg_pmic;
const struct regmap_config *regmap_cfg_rtc;
const struct regmap_config *regmap_cfg_meter;
};
static const struct regmap_range s2mpg10_common_registers[] = {
regmap_reg_range(0x00, 0x02), /* CHIP_ID_M, INT, INT_MASK */
regmap_reg_range(0x0a, 0x0c), /* Speedy control */
regmap_reg_range(0x1a, 0x2a), /* Debug */
};
static const struct regmap_range s2mpg10_common_ro_registers[] = {
regmap_reg_range(0x00, 0x01), /* CHIP_ID_M, INT */
regmap_reg_range(0x28, 0x2a), /* Debug */
};
static const struct regmap_range s2mpg10_common_nonvolatile_registers[] = {
regmap_reg_range(0x00, 0x00), /* CHIP_ID_M */
regmap_reg_range(0x02, 0x02), /* INT_MASK */
regmap_reg_range(0x0a, 0x0c), /* Speedy control */
};
static const struct regmap_range s2mpg10_common_precious_registers[] = {
regmap_reg_range(0x01, 0x01), /* INT */
};
static const struct regmap_access_table s2mpg10_common_wr_table = {
.yes_ranges = s2mpg10_common_registers,
.n_yes_ranges = ARRAY_SIZE(s2mpg10_common_registers),
.no_ranges = s2mpg10_common_ro_registers,
.n_no_ranges = ARRAY_SIZE(s2mpg10_common_ro_registers),
};
static const struct regmap_access_table s2mpg10_common_rd_table = {
.yes_ranges = s2mpg10_common_registers,
.n_yes_ranges = ARRAY_SIZE(s2mpg10_common_registers),
};
static const struct regmap_access_table s2mpg10_common_volatile_table = {
.no_ranges = s2mpg10_common_nonvolatile_registers,
.n_no_ranges = ARRAY_SIZE(s2mpg10_common_nonvolatile_registers),
};
static const struct regmap_access_table s2mpg10_common_precious_table = {
.yes_ranges = s2mpg10_common_precious_registers,
.n_yes_ranges = ARRAY_SIZE(s2mpg10_common_precious_registers),
};
static const struct regmap_config s2mpg10_regmap_config_common = {
.name = "common",
.reg_bits = ACPM_ADDR_BITS,
.val_bits = 8,
.max_register = S2MPG10_COMMON_SPD_DEBUG4,
.wr_table = &s2mpg10_common_wr_table,
.rd_table = &s2mpg10_common_rd_table,
.volatile_table = &s2mpg10_common_volatile_table,
.precious_table = &s2mpg10_common_precious_table,
.num_reg_defaults_raw = S2MPG10_COMMON_SPD_DEBUG4 + 1,
.cache_type = REGCACHE_FLAT,
};
static const struct regmap_range s2mpg10_pmic_registers[] = {
regmap_reg_range(0x00, 0xf6), /* All PMIC registers */
};
static const struct regmap_range s2mpg10_pmic_ro_registers[] = {
regmap_reg_range(0x00, 0x05), /* INTx */
regmap_reg_range(0x0c, 0x0f), /* STATUSx PWRONSRC OFFSRC */
regmap_reg_range(0xc7, 0xc7), /* GPIO input */
};
static const struct regmap_range s2mpg10_pmic_nonvolatile_registers[] = {
regmap_reg_range(0x06, 0x0b), /* INTxM */
};
static const struct regmap_range s2mpg10_pmic_precious_registers[] = {
regmap_reg_range(0x00, 0x05), /* INTx */
};
static const struct regmap_access_table s2mpg10_pmic_wr_table = {
.yes_ranges = s2mpg10_pmic_registers,
.n_yes_ranges = ARRAY_SIZE(s2mpg10_pmic_registers),
.no_ranges = s2mpg10_pmic_ro_registers,
Annotation
- Immediate include surface: `linux/array_size.h`, `linux/bitops.h`, `linux/device.h`, `linux/firmware/samsung/exynos-acpm-protocol.h`, `linux/mfd/samsung/core.h`, `linux/mfd/samsung/rtc.h`, `linux/mfd/samsung/s2mpg10.h`, `linux/mfd/samsung/s2mpg11.h`.
- Detected declarations: `struct sec_pmic_acpm_platform_data`, `struct sec_pmic_acpm_shared_bus_context`, `struct sec_pmic_acpm_bus_context`, `enum sec_pmic_acpm_accesstype`, `function sec_pmic_acpm_bus_write`, `function sec_pmic_acpm_bus_read`, `function sec_pmic_acpm_bus_reg_update_bits`, `function sec_pmic_acpm_probe`, `function sec_pmic_acpm_shutdown`.
- Atlas domain: Driver Families / drivers/mfd.
- 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.