drivers/regulator/bd96801-regulator.c
Source file repositories/reference/linux-study-clean/drivers/regulator/bd96801-regulator.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/regulator/bd96801-regulator.c- Extension
.c- Size
- 41176 bytes
- Lines
- 1353
- Domain
- Driver Families
- Bucket
- drivers/regulator
- 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/cleanup.hlinux/delay.hlinux/err.hlinux/interrupt.hlinux/kernel.hlinux/linear_range.hlinux/mfd/rohm-generic.hlinux/mfd/rohm-bd96801.hlinux/module.hlinux/of.hlinux/platform_device.hlinux/regmap.hlinux/regulator/coupler.hlinux/regulator/driver.hlinux/regulator/machine.hlinux/regulator/of_regulator.hlinux/slab.hlinux/timer.h
Detected Declarations
struct bd96801_irqinfostruct bd96801_irq_descstruct bd96801_regulator_datastruct bd96801_pmic_datafunction ldo_map_notiffunction bd96801_list_voltage_lrfunction buck_get_initial_voltagefunction get_ldo_initial_voltagefunction get_initial_voltagefunction bd96801_walk_regulator_dtfunction initialize_pmic_datafunction bd96801_map_event_allfunction bd96801_rdev_errb_irqsfunction bd96801_global_errb_irqsfunction bd96801_rdev_intb_irqsfunction bd96801_probe
Annotated Snippet
struct bd96801_irqinfo {
int type;
struct regulator_irq_desc irq_desc;
int err_cfg;
int wrn_cfg;
const char *irq_name;
};
#define BD96801_IRQINFO(_type, _name, _irqoff_ms, _irqname) \
{ \
.type = (_type), \
.err_cfg = -1, \
.wrn_cfg = -1, \
.irq_name = (_irqname), \
.irq_desc = { \
.name = (_name), \
.irq_off_ms = (_irqoff_ms), \
.map_event = regulator_irq_map_event_simple, \
}, \
}
static const struct bd96801_irqinfo buck1_irqinfo[] = {
BD96801_IRQINFO(BD96801_PROT_OCP, "buck1-over-curr-h", 500,
"buck1-overcurr-h"),
BD96801_IRQINFO(BD96801_PROT_OCP, "buck1-over-curr-l", 500,
"buck1-overcurr-l"),
BD96801_IRQINFO(BD96801_PROT_OCP, "buck1-over-curr-n", 500,
"buck1-overcurr-n"),
BD96801_IRQINFO(BD96801_PROT_OVP, "buck1-over-voltage", 500,
"buck1-overvolt"),
BD96801_IRQINFO(BD96801_PROT_UVP, "buck1-under-voltage", 500,
"buck1-undervolt"),
BD96801_IRQINFO(BD96801_PROT_TEMP, "buck1-over-temp", 500,
"buck1-thermal")
};
static const struct bd96801_irqinfo buck2_irqinfo[] = {
BD96801_IRQINFO(BD96801_PROT_OCP, "buck2-over-curr-h", 500,
"buck2-overcurr-h"),
BD96801_IRQINFO(BD96801_PROT_OCP, "buck2-over-curr-l", 500,
"buck2-overcurr-l"),
BD96801_IRQINFO(BD96801_PROT_OCP, "buck2-over-curr-n", 500,
"buck2-overcurr-n"),
BD96801_IRQINFO(BD96801_PROT_OVP, "buck2-over-voltage", 500,
"buck2-overvolt"),
BD96801_IRQINFO(BD96801_PROT_UVP, "buck2-under-voltage", 500,
"buck2-undervolt"),
BD96801_IRQINFO(BD96801_PROT_TEMP, "buck2-over-temp", 500,
"buck2-thermal")
};
static const struct bd96801_irqinfo buck3_irqinfo[] = {
BD96801_IRQINFO(BD96801_PROT_OCP, "buck3-over-curr-h", 500,
"buck3-overcurr-h"),
BD96801_IRQINFO(BD96801_PROT_OCP, "buck3-over-curr-l", 500,
"buck3-overcurr-l"),
BD96801_IRQINFO(BD96801_PROT_OCP, "buck3-over-curr-n", 500,
"buck3-overcurr-n"),
BD96801_IRQINFO(BD96801_PROT_OVP, "buck3-over-voltage", 500,
"buck3-overvolt"),
BD96801_IRQINFO(BD96801_PROT_UVP, "buck3-under-voltage", 500,
"buck3-undervolt"),
BD96801_IRQINFO(BD96801_PROT_TEMP, "buck3-over-temp", 500,
"buck3-thermal")
};
static const struct bd96801_irqinfo buck4_irqinfo[] = {
BD96801_IRQINFO(BD96801_PROT_OCP, "buck4-over-curr-h", 500,
"buck4-overcurr-h"),
BD96801_IRQINFO(BD96801_PROT_OCP, "buck4-over-curr-l", 500,
"buck4-overcurr-l"),
BD96801_IRQINFO(BD96801_PROT_OCP, "buck4-over-curr-n", 500,
"buck4-overcurr-n"),
BD96801_IRQINFO(BD96801_PROT_OVP, "buck4-over-voltage", 500,
"buck4-overvolt"),
BD96801_IRQINFO(BD96801_PROT_UVP, "buck4-under-voltage", 500,
"buck4-undervolt"),
BD96801_IRQINFO(BD96801_PROT_TEMP, "buck4-over-temp", 500,
"buck4-thermal")
};
static const struct bd96801_irqinfo ldo5_irqinfo[] = {
BD96801_IRQINFO(BD96801_PROT_OCP, "ldo5-overcurr", 500,
"ldo5-overcurr"),
BD96801_IRQINFO(BD96801_PROT_OVP, "ldo5-over-voltage", 500,
"ldo5-overvolt"),
BD96801_IRQINFO(BD96801_PROT_UVP, "ldo5-under-voltage", 500,
"ldo5-undervolt"),
};
Annotation
- Immediate include surface: `linux/cleanup.h`, `linux/delay.h`, `linux/err.h`, `linux/interrupt.h`, `linux/kernel.h`, `linux/linear_range.h`, `linux/mfd/rohm-generic.h`, `linux/mfd/rohm-bd96801.h`.
- Detected declarations: `struct bd96801_irqinfo`, `struct bd96801_irq_desc`, `struct bd96801_regulator_data`, `struct bd96801_pmic_data`, `function ldo_map_notif`, `function bd96801_list_voltage_lr`, `function buck_get_initial_voltage`, `function get_ldo_initial_voltage`, `function get_initial_voltage`, `function bd96801_walk_regulator_dt`.
- Atlas domain: Driver Families / drivers/regulator.
- 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.