Staging
v0.8.1
swh:1:snp:a902887e4be9191b7c6c4406aa06b31c1ce2c7cc
Raw File
Tip revision: 92d21ac74a9e3c09b0b01c764e530657e4c85c49 authored by Linus Torvalds on 11 July 2016, 03:24:59 UTC
Linux 4.7-rc7
Tip revision: 92d21ac
priv.h
#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 (*volt_get)(struct nvkm_volt *);
	int (*volt_set)(struct nvkm_volt *, u32 uv);
	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);

int nvkm_voltpwm_init(struct nvkm_volt *volt);
int nvkm_voltpwm_get(struct nvkm_volt *volt);
int nvkm_voltpwm_set(struct nvkm_volt *volt, u32 uv);
#endif
back to top