18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: MIT */
28c2ecf20Sopenharmony_ci#ifndef __NVIF_DRIVER_H__
38c2ecf20Sopenharmony_ci#define __NVIF_DRIVER_H__
48c2ecf20Sopenharmony_ci#include <nvif/os.h>
58c2ecf20Sopenharmony_cistruct nvif_client;
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_cistruct nvif_driver {
88c2ecf20Sopenharmony_ci	const char *name;
98c2ecf20Sopenharmony_ci	int (*init)(const char *name, u64 device, const char *cfg,
108c2ecf20Sopenharmony_ci		    const char *dbg, void **priv);
118c2ecf20Sopenharmony_ci	void (*fini)(void *priv);
128c2ecf20Sopenharmony_ci	int (*suspend)(void *priv);
138c2ecf20Sopenharmony_ci	int (*resume)(void *priv);
148c2ecf20Sopenharmony_ci	int (*ioctl)(void *priv, bool super, void *data, u32 size, void **hack);
158c2ecf20Sopenharmony_ci	void __iomem *(*map)(void *priv, u64 handle, u32 size);
168c2ecf20Sopenharmony_ci	void (*unmap)(void *priv, void __iomem *ptr, u32 size);
178c2ecf20Sopenharmony_ci	bool keep;
188c2ecf20Sopenharmony_ci};
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciint nvif_driver_init(const char *drv, const char *cfg, const char *dbg,
218c2ecf20Sopenharmony_ci		     const char *name, u64 device, struct nvif_client *);
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ciextern const struct nvif_driver nvif_driver_nvkm;
248c2ecf20Sopenharmony_ciextern const struct nvif_driver nvif_driver_drm;
258c2ecf20Sopenharmony_ciextern const struct nvif_driver nvif_driver_lib;
268c2ecf20Sopenharmony_ciextern const struct nvif_driver nvif_driver_null;
278c2ecf20Sopenharmony_ci#endif
28