include/linux/mfd/palmas.h
Source file repositories/reference/linux-study-clean/include/linux/mfd/palmas.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/mfd/palmas.h- Extension
.h- Size
- 152145 bytes
- Lines
- 3800
- 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/usb/otg.hlinux/leds.hlinux/regmap.hlinux/regulator/driver.hlinux/extcon-provider.hlinux/usb/phy_companion.h
Detected Declarations
struct palmas_pmicstruct palmas_gpadcstruct palmas_resourcestruct palmas_usbstruct palmas_pmic_driver_datastruct palmas_pmic_platform_datastruct palmasstruct palmas_sleep_requestor_infostruct palmas_regs_infostruct palmas_pmic_driver_datastruct palmas_gpadc_platform_datastruct palmas_reg_initstruct palmas_pmic_platform_datastruct palmas_usb_platform_datastruct palmas_resource_platform_datastruct palmas_clk_platform_datastruct palmas_platform_datastruct palmas_gpadc_calibrationstruct palmas_gpadc_resultstruct palmas_pmicstruct palmas_resourcestruct palmas_usbenum palmas_usb_stateenum palmas_regulatorsenum tps65917_regulatorsenum palmas_external_requestor_idenum tps65917_external_requestor_idenum tps65917_irqsenum palmas_irqsenum usb_irq_eventsfunction palmas_readfunction palmas_writefunction palmas_bulk_writefunction palmas_bulk_readfunction palmas_update_bitsfunction palmas_irq_get_virq
Annotated Snippet
struct palmas {
struct device *dev;
struct i2c_client *i2c_clients[PALMAS_NUM_CLIENTS];
struct regmap *regmap[PALMAS_NUM_CLIENTS];
/* Stored chip id */
int id;
unsigned int features;
/* IRQ Data */
int irq;
u32 irq_mask;
struct mutex irq_lock;
struct regmap_irq_chip_data *irq_data;
struct palmas_pmic_driver_data *pmic_ddata;
/* Child Devices */
struct palmas_pmic *pmic;
struct palmas_gpadc *gpadc;
struct palmas_resource *resource;
struct palmas_usb *usb;
/* GPIO MUXing */
u8 gpio_muxed;
u8 led_muxed;
u8 pwm_muxed;
};
#define PALMAS_EXT_REQ (PALMAS_EXT_CONTROL_ENABLE1 | \
PALMAS_EXT_CONTROL_ENABLE2 | \
PALMAS_EXT_CONTROL_NSLEEP)
struct palmas_sleep_requestor_info {
int id;
int reg_offset;
int bit_pos;
};
struct palmas_regs_info {
const char *name;
const char *sname;
u8 vsel_addr;
u8 ctrl_addr;
u8 tstep_addr;
int sleep_id;
};
struct palmas_pmic_driver_data {
int smps_start;
int smps_end;
int ldo_begin;
int ldo_end;
int max_reg;
bool has_regen3;
struct palmas_regs_info *palmas_regs_info;
struct of_regulator_match *palmas_matches;
struct palmas_sleep_requestor_info *sleep_req_info;
int (*smps_register)(struct palmas_pmic *pmic,
struct palmas_pmic_driver_data *ddata,
struct palmas_pmic_platform_data *pdata,
const char *pdev_name,
struct regulator_config config);
int (*ldo_register)(struct palmas_pmic *pmic,
struct palmas_pmic_driver_data *ddata,
struct palmas_pmic_platform_data *pdata,
const char *pdev_name,
struct regulator_config config);
};
struct palmas_gpadc_platform_data {
/* Channel 3 current source is only enabled during conversion */
int ch3_current; /* 0: off; 1: 10uA; 2: 400uA; 3: 800 uA */
/* Channel 0 current source can be used for battery detection.
* If used for battery detection this will cause a permanent current
* consumption depending on current level set here.
*/
int ch0_current; /* 0: off; 1: 5uA; 2: 15uA; 3: 20 uA */
bool extended_delay; /* use extended delay for conversion */
/* default BAT_REMOVAL_DAT setting on device probe */
int bat_removal;
/* Sets the START_POLARITY bit in the RT_CTRL register */
int start_polarity;
int auto_conversion_period_ms;
};
Annotation
- Immediate include surface: `linux/usb/otg.h`, `linux/leds.h`, `linux/regmap.h`, `linux/regulator/driver.h`, `linux/extcon-provider.h`, `linux/usb/phy_companion.h`.
- Detected declarations: `struct palmas_pmic`, `struct palmas_gpadc`, `struct palmas_resource`, `struct palmas_usb`, `struct palmas_pmic_driver_data`, `struct palmas_pmic_platform_data`, `struct palmas`, `struct palmas_sleep_requestor_info`, `struct palmas_regs_info`, `struct palmas_pmic_driver_data`.
- 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.