include/linux/mfd/88pm80x.h
Source file repositories/reference/linux-study-clean/include/linux/mfd/88pm80x.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/mfd/88pm80x.h- Extension
.h- Size
- 10086 bytes
- Lines
- 371
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/platform_device.hlinux/interrupt.hlinux/regmap.hlinux/atomic.h
Detected Declarations
struct pm80x_rtc_pdatastruct pm80x_subchipstruct pm80x_chipstruct pm80x_platform_datafunction pm80x_request_irqfunction pm80x_free_irqfunction pm80x_dev_suspendfunction pm80x_dev_resume
Annotated Snippet
struct pm80x_rtc_pdata {
int vrtc;
int rtc_wakeup;
};
struct pm80x_subchip {
struct i2c_client *power_page; /* chip client for power page */
struct i2c_client *gpadc_page; /* chip client for gpadc page */
struct regmap *regmap_power;
struct regmap *regmap_gpadc;
unsigned short power_page_addr; /* power page I2C address */
unsigned short gpadc_page_addr; /* gpadc page I2C address */
};
struct pm80x_chip {
struct pm80x_subchip *subchip;
struct device *dev;
struct i2c_client *client;
struct i2c_client *companion;
struct regmap *regmap;
const struct regmap_irq_chip *regmap_irq_chip;
struct regmap_irq_chip_data *irq_data;
int type;
int irq;
int irq_mode;
unsigned long wu_flag;
spinlock_t lock;
};
struct pm80x_platform_data {
struct pm80x_rtc_pdata *rtc;
/*
* For the regulator not defined, set regulators[not_defined] to be
* NULL. num_regulators are the number of regulators supposed to be
* initialized. If all regulators are not defined, set num_regulators
* to be 0.
*/
struct regulator_init_data *regulators[PM800_ID_RG_MAX];
unsigned int num_regulators;
int irq_mode; /* Clear interrupt by read/write(0/1) */
int batt_det; /* enable/disable */
int (*plat_config)(struct pm80x_chip *chip,
struct pm80x_platform_data *pdata);
};
extern const struct dev_pm_ops pm80x_pm_ops;
extern const struct regmap_config pm80x_regmap_config;
static inline int pm80x_request_irq(struct pm80x_chip *pm80x, int irq,
irq_handler_t handler, unsigned long flags,
const char *name, void *data)
{
if (!pm80x->irq_data)
return -EINVAL;
return request_threaded_irq(regmap_irq_get_virq(pm80x->irq_data, irq),
NULL, handler, flags, name, data);
}
static inline void pm80x_free_irq(struct pm80x_chip *pm80x, int irq, void *data)
{
if (!pm80x->irq_data)
return;
free_irq(regmap_irq_get_virq(pm80x->irq_data, irq), data);
}
#ifdef CONFIG_PM
static inline int pm80x_dev_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct pm80x_chip *chip = dev_get_drvdata(pdev->dev.parent);
int irq = platform_get_irq(pdev, 0);
if (device_may_wakeup(dev))
set_bit(irq, &chip->wu_flag);
return 0;
}
static inline int pm80x_dev_resume(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct pm80x_chip *chip = dev_get_drvdata(pdev->dev.parent);
int irq = platform_get_irq(pdev, 0);
if (device_may_wakeup(dev))
clear_bit(irq, &chip->wu_flag);
return 0;
}
#endif
Annotation
- Immediate include surface: `linux/platform_device.h`, `linux/interrupt.h`, `linux/regmap.h`, `linux/atomic.h`.
- Detected declarations: `struct pm80x_rtc_pdata`, `struct pm80x_subchip`, `struct pm80x_chip`, `struct pm80x_platform_data`, `function pm80x_request_irq`, `function pm80x_free_irq`, `function pm80x_dev_suspend`, `function pm80x_dev_resume`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.