]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - drivers/gpu/drm/nouveau/nvkm/subdev/volt/priv.h
UBUNTU: Ubuntu-4.13.0-45.50
[mirror_ubuntu-artful-kernel.git] / drivers / gpu / drm / nouveau / nvkm / subdev / volt / priv.h
1 #ifndef __NVKM_VOLT_PRIV_H__
2 #define __NVKM_VOLT_PRIV_H__
3 #define nvkm_volt(p) container_of((p), struct nvkm_volt, subdev)
4 #include <subdev/volt.h>
5
6 void nvkm_volt_ctor(const struct nvkm_volt_func *, struct nvkm_device *,
7 int index, struct nvkm_volt *);
8 int nvkm_volt_new_(const struct nvkm_volt_func *, struct nvkm_device *,
9 int index, struct nvkm_volt **);
10
11 struct nvkm_volt_func {
12 int (*oneinit)(struct nvkm_volt *);
13 int (*volt_get)(struct nvkm_volt *);
14 int (*volt_set)(struct nvkm_volt *, u32 uv);
15 int (*vid_get)(struct nvkm_volt *);
16 int (*vid_set)(struct nvkm_volt *, u8 vid);
17 int (*set_id)(struct nvkm_volt *, u8 id, int condition);
18 int (*speedo_read)(struct nvkm_volt *);
19 };
20
21 int nvkm_voltgpio_init(struct nvkm_volt *);
22 int nvkm_voltgpio_get(struct nvkm_volt *);
23 int nvkm_voltgpio_set(struct nvkm_volt *, u8);
24
25 int nvkm_voltpwm_init(struct nvkm_volt *volt);
26 int nvkm_voltpwm_get(struct nvkm_volt *volt);
27 int nvkm_voltpwm_set(struct nvkm_volt *volt, u32 uv);
28
29 int gf100_volt_oneinit(struct nvkm_volt *);
30 #endif