include/linux/gpio/gpio-nomadik.h
Source file repositories/reference/linux-study-clean/include/linux/gpio/gpio-nomadik.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/gpio/gpio-nomadik.h- Extension
.h- Size
- 7236 bytes
- Lines
- 275
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct fwnode_handlestruct nmk_gpio_chipstruct prcm_gpiocr_altcxstruct prcm_gpiocr_altcx_pin_descstruct nmk_functionstruct nmk_pingroupstruct nmk_pinctrl_soc_datastruct platform_deviceenum nmk_gpio_pullenum nmk_gpio_slpmenum prcm_gpiocr_reg_indexenum prcm_gpiocr_altcx_indexfunction nmk_pinctrl_stn8815_initfunction nmk_pinctrl_db8500_initfunction nmk_gpio_dbg_show_one
Annotated Snippet
struct nmk_gpio_chip {
struct gpio_chip chip;
void __iomem *addr;
struct clk *clk;
unsigned int bank;
void (*set_ioforce)(bool enable);
spinlock_t lock;
bool sleepmode;
bool is_mobileye_soc;
/* Keep track of configured edges */
u32 edge_rising;
u32 edge_falling;
u32 real_wake;
u32 rwimsc;
u32 fwimsc;
u32 rimsc;
u32 fimsc;
u32 pull_up;
u32 lowemi;
};
/* Alternate functions: function C is set in hw by setting both A and B */
#define NMK_GPIO_ALT_GPIO 0
#define NMK_GPIO_ALT_A 1
#define NMK_GPIO_ALT_B 2
#define NMK_GPIO_ALT_C (NMK_GPIO_ALT_A | NMK_GPIO_ALT_B)
#define NMK_GPIO_ALT_CX_SHIFT 2
#define NMK_GPIO_ALT_C1 ((1<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C)
#define NMK_GPIO_ALT_C2 ((2<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C)
#define NMK_GPIO_ALT_C3 ((3<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C)
#define NMK_GPIO_ALT_C4 ((4<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C)
#define PRCM_GPIOCR_ALTCX(pin_num,\
altc1_used, altc1_ri, altc1_cb,\
altc2_used, altc2_ri, altc2_cb,\
altc3_used, altc3_ri, altc3_cb,\
altc4_used, altc4_ri, altc4_cb)\
{\
.pin = pin_num,\
.altcx[PRCM_IDX_GPIOCR_ALTC1] = {\
.used = altc1_used,\
.reg_index = altc1_ri,\
.control_bit = altc1_cb\
},\
.altcx[PRCM_IDX_GPIOCR_ALTC2] = {\
.used = altc2_used,\
.reg_index = altc2_ri,\
.control_bit = altc2_cb\
},\
.altcx[PRCM_IDX_GPIOCR_ALTC3] = {\
.used = altc3_used,\
.reg_index = altc3_ri,\
.control_bit = altc3_cb\
},\
.altcx[PRCM_IDX_GPIOCR_ALTC4] = {\
.used = altc4_used,\
.reg_index = altc4_ri,\
.control_bit = altc4_cb\
},\
}
/**
* enum prcm_gpiocr_reg_index - Used to reference a PRCM GPIOCR register address.
*/
enum prcm_gpiocr_reg_index {
PRCM_IDX_GPIOCR1,
PRCM_IDX_GPIOCR2,
PRCM_IDX_GPIOCR3
};
/**
* enum prcm_gpiocr_altcx_index - Used to reference an Other alternate-C function.
*/
enum prcm_gpiocr_altcx_index {
PRCM_IDX_GPIOCR_ALTC1,
PRCM_IDX_GPIOCR_ALTC2,
PRCM_IDX_GPIOCR_ALTC3,
PRCM_IDX_GPIOCR_ALTC4,
PRCM_IDX_GPIOCR_ALTC_MAX,
};
/**
* struct prcm_gpiocr_altcx - Other alternate-C function
* @used: other alternate-C function availability
* @reg_index: PRCM GPIOCR register index used to control the function
* @control_bit: PRCM GPIOCR bit used to control the function
*/
struct prcm_gpiocr_altcx {
bool used:1;
u8 reg_index:2;
Annotation
- Detected declarations: `struct fwnode_handle`, `struct nmk_gpio_chip`, `struct prcm_gpiocr_altcx`, `struct prcm_gpiocr_altcx_pin_desc`, `struct nmk_function`, `struct nmk_pingroup`, `struct nmk_pinctrl_soc_data`, `struct platform_device`, `enum nmk_gpio_pull`, `enum nmk_gpio_slpm`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.