drivers/gpu/drm/nouveau/include/nvkm/subdev/gpio.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/include/nvkm/subdev/gpio.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/nouveau/include/nvkm/subdev/gpio.h
Extension
.h
Size
1388 bytes
Lines
42
Domain
Driver Families
Bucket
drivers/gpu
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct nvkm_gpio_ntfy_req {
	u8 mask;
	u8 line;
};

struct nvkm_gpio_ntfy_rep {
	u8 mask;
};

struct nvkm_gpio {
	const struct nvkm_gpio_func *func;
	struct nvkm_subdev subdev;

#define NVKM_GPIO_HI       BIT(0)
#define NVKM_GPIO_LO       BIT(1)
#define NVKM_GPIO_TOGGLED (NVKM_GPIO_HI | NVKM_GPIO_LO)
	struct nvkm_event event;
};

void nvkm_gpio_reset(struct nvkm_gpio *, u8 func);
int nvkm_gpio_find(struct nvkm_gpio *, int idx, u8 tag, u8 line,
		   struct dcb_gpio_func *);
int nvkm_gpio_set(struct nvkm_gpio *, int idx, u8 tag, u8 line, int state);
int nvkm_gpio_get(struct nvkm_gpio *, int idx, u8 tag, u8 line);

int nv10_gpio_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_gpio **);
int nv50_gpio_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_gpio **);
int g94_gpio_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_gpio **);
int gf119_gpio_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_gpio **);
int gk104_gpio_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_gpio **);
int ga102_gpio_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_gpio **);
#endif

Annotation

Implementation Notes