include/linux/mfd/axp20x.h
Source file repositories/reference/linux-study-clean/include/linux/mfd/axp20x.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/mfd/axp20x.h- Extension
.h- Size
- 25795 bytes
- Lines
- 1029
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/regmap.h
Detected Declarations
struct axp20x_devenum axp20x_variantsenum axp192_irqsenum axp22x_irqsenum axp288_irqsenum axp313a_irqsenum axp717_irqsenum axp803_irqsenum axp806_irqsenum axp809_irqsenum axp15060_irqsfunction axp20x_read_variable_width
Annotated Snippet
struct axp20x_dev {
struct device *dev;
int irq;
unsigned long irq_flags;
struct regmap *regmap;
struct regmap_irq_chip_data *regmap_irqc;
enum axp20x_variants variant;
int nr_cells;
const struct mfd_cell *cells;
const struct regmap_config *regmap_cfg;
const struct regmap_irq_chip *regmap_irq_chip;
};
/* generic helper function for reading 9-16 bit wide regs */
static inline int axp20x_read_variable_width(struct regmap *regmap,
unsigned int reg, unsigned int width)
{
unsigned int reg_val, result;
int err;
err = regmap_read(regmap, reg, ®_val);
if (err)
return err;
result = reg_val << (width - 8);
err = regmap_read(regmap, reg + 1, ®_val);
if (err)
return err;
result |= reg_val;
return result;
}
/**
* axp20x_match_device(): Setup axp20x variant related fields
*
* @axp20x: axp20x device to setup (.dev field must be set)
* @dev: device associated with this axp20x device
*
* This lets the axp20x core configure the mfd cells and register maps
* for later use.
*/
int axp20x_match_device(struct axp20x_dev *axp20x);
/**
* axp20x_device_probe(): Probe a configured axp20x device
*
* @axp20x: axp20x device to probe (must be configured)
*
* This function lets the axp20x core register the axp20x mfd devices
* and irqchip. The axp20x device passed in must be fully configured
* with axp20x_match_device, its irq set, and regmap created.
*/
int axp20x_device_probe(struct axp20x_dev *axp20x);
/**
* axp20x_device_remove(): Remove a axp20x device
*
* @axp20x: axp20x device to remove
*
* This tells the axp20x core to remove the associated mfd devices
*/
void axp20x_device_remove(struct axp20x_dev *axp20x);
#endif /* __LINUX_MFD_AXP20X_H */
Annotation
- Immediate include surface: `linux/regmap.h`.
- Detected declarations: `struct axp20x_dev`, `enum axp20x_variants`, `enum axp192_irqs`, `enum axp22x_irqs`, `enum axp288_irqs`, `enum axp313a_irqs`, `enum axp717_irqs`, `enum axp803_irqs`, `enum axp806_irqs`, `enum axp809_irqs`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.