162306a36Sopenharmony_ci/* SPDX-License-Identifier: MIT */
262306a36Sopenharmony_ci#ifndef __NVIF_DRIVER_H__
362306a36Sopenharmony_ci#define __NVIF_DRIVER_H__
462306a36Sopenharmony_ci#include <nvif/os.h>
562306a36Sopenharmony_cistruct nvif_client;
662306a36Sopenharmony_ci
762306a36Sopenharmony_cistruct nvif_driver {
862306a36Sopenharmony_ci	const char *name;
962306a36Sopenharmony_ci	int (*init)(const char *name, u64 device, const char *cfg,
1062306a36Sopenharmony_ci		    const char *dbg, void **priv);
1162306a36Sopenharmony_ci	void (*fini)(void *priv);
1262306a36Sopenharmony_ci	int (*suspend)(void *priv);
1362306a36Sopenharmony_ci	int (*resume)(void *priv);
1462306a36Sopenharmony_ci	int (*ioctl)(void *priv, void *data, u32 size, void **hack);
1562306a36Sopenharmony_ci	void __iomem *(*map)(void *priv, u64 handle, u32 size);
1662306a36Sopenharmony_ci	void (*unmap)(void *priv, void __iomem *ptr, u32 size);
1762306a36Sopenharmony_ci	bool keep;
1862306a36Sopenharmony_ci};
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ciint nvif_driver_init(const char *drv, const char *cfg, const char *dbg,
2162306a36Sopenharmony_ci		     const char *name, u64 device, struct nvif_client *);
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ciextern const struct nvif_driver nvif_driver_nvkm;
2462306a36Sopenharmony_ciextern const struct nvif_driver nvif_driver_drm;
2562306a36Sopenharmony_ciextern const struct nvif_driver nvif_driver_lib;
2662306a36Sopenharmony_ciextern const struct nvif_driver nvif_driver_null;
2762306a36Sopenharmony_ci#endif
28