1#ifndef __NVKM_GPIO_H__ 2#define __NVKM_GPIO_H__ 3#include <core/subdev.h> 4#include <core/event.h> 5 6#include <subdev/bios.h> 7#include <subdev/bios/gpio.h> 8 9struct nvkm_gpio_ntfy_req { 10#define NVKM_GPIO_HI 0x01 11#define NVKM_GPIO_LO 0x02 12#define NVKM_GPIO_TOGGLED 0x03 13 u8 mask; 14 u8 line; 15}; 16 17struct nvkm_gpio_ntfy_rep { 18 u8 mask; 19}; 20 21struct nvkm_gpio { 22 const struct nvkm_gpio_func *func; 23 struct nvkm_subdev subdev; 24 25 struct nvkm_event event; 26}; 27 28void nvkm_gpio_reset(struct nvkm_gpio *, u8 func); 29int nvkm_gpio_find(struct nvkm_gpio *, int idx, u8 tag, u8 line, 30 struct dcb_gpio_func *); 31int nvkm_gpio_set(struct nvkm_gpio *, int idx, u8 tag, u8 line, int state); 32int nvkm_gpio_get(struct nvkm_gpio *, int idx, u8 tag, u8 line); 33 34int nv10_gpio_new(struct nvkm_device *, int, struct nvkm_gpio **); 35int nv50_gpio_new(struct nvkm_device *, int, struct nvkm_gpio **); 36int g94_gpio_new(struct nvkm_device *, int, struct nvkm_gpio **); 37int gf119_gpio_new(struct nvkm_device *, int, struct nvkm_gpio **); 38int gk104_gpio_new(struct nvkm_device *, int, struct nvkm_gpio **); 39#endif 40