drivers/mfd/sec-i2c.c
Source file repositories/reference/linux-study-clean/drivers/mfd/sec-i2c.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mfd/sec-i2c.c- Extension
.c- Size
- 6803 bytes
- Lines
- 269
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/dev_printk.hlinux/err.hlinux/i2c.hlinux/mfd/samsung/core.hlinux/mfd/samsung/s2mpa01.hlinux/mfd/samsung/s2mps11.hlinux/mfd/samsung/s2mps13.hlinux/mfd/samsung/s2mps14.hlinux/mfd/samsung/s2mps15.hlinux/mfd/samsung/s2mpu02.hlinux/mfd/samsung/s2mu005.hlinux/mfd/samsung/s5m8767.hlinux/mod_devicetable.hlinux/module.hlinux/pm.hlinux/property.hlinux/regmap.hsec-core.h
Detected Declarations
struct sec_pmic_i2c_platform_datafunction s2mpa01_volatilefunction s2mps11_volatilefunction s2mpu02_volatilefunction s2mu005_volatilefunction sec_pmic_i2c_probefunction sec_pmic_i2c_shutdown
Annotated Snippet
struct sec_pmic_i2c_platform_data {
const struct regmap_config *regmap_cfg;
int device_type;
};
static bool s2mpa01_volatile(struct device *dev, unsigned int reg)
{
switch (reg) {
case S2MPA01_REG_INT1M:
case S2MPA01_REG_INT2M:
case S2MPA01_REG_INT3M:
return false;
default:
return true;
}
}
static bool s2mps11_volatile(struct device *dev, unsigned int reg)
{
switch (reg) {
case S2MPS11_REG_INT1M:
case S2MPS11_REG_INT2M:
case S2MPS11_REG_INT3M:
return false;
default:
return true;
}
}
static bool s2mpu02_volatile(struct device *dev, unsigned int reg)
{
switch (reg) {
case S2MPU02_REG_INT1M:
case S2MPU02_REG_INT2M:
case S2MPU02_REG_INT3M:
return false;
default:
return true;
}
}
static bool s2mu005_volatile(struct device *dev, unsigned int reg)
{
switch (reg) {
case S2MU005_REG_CHGR_INT1M:
case S2MU005_REG_FLED_INT1M:
case S2MU005_REG_MUIC_INT1M:
case S2MU005_REG_MUIC_INT2M:
return false;
default:
return true;
}
}
static const struct regmap_config s2dos05_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
};
static const struct regmap_config s2mpa01_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.max_register = S2MPA01_REG_LDO_OVCB4,
.volatile_reg = s2mpa01_volatile,
.cache_type = REGCACHE_FLAT,
};
static const struct regmap_config s2mps11_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.max_register = S2MPS11_REG_L38CTRL,
.volatile_reg = s2mps11_volatile,
.cache_type = REGCACHE_FLAT,
};
static const struct regmap_config s2mps13_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.max_register = S2MPS13_REG_LDODSCH5,
.volatile_reg = s2mps11_volatile,
.cache_type = REGCACHE_FLAT,
};
static const struct regmap_config s2mps14_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
Annotation
- Immediate include surface: `linux/dev_printk.h`, `linux/err.h`, `linux/i2c.h`, `linux/mfd/samsung/core.h`, `linux/mfd/samsung/s2mpa01.h`, `linux/mfd/samsung/s2mps11.h`, `linux/mfd/samsung/s2mps13.h`, `linux/mfd/samsung/s2mps14.h`.
- Detected declarations: `struct sec_pmic_i2c_platform_data`, `function s2mpa01_volatile`, `function s2mps11_volatile`, `function s2mpu02_volatile`, `function s2mu005_volatile`, `function sec_pmic_i2c_probe`, `function sec_pmic_i2c_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.