Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
therm.h
Go to the documentation of this file.
1 #ifndef __NOUVEAU_THERM_H__
2 #define __NOUVEAU_THERM_H__
3 
4 #include <core/device.h>
5 #include <core/subdev.h>
6 
11 };
12 
17 
26 };
27 
28 struct nouveau_therm {
30 
31  int (*fan_get)(struct nouveau_therm *);
32  int (*fan_set)(struct nouveau_therm *, int);
33  int (*fan_sense)(struct nouveau_therm *);
34 
35  int (*temp_get)(struct nouveau_therm *);
36 
38  int (*attr_set)(struct nouveau_therm *,
40 };
41 
42 static inline struct nouveau_therm *
43 nouveau_therm(void *obj)
44 {
45  return (void *)nv_device(obj)->subdev[NVDEV_SUBDEV_THERM];
46 }
47 
48 #define nouveau_therm_create(p,e,o,d) \
49  nouveau_subdev_create((p), (e), (o), 0, "THERM", "therm", d)
50 #define nouveau_therm_destroy(p) \
51  nouveau_subdev_destroy(&(p)->base)
52 
53 #define _nouveau_therm_dtor _nouveau_subdev_dtor
54 
55 extern struct nouveau_oclass nv40_therm_oclass;
56 extern struct nouveau_oclass nv50_therm_oclass;
57 
58 #endif