drivers/pinctrl/uniphier/pinctrl-uniphier.h
Source file repositories/reference/linux-study-clean/drivers/pinctrl/uniphier/pinctrl-uniphier.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/pinctrl/uniphier/pinctrl-uniphier.h- Extension
.h- Size
- 5961 bytes
- Lines
- 189
- 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/bits.hlinux/build_bug.hlinux/kernel.hlinux/types.h
Detected Declarations
struct platform_devicestruct uniphier_pinctrl_groupstruct uniphier_pinmux_functionstruct uniphier_pinctrl_socdataenum uniphier_pin_drv_typeenum uniphier_pin_pull_dirfunction UNIPHIER_PIN_DRVCTRLfunction uniphier_pin_get_drvctrlfunction uniphier_pin_get_drv_typefunction uniphier_pin_get_pupdctrlfunction uniphier_pin_get_pull_dir
Annotated Snippet
struct uniphier_pinctrl_group {
const char *name;
const unsigned *pins;
unsigned num_pins;
const int *muxvals;
};
struct uniphier_pinmux_function {
const char *name;
const char * const *groups;
unsigned num_groups;
};
struct uniphier_pinctrl_socdata {
const struct pinctrl_pin_desc *pins;
unsigned int npins;
const struct uniphier_pinctrl_group *groups;
int groups_count;
const struct uniphier_pinmux_function *functions;
int functions_count;
int (*get_gpio_muxval)(unsigned int pin, unsigned int gpio_offset);
unsigned int caps;
#define UNIPHIER_PINCTRL_CAPS_PERPIN_IECTRL BIT(1)
#define UNIPHIER_PINCTRL_CAPS_DBGMUX_SEPARATE BIT(0)
};
#define UNIPHIER_PINCTRL_PIN(a, b, c, d, e, f, g) \
{ \
.number = a, \
.name = b, \
.drv_data = (void *)UNIPHIER_PIN_ATTR_PACKED(c, d, e, f, g), \
}
#define __UNIPHIER_PINCTRL_GROUP(grp, mux) \
{ \
.name = #grp, \
.pins = grp##_pins, \
.num_pins = ARRAY_SIZE(grp##_pins), \
.muxvals = mux, \
}
#define UNIPHIER_PINCTRL_GROUP(grp) \
__UNIPHIER_PINCTRL_GROUP(grp, \
grp##_muxvals + \
BUILD_BUG_ON_ZERO(ARRAY_SIZE(grp##_pins) != \
ARRAY_SIZE(grp##_muxvals)))
#define UNIPHIER_PINCTRL_GROUP_GPIO(grp) \
__UNIPHIER_PINCTRL_GROUP(grp, NULL)
#define UNIPHIER_PINMUX_FUNCTION(func) \
{ \
.name = #func, \
.groups = func##_groups, \
.num_groups = ARRAY_SIZE(func##_groups), \
}
int uniphier_pinctrl_probe(struct platform_device *pdev,
const struct uniphier_pinctrl_socdata *socdata);
extern const struct dev_pm_ops uniphier_pinctrl_pm_ops;
#endif /* __PINCTRL_UNIPHIER_H__ */
Annotation
- Immediate include surface: `linux/bits.h`, `linux/build_bug.h`, `linux/kernel.h`, `linux/types.h`.
- Detected declarations: `struct platform_device`, `struct uniphier_pinctrl_group`, `struct uniphier_pinmux_function`, `struct uniphier_pinctrl_socdata`, `enum uniphier_pin_drv_type`, `enum uniphier_pin_pull_dir`, `function UNIPHIER_PIN_DRVCTRL`, `function uniphier_pin_get_drvctrl`, `function uniphier_pin_get_drv_type`, `function uniphier_pin_get_pupdctrl`.
- 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.