drivers/pinctrl/spear/pinctrl-spear300.c
Source file repositories/reference/linux-study-clean/drivers/pinctrl/spear/pinctrl-spear300.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/pinctrl/spear/pinctrl-spear300.c- Extension
.c- Size
- 16932 bytes
- Lines
- 686
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/err.hlinux/init.hlinux/mod_devicetable.hlinux/platform_device.hpinctrl-spear3xx.h
Detected Declarations
function spear300_pinctrl_probefunction spear300_pinctrl_init
Annotated Snippet
#include <linux/err.h>
#include <linux/init.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include "pinctrl-spear3xx.h"
#define DRIVER_NAME "spear300-pinmux"
/* addresses */
#define PMX_CONFIG_REG 0x00
#define MODE_CONFIG_REG 0x04
/* modes */
#define NAND_MODE (1 << 0)
#define NOR_MODE (1 << 1)
#define PHOTO_FRAME_MODE (1 << 2)
#define LEND_IP_PHONE_MODE (1 << 3)
#define HEND_IP_PHONE_MODE (1 << 4)
#define LEND_WIFI_PHONE_MODE (1 << 5)
#define HEND_WIFI_PHONE_MODE (1 << 6)
#define ATA_PABX_WI2S_MODE (1 << 7)
#define ATA_PABX_I2S_MODE (1 << 8)
#define CAML_LCDW_MODE (1 << 9)
#define CAMU_LCD_MODE (1 << 10)
#define CAMU_WLCD_MODE (1 << 11)
#define CAML_LCD_MODE (1 << 12)
static struct spear_pmx_mode pmx_mode_nand = {
.name = "nand",
.mode = NAND_MODE,
.reg = MODE_CONFIG_REG,
.mask = 0x0000000F,
.val = 0x00,
};
static struct spear_pmx_mode pmx_mode_nor = {
.name = "nor",
.mode = NOR_MODE,
.reg = MODE_CONFIG_REG,
.mask = 0x0000000F,
.val = 0x01,
};
static struct spear_pmx_mode pmx_mode_photo_frame = {
.name = "photo frame mode",
.mode = PHOTO_FRAME_MODE,
.reg = MODE_CONFIG_REG,
.mask = 0x0000000F,
.val = 0x02,
};
static struct spear_pmx_mode pmx_mode_lend_ip_phone = {
.name = "lend ip phone mode",
.mode = LEND_IP_PHONE_MODE,
.reg = MODE_CONFIG_REG,
.mask = 0x0000000F,
.val = 0x03,
};
static struct spear_pmx_mode pmx_mode_hend_ip_phone = {
.name = "hend ip phone mode",
.mode = HEND_IP_PHONE_MODE,
.reg = MODE_CONFIG_REG,
.mask = 0x0000000F,
.val = 0x04,
};
static struct spear_pmx_mode pmx_mode_lend_wifi_phone = {
.name = "lend wifi phone mode",
.mode = LEND_WIFI_PHONE_MODE,
.reg = MODE_CONFIG_REG,
.mask = 0x0000000F,
.val = 0x05,
};
static struct spear_pmx_mode pmx_mode_hend_wifi_phone = {
.name = "hend wifi phone mode",
.mode = HEND_WIFI_PHONE_MODE,
.reg = MODE_CONFIG_REG,
.mask = 0x0000000F,
.val = 0x06,
};
static struct spear_pmx_mode pmx_mode_ata_pabx_wi2s = {
.name = "ata pabx wi2s mode",
.mode = ATA_PABX_WI2S_MODE,
.reg = MODE_CONFIG_REG,
.mask = 0x0000000F,
.val = 0x07,
};
Annotation
- Immediate include surface: `linux/err.h`, `linux/init.h`, `linux/mod_devicetable.h`, `linux/platform_device.h`, `pinctrl-spear3xx.h`.
- Detected declarations: `function spear300_pinctrl_probe`, `function spear300_pinctrl_init`.
- 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.