drivers/pinctrl/vt8500/pinctrl-wm8850.c
Source file repositories/reference/linux-study-clean/drivers/pinctrl/vt8500/pinctrl-wm8850.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/pinctrl/vt8500/pinctrl-wm8850.c- Extension
.c- Size
- 11468 bytes
- Lines
- 367
- Domain
- Driver Families
- Bucket
- drivers/pinctrl
- 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/io.hlinux/init.hlinux/pinctrl/pinctrl.hlinux/platform_device.hlinux/slab.hpinctrl-wmt.h
Detected Declarations
function wm8850_pinctrl_probe
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* Pinctrl data for Wondermedia WM8850 SoC
*
* Copyright (c) 2013 Tony Prisk <linux@prisktech.co.nz>
*/
#include <linux/io.h>
#include <linux/init.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include "pinctrl-wmt.h"
/*
* Describe the register offsets within the GPIO memory space
* The dedicated external GPIO's should always be listed in bank 0
* so they are exported in the 0..31 range which is what users
* expect.
*
* Do not reorder these banks as it will change the pin numbering
*/
static const struct wmt_pinctrl_bank_registers wm8850_banks[] = {
WMT_PINCTRL_BANK(0x40, 0x80, 0xC0, 0x00, 0x480, 0x4C0), /* 0 */
WMT_PINCTRL_BANK(0x44, 0x84, 0xC4, 0x04, 0x484, 0x4C4), /* 1 */
WMT_PINCTRL_BANK(0x48, 0x88, 0xC8, 0x08, 0x488, 0x4C8), /* 2 */
WMT_PINCTRL_BANK(0x4C, 0x8C, 0xCC, 0x0C, 0x48C, 0x4CC), /* 3 */
WMT_PINCTRL_BANK(0x50, 0x90, 0xD0, 0x10, 0x490, 0x4D0), /* 4 */
WMT_PINCTRL_BANK(0x54, 0x94, 0xD4, 0x14, 0x494, 0x4D4), /* 5 */
WMT_PINCTRL_BANK(0x58, 0x98, 0xD8, 0x18, 0x498, 0x4D8), /* 6 */
WMT_PINCTRL_BANK(0x5C, 0x9C, 0xDC, 0x1C, 0x49C, 0x4DC), /* 7 */
WMT_PINCTRL_BANK(0x60, 0xA0, 0xE0, 0x20, 0x4A0, 0x4E0), /* 8 */
WMT_PINCTRL_BANK(0x70, 0xB0, 0xF0, 0x30, 0x4B0, 0x4F0), /* 9 */
WMT_PINCTRL_BANK(0x7C, 0xBC, 0xDC, 0x3C, 0x4BC, 0x4FC), /* 10 */
};
/* Please keep sorted by bank/bit */
#define WMT_PIN_EXTGPIO0 WMT_PIN(0, 0)
#define WMT_PIN_EXTGPIO1 WMT_PIN(0, 1)
#define WMT_PIN_EXTGPIO2 WMT_PIN(0, 2)
#define WMT_PIN_EXTGPIO3 WMT_PIN(0, 3)
#define WMT_PIN_EXTGPIO4 WMT_PIN(0, 4)
#define WMT_PIN_EXTGPIO5 WMT_PIN(0, 5)
#define WMT_PIN_EXTGPIO6 WMT_PIN(0, 6)
#define WMT_PIN_EXTGPIO7 WMT_PIN(0, 7)
#define WMT_PIN_WAKEUP0 WMT_PIN(0, 16)
#define WMT_PIN_WAKEUP1 WMT_PIN(0, 17)
#define WMT_PIN_WAKEUP2 WMT_PIN(0, 18)
#define WMT_PIN_WAKEUP3 WMT_PIN(0, 19)
#define WMT_PIN_SUSGPIO0 WMT_PIN(0, 21)
#define WMT_PIN_SUSGPIO1 WMT_PIN(0, 22)
#define WMT_PIN_SD0CD WMT_PIN(0, 28)
#define WMT_PIN_VDOUT0 WMT_PIN(1, 0)
#define WMT_PIN_VDOUT1 WMT_PIN(1, 1)
#define WMT_PIN_VDOUT2 WMT_PIN(1, 2)
#define WMT_PIN_VDOUT3 WMT_PIN(1, 3)
#define WMT_PIN_VDOUT4 WMT_PIN(1, 4)
#define WMT_PIN_VDOUT5 WMT_PIN(1, 5)
#define WMT_PIN_VDOUT6 WMT_PIN(1, 6)
#define WMT_PIN_VDOUT7 WMT_PIN(1, 7)
#define WMT_PIN_VDOUT8 WMT_PIN(1, 8)
#define WMT_PIN_VDOUT9 WMT_PIN(1, 9)
#define WMT_PIN_VDOUT10 WMT_PIN(1, 10)
#define WMT_PIN_VDOUT11 WMT_PIN(1, 11)
#define WMT_PIN_VDOUT12 WMT_PIN(1, 12)
#define WMT_PIN_VDOUT13 WMT_PIN(1, 13)
#define WMT_PIN_VDOUT14 WMT_PIN(1, 14)
#define WMT_PIN_VDOUT15 WMT_PIN(1, 15)
#define WMT_PIN_VDOUT16 WMT_PIN(1, 16)
#define WMT_PIN_VDOUT17 WMT_PIN(1, 17)
#define WMT_PIN_VDOUT18 WMT_PIN(1, 18)
#define WMT_PIN_VDOUT19 WMT_PIN(1, 19)
#define WMT_PIN_VDOUT20 WMT_PIN(1, 20)
#define WMT_PIN_VDOUT21 WMT_PIN(1, 21)
#define WMT_PIN_VDOUT22 WMT_PIN(1, 22)
#define WMT_PIN_VDOUT23 WMT_PIN(1, 23)
#define WMT_PIN_VDIN0 WMT_PIN(2, 0)
#define WMT_PIN_VDIN1 WMT_PIN(2, 1)
#define WMT_PIN_VDIN2 WMT_PIN(2, 2)
#define WMT_PIN_VDIN3 WMT_PIN(2, 3)
#define WMT_PIN_VDIN4 WMT_PIN(2, 4)
#define WMT_PIN_VDIN5 WMT_PIN(2, 5)
#define WMT_PIN_VDIN6 WMT_PIN(2, 6)
#define WMT_PIN_VDIN7 WMT_PIN(2, 7)
#define WMT_PIN_SPI0_MOSI WMT_PIN(2, 24)
#define WMT_PIN_SPI0_MISO WMT_PIN(2, 25)
#define WMT_PIN_SPI0_SS WMT_PIN(2, 26)
#define WMT_PIN_SPI0_CLK WMT_PIN(2, 27)
#define WMT_PIN_SPI0_SSB WMT_PIN(2, 28)
Annotation
- Immediate include surface: `linux/io.h`, `linux/init.h`, `linux/pinctrl/pinctrl.h`, `linux/platform_device.h`, `linux/slab.h`, `pinctrl-wmt.h`.
- Detected declarations: `function wm8850_pinctrl_probe`.
- Atlas domain: Driver Families / drivers/pinctrl.
- 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.