summaryrefslogtreecommitdiff
path: root/drm/nouveau/nvkm/subdev/volt/priv.h
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-08-20 14:54:21 +1000
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 12:37:43 +1000
commit54737ea0cd678f4ff03bbecea4dd5e4b76b727d4 (patch)
tree17fab70ff4d0d7cf8807f9dd9fa4071a3584c325 /drm/nouveau/nvkm/subdev/volt/priv.h
parenta5e79d64ae09b505842ac16a23623271cee5a0a1 (diff)
downloadnouveau-54737ea0cd678f4ff03bbecea4dd5e4b76b727d4.tar.gz
volt: convert to new-style nvkm_subdev
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drm/nouveau/nvkm/subdev/volt/priv.h')
-rw-r--r--drm/nouveau/nvkm/subdev/volt/priv.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/drm/nouveau/nvkm/subdev/volt/priv.h b/drm/nouveau/nvkm/subdev/volt/priv.h
new file mode 100644
index 000000000..394f37c72
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/volt/priv.h
@@ -0,0 +1,20 @@
+#ifndef __NVKM_VOLT_PRIV_H__
+#define __NVKM_VOLT_PRIV_H__
+#define nvkm_volt(p) container_of((p), struct nvkm_volt, subdev)
+#include <subdev/volt.h>
+
+void nvkm_volt_ctor(const struct nvkm_volt_func *, struct nvkm_device *,
+ int index, struct nvkm_volt *);
+int nvkm_volt_new_(const struct nvkm_volt_func *, struct nvkm_device *,
+ int index, struct nvkm_volt **);
+
+struct nvkm_volt_func {
+ int (*vid_get)(struct nvkm_volt *);
+ int (*vid_set)(struct nvkm_volt *, u8 vid);
+ int (*set_id)(struct nvkm_volt *, u8 id, int condition);
+};
+
+int nvkm_voltgpio_init(struct nvkm_volt *);
+int nvkm_voltgpio_get(struct nvkm_volt *);
+int nvkm_voltgpio_set(struct nvkm_volt *, u8);
+#endif