drivers/regulator/pf9453-regulator.c
Source file repositories/reference/linux-study-clean/drivers/regulator/pf9453-regulator.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/regulator/pf9453-regulator.c- Extension
.c- Size
- 23290 bytes
- Lines
- 874
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- 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/bits.hlinux/err.hlinux/gpio/consumer.hlinux/i2c.hlinux/interrupt.hlinux/kernel.hlinux/module.hlinux/of.hlinux/platform_device.hlinux/regmap.hlinux/regulator/driver.hlinux/regulator/machine.hlinux/regulator/of_regulator.h
Detected Declarations
struct pf9453_dvs_configstruct pf9453_regulator_descstruct pf9453function is_reg_protectfunction pf9453_pmic_writefunction enablefunction disablefunction pf9453_regulator_set_voltage_sel_regmapfunction find_closest_biggerfunction pf9453_regulator_set_ramp_delay_regmapfunction buck_set_dvsfunction pf9453_set_dvs_levelsfunction pf9453_irq_handlerfunction pf9453_i2c_probe
Annotated Snippet
struct pf9453_dvs_config {
unsigned int run_reg; /* dvs0 */
unsigned int run_mask;
unsigned int standby_reg; /* dvs1 */
unsigned int standby_mask;
};
struct pf9453_regulator_desc {
struct regulator_desc desc;
const struct pf9453_dvs_config dvs;
};
struct pf9453 {
struct device *dev;
struct regmap *regmap;
struct gpio_desc *sd_vsel_gpio;
int irq;
};
enum {
PF9453_BUCK1 = 0,
PF9453_BUCK2,
PF9453_BUCK3,
PF9453_BUCK4,
PF9453_LDO1,
PF9453_LDO2,
PF9453_LDOSNVS,
PF9453_REGULATOR_CNT
};
enum {
PF9453_DVS_LEVEL_RUN = 0,
PF9453_DVS_LEVEL_STANDBY,
PF9453_DVS_LEVEL_DPSTANDBY,
PF9453_DVS_LEVEL_MAX
};
#define PF9453_BUCK1_VOLTAGE_NUM 0x80
#define PF9453_BUCK2_VOLTAGE_NUM 0x80
#define PF9453_BUCK3_VOLTAGE_NUM 0x80
#define PF9453_BUCK4_VOLTAGE_NUM 0x80
#define PF9453_LDO1_VOLTAGE_NUM 0x65
#define PF9453_LDO2_VOLTAGE_NUM 0x3b
#define PF9453_LDOSNVS_VOLTAGE_NUM 0x59
enum {
PF9453_REG_DEV_ID = 0x01,
PF9453_REG_INT1 = 0x02,
PF9453_REG_INT1_MASK = 0x03,
PF9453_REG_INT1_STATUS = 0x04,
PF9453_REG_VRFLT1_INT = 0x05,
PF9453_REG_VRFLT1_MASK = 0x06,
PF9453_REG_PWRON_STAT = 0x07,
PF9453_REG_RESET_CTRL = 0x08,
PF9453_REG_SW_RST = 0x09,
PF9453_REG_PWR_CTRL = 0x0a,
PF9453_REG_CONFIG1 = 0x0b,
PF9453_REG_CONFIG2 = 0x0c,
PF9453_REG_32K_CONFIG = 0x0d,
PF9453_REG_BUCK1CTRL = 0x10,
PF9453_REG_BUCK1OUT = 0x11,
PF9453_REG_BUCK2CTRL = 0x14,
PF9453_REG_BUCK2OUT = 0x15,
PF9453_REG_BUCK2OUT_STBY = 0x1d,
PF9453_REG_BUCK2OUT_MAX_LIMIT = 0x1f,
PF9453_REG_BUCK2OUT_MIN_LIMIT = 0x20,
PF9453_REG_BUCK3CTRL = 0x21,
PF9453_REG_BUCK3OUT = 0x22,
PF9453_REG_BUCK4CTRL = 0x2e,
PF9453_REG_BUCK4OUT = 0x2f,
PF9453_REG_LDO1OUT_L = 0x36,
PF9453_REG_LDO1CFG = 0x37,
PF9453_REG_LDO1OUT_H = 0x38,
PF9453_REG_LDOSNVS_CFG1 = 0x39,
PF9453_REG_LDOSNVS_CFG2 = 0x3a,
PF9453_REG_LDO2CFG = 0x3b,
PF9453_REG_LDO2OUT = 0x3c,
PF9453_REG_BUCK_POK = 0x3d,
PF9453_REG_LSW_CTRL1 = 0x40,
PF9453_REG_LSW_CTRL2 = 0x41,
PF9453_REG_LOCK = 0x4e,
PF9453_MAX_REG
};
#define PF9453_UNLOCK_KEY 0x5c
#define PF9453_LOCK_KEY 0x0
/* PF9453 BUCK ENMODE bits */
#define BUCK_ENMODE_OFF 0x00
Annotation
- Immediate include surface: `linux/bits.h`, `linux/err.h`, `linux/gpio/consumer.h`, `linux/i2c.h`, `linux/interrupt.h`, `linux/kernel.h`, `linux/module.h`, `linux/of.h`.
- Detected declarations: `struct pf9453_dvs_config`, `struct pf9453_regulator_desc`, `struct pf9453`, `function is_reg_protect`, `function pf9453_pmic_write`, `function enable`, `function disable`, `function pf9453_regulator_set_voltage_sel_regmap`, `function find_closest_bigger`, `function pf9453_regulator_set_ramp_delay_regmap`.
- Atlas domain: Driver Families / drivers/regulator.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.