]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
437b2296 BS |
2 | #ifndef __NVKM_VOLT_PRIV_H__ |
3 | #define __NVKM_VOLT_PRIV_H__ | |
4 | #define nvkm_volt(p) container_of((p), struct nvkm_volt, subdev) | |
5 | #include <subdev/volt.h> | |
6 | ||
7 | void nvkm_volt_ctor(const struct nvkm_volt_func *, struct nvkm_device *, | |
8 | int index, struct nvkm_volt *); | |
9 | int nvkm_volt_new_(const struct nvkm_volt_func *, struct nvkm_device *, | |
10 | int index, struct nvkm_volt **); | |
11 | ||
12 | struct nvkm_volt_func { | |
08de5743 | 13 | int (*oneinit)(struct nvkm_volt *); |
4c58a05b MP |
14 | int (*volt_get)(struct nvkm_volt *); |
15 | int (*volt_set)(struct nvkm_volt *, u32 uv); | |
437b2296 BS |
16 | int (*vid_get)(struct nvkm_volt *); |
17 | int (*vid_set)(struct nvkm_volt *, u8 vid); | |
18 | int (*set_id)(struct nvkm_volt *, u8 id, int condition); | |
08de5743 | 19 | int (*speedo_read)(struct nvkm_volt *); |
437b2296 BS |
20 | }; |
21 | ||
22 | int nvkm_voltgpio_init(struct nvkm_volt *); | |
23 | int nvkm_voltgpio_get(struct nvkm_volt *); | |
24 | int nvkm_voltgpio_set(struct nvkm_volt *, u8); | |
1531dbbb MP |
25 | |
26 | int nvkm_voltpwm_init(struct nvkm_volt *volt); | |
27 | int nvkm_voltpwm_get(struct nvkm_volt *volt); | |
28 | int nvkm_voltpwm_set(struct nvkm_volt *volt, u32 uv); | |
08de5743 KH |
29 | |
30 | int gf100_volt_oneinit(struct nvkm_volt *); | |
437b2296 | 31 | #endif |