drivers/acpi/pmic/intel_pmic_xpower.c
Source file repositories/reference/linux-study-clean/drivers/acpi/pmic/intel_pmic_xpower.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/pmic/intel_pmic_xpower.c- Extension
.c- Size
- 8362 bytes
- Lines
- 369
- Domain
- Driver Families
- Bucket
- drivers/acpi
- 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/acpi.hlinux/init.hlinux/mfd/axp20x.hlinux/regmap.hlinux/platform_device.hasm/iosf_mbi.hintel_pmic.h
Detected Declarations
function intel_xpower_pmic_get_powerfunction intel_xpower_pmic_update_powerfunction intel_xpower_pmic_get_raw_tempfunction intel_xpower_exec_mipi_pmic_seq_elementfunction intel_xpower_lpat_raw_to_tempfunction intel_xpower_pmic_gpio_handlerfunction intel_xpower_pmic_opregion_probe
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* XPower AXP288 PMIC operation region driver
*
* Copyright (C) 2014 Intel Corporation. All rights reserved.
*/
#include <linux/acpi.h>
#include <linux/init.h>
#include <linux/mfd/axp20x.h>
#include <linux/regmap.h>
#include <linux/platform_device.h>
#include <asm/iosf_mbi.h>
#include "intel_pmic.h"
#define XPOWER_GPADC_LOW 0x5b
#define XPOWER_GPI1_CTRL 0x92
#define GPI1_LDO_MASK GENMASK(2, 0)
#define GPI1_LDO_ON (3 << 0)
#define GPI1_LDO_OFF (4 << 0)
#define AXP288_ADC_TS_CURRENT_ON_OFF_MASK GENMASK(1, 0)
#define AXP288_ADC_TS_CURRENT_OFF (0 << 0)
#define AXP288_ADC_TS_CURRENT_ON_WHEN_CHARGING (1 << 0)
#define AXP288_ADC_TS_CURRENT_ON_ONDEMAND (2 << 0)
#define AXP288_ADC_TS_CURRENT_ON (3 << 0)
static const struct pmic_table power_table[] = {
{
.address = 0x00,
.reg = 0x13,
.bit = 0x05,
}, /* ALD1 */
{
.address = 0x04,
.reg = 0x13,
.bit = 0x06,
}, /* ALD2 */
{
.address = 0x08,
.reg = 0x13,
.bit = 0x07,
}, /* ALD3 */
{
.address = 0x0c,
.reg = 0x12,
.bit = 0x03,
}, /* DLD1 */
{
.address = 0x10,
.reg = 0x12,
.bit = 0x04,
}, /* DLD2 */
{
.address = 0x14,
.reg = 0x12,
.bit = 0x05,
}, /* DLD3 */
{
.address = 0x18,
.reg = 0x12,
.bit = 0x06,
}, /* DLD4 */
{
.address = 0x1c,
.reg = 0x12,
.bit = 0x00,
}, /* ELD1 */
{
.address = 0x20,
.reg = 0x12,
.bit = 0x01,
}, /* ELD2 */
{
.address = 0x24,
.reg = 0x12,
.bit = 0x02,
}, /* ELD3 */
{
.address = 0x28,
.reg = 0x13,
.bit = 0x02,
}, /* FLD1 */
{
.address = 0x2c,
.reg = 0x13,
.bit = 0x03,
}, /* FLD2 */
{
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/init.h`, `linux/mfd/axp20x.h`, `linux/regmap.h`, `linux/platform_device.h`, `asm/iosf_mbi.h`, `intel_pmic.h`.
- Detected declarations: `function intel_xpower_pmic_get_power`, `function intel_xpower_pmic_update_power`, `function intel_xpower_pmic_get_raw_temp`, `function intel_xpower_exec_mipi_pmic_seq_element`, `function intel_xpower_lpat_raw_to_temp`, `function intel_xpower_pmic_gpio_handler`, `function intel_xpower_pmic_opregion_probe`.
- Atlas domain: Driver Families / drivers/acpi.
- 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.