drivers/acpi/pmic/intel_pmic_chtwc.c
Source file repositories/reference/linux-study-clean/drivers/acpi/pmic/intel_pmic_chtwc.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/pmic/intel_pmic_chtwc.c- Extension
.c- Size
- 6850 bytes
- Lines
- 289
- 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/intel_soc_pmic.hlinux/platform_device.hlinux/regmap.hintel_pmic.h
Detected Declarations
function intel_cht_wc_pmic_get_powerfunction intel_cht_wc_pmic_update_powerfunction intel_cht_wc_exec_mipi_pmic_seq_elementfunction intel_cht_wc_pmic_opregion_probe
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* Intel CHT Whiskey Cove PMIC operation region driver
* Copyright (C) 2017 Hans de Goede <hdegoede@redhat.com>
*
* Based on various non upstream patches to support the CHT Whiskey Cove PMIC:
* Copyright (C) 2013-2015 Intel Corporation. All rights reserved.
*/
#include <linux/acpi.h>
#include <linux/init.h>
#include <linux/mfd/intel_soc_pmic.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include "intel_pmic.h"
#define CHT_WC_V1P05A_CTRL 0x6e3b
#define CHT_WC_V1P15_CTRL 0x6e3c
#define CHT_WC_V1P05A_VSEL 0x6e3d
#define CHT_WC_V1P15_VSEL 0x6e3e
#define CHT_WC_V1P8A_CTRL 0x6e56
#define CHT_WC_V1P8SX_CTRL 0x6e57
#define CHT_WC_VDDQ_CTRL 0x6e58
#define CHT_WC_V1P2A_CTRL 0x6e59
#define CHT_WC_V1P2SX_CTRL 0x6e5a
#define CHT_WC_V1P8A_VSEL 0x6e5b
#define CHT_WC_VDDQ_VSEL 0x6e5c
#define CHT_WC_V2P8SX_CTRL 0x6e5d
#define CHT_WC_V3P3A_CTRL 0x6e5e
#define CHT_WC_V3P3SD_CTRL 0x6e5f
#define CHT_WC_VSDIO_CTRL 0x6e67
#define CHT_WC_V3P3A_VSEL 0x6e68
#define CHT_WC_VPROG1A_CTRL 0x6e90
#define CHT_WC_VPROG1B_CTRL 0x6e91
#define CHT_WC_VPROG1F_CTRL 0x6e95
#define CHT_WC_VPROG2D_CTRL 0x6e99
#define CHT_WC_VPROG3A_CTRL 0x6e9a
#define CHT_WC_VPROG3B_CTRL 0x6e9b
#define CHT_WC_VPROG4A_CTRL 0x6e9c
#define CHT_WC_VPROG4B_CTRL 0x6e9d
#define CHT_WC_VPROG4C_CTRL 0x6e9e
#define CHT_WC_VPROG4D_CTRL 0x6e9f
#define CHT_WC_VPROG5A_CTRL 0x6ea0
#define CHT_WC_VPROG5B_CTRL 0x6ea1
#define CHT_WC_VPROG6A_CTRL 0x6ea2
#define CHT_WC_VPROG6B_CTRL 0x6ea3
#define CHT_WC_VPROG1A_VSEL 0x6ec0
#define CHT_WC_VPROG1B_VSEL 0x6ec1
#define CHT_WC_V1P8SX_VSEL 0x6ec2
#define CHT_WC_V1P2SX_VSEL 0x6ec3
#define CHT_WC_V1P2A_VSEL 0x6ec4
#define CHT_WC_VPROG1F_VSEL 0x6ec5
#define CHT_WC_VSDIO_VSEL 0x6ec6
#define CHT_WC_V2P8SX_VSEL 0x6ec7
#define CHT_WC_V3P3SD_VSEL 0x6ec8
#define CHT_WC_VPROG2D_VSEL 0x6ec9
#define CHT_WC_VPROG3A_VSEL 0x6eca
#define CHT_WC_VPROG3B_VSEL 0x6ecb
#define CHT_WC_VPROG4A_VSEL 0x6ecc
#define CHT_WC_VPROG4B_VSEL 0x6ecd
#define CHT_WC_VPROG4C_VSEL 0x6ece
#define CHT_WC_VPROG4D_VSEL 0x6ecf
#define CHT_WC_VPROG5A_VSEL 0x6ed0
#define CHT_WC_VPROG5B_VSEL 0x6ed1
#define CHT_WC_VPROG6A_VSEL 0x6ed2
#define CHT_WC_VPROG6B_VSEL 0x6ed3
/*
* Regulator support is based on the non upstream patch:
* "regulator: whiskey_cove: implements Whiskey Cove pmic VRF support"
* https://github.com/intel-aero/meta-intel-aero/blob/master/recipes-kernel/linux/linux-yocto/0019-regulator-whiskey_cove-implements-WhiskeyCove-pmic-V.patch
*/
static const struct pmic_table power_table[] = {
{
.address = 0x0,
.reg = CHT_WC_V1P8A_CTRL,
.bit = 0x01,
}, /* V18A */
{
.address = 0x04,
.reg = CHT_WC_V1P8SX_CTRL,
.bit = 0x07,
}, /* V18X */
{
.address = 0x08,
.reg = CHT_WC_VDDQ_CTRL,
.bit = 0x01,
}, /* VDDQ */
{
.address = 0x0c,
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/init.h`, `linux/mfd/intel_soc_pmic.h`, `linux/platform_device.h`, `linux/regmap.h`, `intel_pmic.h`.
- Detected declarations: `function intel_cht_wc_pmic_get_power`, `function intel_cht_wc_pmic_update_power`, `function intel_cht_wc_exec_mipi_pmic_seq_element`, `function intel_cht_wc_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.