staging: ks7010: separate dissimilar checks
[linux/fpc-iii.git] / drivers / thermal / int340x_thermal / acpi_thermal_rel.h
blobf00700bc9d79fe3e2a481eb7c7c012af5956ee24
1 #ifndef __ACPI_ACPI_THERMAL_H
2 #define __ACPI_ACPI_THERMAL_H
4 #include <asm/ioctl.h>
6 #define ACPI_THERMAL_MAGIC 's'
8 #define ACPI_THERMAL_GET_TRT_LEN _IOR(ACPI_THERMAL_MAGIC, 1, unsigned long)
9 #define ACPI_THERMAL_GET_ART_LEN _IOR(ACPI_THERMAL_MAGIC, 2, unsigned long)
10 #define ACPI_THERMAL_GET_TRT_COUNT _IOR(ACPI_THERMAL_MAGIC, 3, unsigned long)
11 #define ACPI_THERMAL_GET_ART_COUNT _IOR(ACPI_THERMAL_MAGIC, 4, unsigned long)
13 #define ACPI_THERMAL_GET_TRT _IOR(ACPI_THERMAL_MAGIC, 5, unsigned long)
14 #define ACPI_THERMAL_GET_ART _IOR(ACPI_THERMAL_MAGIC, 6, unsigned long)
16 struct art {
17 acpi_handle source;
18 acpi_handle target;
19 u64 weight;
20 u64 ac0_max;
21 u64 ac1_max;
22 u64 ac2_max;
23 u64 ac3_max;
24 u64 ac4_max;
25 u64 ac5_max;
26 u64 ac6_max;
27 u64 ac7_max;
28 u64 ac8_max;
29 u64 ac9_max;
30 } __packed;
32 struct trt {
33 acpi_handle source;
34 acpi_handle target;
35 u64 influence;
36 u64 sample_period;
37 u64 reverved1;
38 u64 reverved2;
39 u64 reverved3;
40 u64 reverved4;
41 } __packed;
43 #define ACPI_NR_ART_ELEMENTS 13
44 /* for usrspace */
45 union art_object {
46 struct {
47 char source_device[8]; /* ACPI single name */
48 char target_device[8]; /* ACPI single name */
49 u64 weight;
50 u64 ac0_max_level;
51 u64 ac1_max_level;
52 u64 ac2_max_level;
53 u64 ac3_max_level;
54 u64 ac4_max_level;
55 u64 ac5_max_level;
56 u64 ac6_max_level;
57 u64 ac7_max_level;
58 u64 ac8_max_level;
59 u64 ac9_max_level;
61 u64 __data[ACPI_NR_ART_ELEMENTS];
64 union trt_object {
65 struct {
66 char source_device[8]; /* ACPI single name */
67 char target_device[8]; /* ACPI single name */
68 u64 influence;
69 u64 sample_period;
70 u64 reserved[4];
72 u64 __data[8];
75 #ifdef __KERNEL__
76 int acpi_thermal_rel_misc_device_add(acpi_handle handle);
77 int acpi_thermal_rel_misc_device_remove(acpi_handle handle);
78 int acpi_parse_art(acpi_handle handle, int *art_count, struct art **arts,
79 bool create_dev);
80 int acpi_parse_trt(acpi_handle handle, int *trt_count, struct trt **trts,
81 bool create_dev);
82 #endif
84 #endif /* __ACPI_ACPI_THERMAL_H */