drivers/pinctrl/spacemit/pinctrl-k1.h
Source file repositories/reference/linux-study-clean/drivers/pinctrl/spacemit/pinctrl-k1.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/pinctrl/spacemit/pinctrl-k1.h- Extension
.h- Size
- 937 bytes
- Lines
- 41
- 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.
Dependency Surface
linux/bits.hlinux/bitfield.hlinux/device.hlinux/mutex.hlinux/spinlock.hlinux/platform_device.hlinux/pinctrl/pinctrl.hlinux/pinctrl/pinconf.h
Detected Declarations
enum spacemit_pin_io_type
Annotated Snippet
#ifndef _PINCTRL_SPACEMIT_K1_H
#define _PINCTRL_SPACEMIT_K1_H
#include <linux/bits.h>
#include <linux/bitfield.h>
#include <linux/device.h>
#include <linux/mutex.h>
#include <linux/spinlock.h>
#include <linux/platform_device.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinconf.h>
enum spacemit_pin_io_type {
IO_TYPE_NONE = 0,
IO_TYPE_1V8,
IO_TYPE_3V3,
IO_TYPE_EXTERNAL,
};
#define PIN_POWER_STATE_1V8 1800
#define PIN_POWER_STATE_3V3 3300
#define K1_PIN_IO_TYPE GENMASK(2, 1)
#define K1_PIN_CAP_IO_TYPE(type) \
FIELD_PREP_CONST(K1_PIN_IO_TYPE, type)
#define K1_PIN_GET_IO_TYPE(val) \
FIELD_GET(K1_PIN_IO_TYPE, val)
#define K1_FUNC_PIN(_id, _gpiofunc, _io) \
{ \
.pin = (_id), \
.gpiofunc = (_gpiofunc), \
.flags = (K1_PIN_CAP_IO_TYPE(_io)), \
}
#endif /* _PINCTRL_SPACEMIT_K1_H */
Annotation
- Immediate include surface: `linux/bits.h`, `linux/bitfield.h`, `linux/device.h`, `linux/mutex.h`, `linux/spinlock.h`, `linux/platform_device.h`, `linux/pinctrl/pinctrl.h`, `linux/pinctrl/pinconf.h`.
- Detected declarations: `enum spacemit_pin_io_type`.
- 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.