drivers/mfd/intel_soc_pmic_bxtwc.c
Source file repositories/reference/linux-study-clean/drivers/mfd/intel_soc_pmic_bxtwc.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mfd/intel_soc_pmic_bxtwc.c- Extension
.c- Size
- 15927 bytes
- Lines
- 631
- Domain
- Driver Families
- Bucket
- drivers/mfd
- 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.
- 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/acpi.hlinux/array_size.hlinux/bits.hlinux/delay.hlinux/device.hlinux/err.hlinux/errno.hlinux/gfp_types.hlinux/interrupt.hlinux/ioport.hlinux/kstrtox.hlinux/mfd/core.hlinux/mfd/intel_soc_pmic.hlinux/mfd/intel_soc_pmic_bxtwc.hlinux/mod_devicetable.hlinux/module.hlinux/platform_data/x86/intel_scu_ipc.hlinux/platform_device.hlinux/pm.hlinux/regmap.hlinux/sysfs.hlinux/types.h
Detected Declarations
enum bxtwc_irqsenum bxtwc_irqs_pwrbtnenum bxtwc_irqs_bcuenum bxtwc_irqs_adcenum bxtwc_irqs_chgrenum bxtwc_irqs_tmuenum bxtwc_irqs_critfunction regmap_ipc_byte_reg_readfunction regmap_ipc_byte_reg_writefunction addr_showfunction addr_storefunction val_showfunction val_storefunction bxtwc_add_chained_irq_chipfunction bxtwc_add_chained_devicesfunction bxtwc_probefunction bxtwc_shutdownfunction bxtwc_suspendfunction bxtwc_resume
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* MFD core driver for Intel Broxton Whiskey Cove PMIC
*
* Copyright (C) 2015-2017, 2022 Intel Corporation. All rights reserved.
*/
#include <linux/acpi.h>
#include <linux/array_size.h>
#include <linux/bits.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/gfp_types.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/kstrtox.h>
#include <linux/mfd/core.h>
#include <linux/mfd/intel_soc_pmic.h>
#include <linux/mfd/intel_soc_pmic_bxtwc.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_data/x86/intel_scu_ipc.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/regmap.h>
#include <linux/sysfs.h>
#include <linux/types.h>
/* PMIC device registers */
#define REG_ADDR_MASK GENMASK(15, 8)
#define REG_ADDR_SHIFT 8
#define REG_OFFSET_MASK GENMASK(7, 0)
/* Interrupt Status Registers */
#define BXTWC_IRQLVL1 0x4E02
#define BXTWC_PWRBTNIRQ 0x4E03
#define BXTWC_THRM0IRQ 0x4E04
#define BXTWC_THRM1IRQ 0x4E05
#define BXTWC_THRM2IRQ 0x4E06
#define BXTWC_BCUIRQ 0x4E07
#define BXTWC_ADCIRQ 0x4E08
#define BXTWC_CHGR0IRQ 0x4E09
#define BXTWC_CHGR1IRQ 0x4E0A
#define BXTWC_GPIOIRQ0 0x4E0B
#define BXTWC_GPIOIRQ1 0x4E0C
#define BXTWC_CRITIRQ 0x4E0D
#define BXTWC_TMUIRQ 0x4FB6
/* Interrupt MASK Registers */
#define BXTWC_MIRQLVL1 0x4E0E
#define BXTWC_MIRQLVL1_MCHGR BIT(5)
#define BXTWC_MPWRBTNIRQ 0x4E0F
#define BXTWC_MTHRM0IRQ 0x4E12
#define BXTWC_MTHRM1IRQ 0x4E13
#define BXTWC_MTHRM2IRQ 0x4E14
#define BXTWC_MBCUIRQ 0x4E15
#define BXTWC_MADCIRQ 0x4E16
#define BXTWC_MCHGR0IRQ 0x4E17
#define BXTWC_MCHGR1IRQ 0x4E18
#define BXTWC_MGPIO0IRQ 0x4E19
#define BXTWC_MGPIO1IRQ 0x4E1A
#define BXTWC_MCRITIRQ 0x4E1B
#define BXTWC_MTMUIRQ 0x4FB7
/* Whiskey Cove PMIC share same ACPI ID between different platforms */
#define BROXTON_PMIC_WC_HRV 4
#define PMC_PMIC_ACCESS 0xFF
#define PMC_PMIC_READ 0x0
#define PMC_PMIC_WRITE 0x1
enum bxtwc_irqs {
BXTWC_PWRBTN_LVL1_IRQ = 0,
BXTWC_TMU_LVL1_IRQ,
BXTWC_THRM_LVL1_IRQ,
BXTWC_BCU_LVL1_IRQ,
BXTWC_ADC_LVL1_IRQ,
BXTWC_CHGR_LVL1_IRQ,
BXTWC_GPIO_LVL1_IRQ,
BXTWC_CRIT_LVL1_IRQ,
};
enum bxtwc_irqs_pwrbtn {
BXTWC_PWRBTN_IRQ = 0,
BXTWC_UIBTN_IRQ,
};
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/array_size.h`, `linux/bits.h`, `linux/delay.h`, `linux/device.h`, `linux/err.h`, `linux/errno.h`, `linux/gfp_types.h`.
- Detected declarations: `enum bxtwc_irqs`, `enum bxtwc_irqs_pwrbtn`, `enum bxtwc_irqs_bcu`, `enum bxtwc_irqs_adc`, `enum bxtwc_irqs_chgr`, `enum bxtwc_irqs_tmu`, `enum bxtwc_irqs_crit`, `function regmap_ipc_byte_reg_read`, `function regmap_ipc_byte_reg_write`, `function addr_show`.
- Atlas domain: Driver Families / drivers/mfd.
- 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.