1 #ifndef __NVKM_FUSE_H__
2 #define __NVKM_FUSE_H__
3 #include <core/subdev.h>
4 #include <core/device.h>
5 
6 struct nvkm_fuse {
7 	struct nvkm_subdev subdev;
8 	const struct nvkm_fuse_func *func;
9 };
10 
11 struct nvkm_fuse_func {
12 	u32 (*read)(struct nvkm_fuse *, u32 addr);
13 };
14 
15 static inline struct nvkm_fuse *
16 nvkm_fuse(void *obj)
17 {
18 	return (void *)nvkm_subdev(obj, NVDEV_SUBDEV_FUSE);
19 }
20 
21 #define nvkm_fuse_create(p, e, o, d)                                        \
22 	nvkm_fuse_create_((p), (e), (o), sizeof(**d), (void **)d)
23 
24 int  nvkm_fuse_create_(struct nvkm_object *, struct nvkm_object *,
25 			  struct nvkm_oclass *, int, void **);
26 void _nvkm_fuse_dtor(struct nvkm_object *);
27 int  _nvkm_fuse_init(struct nvkm_object *);
28 #define _nvkm_fuse_fini _nvkm_subdev_fini
29 
30 extern struct nvkm_oclass nv50_fuse_oclass;
31 extern struct nvkm_oclass gf100_fuse_oclass;
32 extern struct nvkm_oclass gm107_fuse_oclass;
33 #endif
34