]> Pileus Git - ~andy/linux/blobdiff - drivers/gpu/drm/nouveau/core/include/subdev/therm.h
drm/nva3/therm: add support for hardware fan tachometer
[~andy/linux] / drivers / gpu / drm / nouveau / core / include / subdev / therm.h
index faee569fd4581c6ef43cacc7db1b09f819f21137..a96d43ad972bf39d1dc993499a59019757a5576b 100644 (file)
@@ -46,13 +46,28 @@ nouveau_therm(void *obj)
 }
 
 #define nouveau_therm_create(p,e,o,d)                                          \
-       nouveau_subdev_create((p), (e), (o), 0, "THERM", "therm", d)
+       nouveau_therm_create_((p), (e), (o), sizeof(**d), (void **)d)
 #define nouveau_therm_destroy(p)                                               \
        nouveau_subdev_destroy(&(p)->base)
+#define nouveau_therm_init(p) ({                                               \
+       struct nouveau_therm *therm = (p);                                     \
+        _nouveau_therm_init(nv_object(therm));                                 \
+})
+#define nouveau_therm_fini(p,s) ({                                             \
+       struct nouveau_therm *therm = (p);                                     \
+        _nouveau_therm_init(nv_object(therm), (s));                            \
+})
+
+int nouveau_therm_create_(struct nouveau_object *, struct nouveau_object *,
+                         struct nouveau_oclass *, int, void **);
 
 #define _nouveau_therm_dtor _nouveau_subdev_dtor
+int _nouveau_therm_init(struct nouveau_object *);
+int _nouveau_therm_fini(struct nouveau_object *, bool);
 
 extern struct nouveau_oclass nv40_therm_oclass;
 extern struct nouveau_oclass nv50_therm_oclass;
+extern struct nouveau_oclass nva3_therm_oclass;
+extern struct nouveau_oclass nvd0_therm_oclass;
 
 #endif