2015-01-14 05:02:59 +00:00
|
|
|
#ifndef __NVKM_GPIO_H__
|
|
|
|
#define __NVKM_GPIO_H__
|
2012-07-10 02:20:17 +00:00
|
|
|
#include <core/subdev.h>
|
2013-02-03 02:56:16 +00:00
|
|
|
#include <core/event.h>
|
2011-11-21 06:41:48 +00:00
|
|
|
|
2012-07-10 02:20:17 +00:00
|
|
|
#include <subdev/bios.h>
|
|
|
|
#include <subdev/bios/gpio.h>
|
2011-11-21 06:41:48 +00:00
|
|
|
|
2014-08-09 18:10:20 +00:00
|
|
|
struct nvkm_gpio_ntfy_req {
|
|
|
|
#define NVKM_GPIO_HI 0x01
|
|
|
|
#define NVKM_GPIO_LO 0x02
|
|
|
|
#define NVKM_GPIO_TOGGLED 0x03
|
|
|
|
u8 mask;
|
|
|
|
u8 line;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct nvkm_gpio_ntfy_rep {
|
|
|
|
u8 mask;
|
2014-05-13 05:54:17 +00:00
|
|
|
};
|
|
|
|
|
2015-01-14 05:02:59 +00:00
|
|
|
struct nvkm_gpio {
|
2015-08-20 04:54:20 +00:00
|
|
|
const struct nvkm_gpio_func *func;
|
2015-08-20 04:54:06 +00:00
|
|
|
struct nvkm_subdev subdev;
|
2011-11-21 06:41:48 +00:00
|
|
|
|
2014-08-09 18:10:20 +00:00
|
|
|
struct nvkm_event event;
|
2012-07-10 02:20:17 +00:00
|
|
|
};
|
|
|
|
|
2015-08-20 04:54:20 +00:00
|
|
|
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 *, int, struct nvkm_gpio **);
|
|
|
|
int nv50_gpio_new(struct nvkm_device *, int, struct nvkm_gpio **);
|
|
|
|
int g94_gpio_new(struct nvkm_device *, int, struct nvkm_gpio **);
|
|
|
|
int gf119_gpio_new(struct nvkm_device *, int, struct nvkm_gpio **);
|
|
|
|
int gk104_gpio_new(struct nvkm_device *, int, struct nvkm_gpio **);
|
2011-11-21 06:41:48 +00:00
|
|
|
#endif
|