aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/i2c-sensor.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/i2c-sensor.h')
-rw-r--r--include/linux/i2c-sensor.h203
1 files changed, 0 insertions, 203 deletions
diff --git a/include/linux/i2c-sensor.h b/include/linux/i2c-sensor.h
deleted file mode 100644
index 1563d445dfd1..000000000000
--- a/include/linux/i2c-sensor.h
+++ /dev/null
@@ -1,203 +0,0 @@
1/*
2 i2c-sensor.h - Part of the i2c package
3 was originally sensors.h - Part of lm_sensors, Linux kernel modules
4 for hardware monitoring
5 Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl>
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20*/
21
22#ifndef _LINUX_I2C_SENSOR_H
23#define _LINUX_I2C_SENSOR_H
24
25#include <linux/i2c.h>
26
27#define SENSORS_MODULE_PARM_FORCE(name) \
28 I2C_CLIENT_MODULE_PARM(force_ ## name, \
29 "List of adapter,address pairs which are unquestionably" \
30 " assumed to contain a `" # name "' chip")
31
32
33/* This defines several insmod variables, and the addr_data structure */
34#define SENSORS_INSMOD \
35 I2C_CLIENT_MODULE_PARM(probe, \
36 "List of adapter,address pairs to scan additionally"); \
37 I2C_CLIENT_MODULE_PARM(ignore, \
38 "List of adapter,address pairs not to scan"); \
39 static struct i2c_client_address_data addr_data = { \
40 .normal_i2c = normal_i2c, \
41 .probe = probe, \
42 .ignore = ignore, \
43 .forces = forces, \
44 }
45
46/* The following functions create an enum with the chip names as elements.
47 The first element of the enum is any_chip. These are the only macros
48 a module will want to use. */
49
50#define SENSORS_INSMOD_0 \
51 enum chips { any_chip }; \
52 I2C_CLIENT_MODULE_PARM(force, \
53 "List of adapter,address pairs to boldly assume " \
54 "to be present"); \
55 static unsigned short *forces[] = { force, \
56 NULL }; \
57 SENSORS_INSMOD
58
59#define SENSORS_INSMOD_1(chip1) \
60 enum chips { any_chip, chip1 }; \
61 I2C_CLIENT_MODULE_PARM(force, \
62 "List of adapter,address pairs to boldly assume " \
63 "to be present"); \
64 SENSORS_MODULE_PARM_FORCE(chip1); \
65 static unsigned short *forces[] = { force, \
66 force_##chip1, \
67 NULL }; \
68 SENSORS_INSMOD
69
70#define SENSORS_INSMOD_2(chip1,chip2) \
71 enum chips { any_chip, chip1, chip2 }; \
72 I2C_CLIENT_MODULE_PARM(force, \
73 "List of adapter,address pairs to boldly assume " \
74 "to be present"); \
75 SENSORS_MODULE_PARM_FORCE(chip1); \
76 SENSORS_MODULE_PARM_FORCE(chip2); \
77 static unsigned short *forces[] = { force, \
78 force_##chip1, \
79 force_##chip2, \
80 NULL }; \
81 SENSORS_INSMOD
82
83#define SENSORS_INSMOD_3(chip1,chip2,chip3) \
84 enum chips { any_chip, chip1, chip2, chip3 }; \
85 I2C_CLIENT_MODULE_PARM(force, \
86 "List of adapter,address pairs to boldly assume " \
87 "to be present"); \
88 SENSORS_MODULE_PARM_FORCE(chip1); \
89 SENSORS_MODULE_PARM_FORCE(chip2); \
90 SENSORS_MODULE_PARM_FORCE(chip3); \
91 static unsigned short *forces[] = { force, \
92 force_##chip1, \
93 force_##chip2, \
94 force_##chip3, \
95 NULL }; \
96 SENSORS_INSMOD
97
98#define SENSORS_INSMOD_4(chip1,chip2,chip3,chip4) \
99 enum chips { any_chip, chip1, chip2, chip3, chip4 }; \
100 I2C_CLIENT_MODULE_PARM(force, \
101 "List of adapter,address pairs to boldly assume " \
102 "to be present"); \
103 SENSORS_MODULE_PARM_FORCE(chip1); \
104 SENSORS_MODULE_PARM_FORCE(chip2); \
105 SENSORS_MODULE_PARM_FORCE(chip3); \
106 SENSORS_MODULE_PARM_FORCE(chip4); \
107 static unsigned short *forces[] = { force, \
108 force_##chip1, \
109 force_##chip2, \
110 force_##chip3, \
111 force_##chip4, \
112 NULL}; \
113 SENSORS_INSMOD
114
115#define SENSORS_INSMOD_5(chip1,chip2,chip3,chip4,chip5) \
116 enum chips { any_chip, chip1, chip2, chip3, chip4, chip5 }; \
117 I2C_CLIENT_MODULE_PARM(force, \
118 "List of adapter,address pairs to boldly assume " \
119 "to be present"); \
120 SENSORS_MODULE_PARM_FORCE(chip1); \
121 SENSORS_MODULE_PARM_FORCE(chip2); \
122 SENSORS_MODULE_PARM_FORCE(chip3); \
123 SENSORS_MODULE_PARM_FORCE(chip4); \
124 SENSORS_MODULE_PARM_FORCE(chip5); \
125 static unsigned short *forces[] = { force, \
126 force_##chip1, \
127 force_##chip2, \
128 force_##chip3, \
129 force_##chip4, \
130 force_##chip5, \
131 NULL }; \
132 SENSORS_INSMOD
133
134#define SENSORS_INSMOD_6(chip1,chip2,chip3,chip4,chip5,chip6) \
135 enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6 }; \
136 I2C_CLIENT_MODULE_PARM(force, \
137 "List of adapter,address pairs to boldly assume " \
138 "to be present"); \
139 SENSORS_MODULE_PARM_FORCE(chip1); \
140 SENSORS_MODULE_PARM_FORCE(chip2); \
141 SENSORS_MODULE_PARM_FORCE(chip3); \
142 SENSORS_MODULE_PARM_FORCE(chip4); \
143 SENSORS_MODULE_PARM_FORCE(chip5); \
144 SENSORS_MODULE_PARM_FORCE(chip6); \
145 static unsigned short *forces[] = { force, \
146 force_##chip1, \
147 force_##chip2, \
148 force_##chip3, \
149 force_##chip4, \
150 force_##chip5, \
151 force_##chip6, \
152 NULL }; \
153 SENSORS_INSMOD
154
155#define SENSORS_INSMOD_7(chip1,chip2,chip3,chip4,chip5,chip6,chip7) \
156 enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6, chip7 }; \
157 I2C_CLIENT_MODULE_PARM(force, \
158 "List of adapter,address pairs to boldly assume " \
159 "to be present"); \
160 SENSORS_MODULE_PARM_FORCE(chip1); \
161 SENSORS_MODULE_PARM_FORCE(chip2); \
162 SENSORS_MODULE_PARM_FORCE(chip3); \
163 SENSORS_MODULE_PARM_FORCE(chip4); \
164 SENSORS_MODULE_PARM_FORCE(chip5); \
165 SENSORS_MODULE_PARM_FORCE(chip6); \
166 SENSORS_MODULE_PARM_FORCE(chip7); \
167 static unsigned short *forces[] = { force, \
168 force_##chip1, \
169 force_##chip2, \
170 force_##chip3, \
171 force_##chip4, \
172 force_##chip5, \
173 force_##chip6, \
174 force_##chip7, \
175 NULL }; \
176 SENSORS_INSMOD
177
178#define SENSORS_INSMOD_8(chip1,chip2,chip3,chip4,chip5,chip6,chip7,chip8) \
179 enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6, chip7, chip8 }; \
180 I2C_CLIENT_MODULE_PARM(force, \
181 "List of adapter,address pairs to boldly assume " \
182 "to be present"); \
183 SENSORS_MODULE_PARM_FORCE(chip1); \
184 SENSORS_MODULE_PARM_FORCE(chip2); \
185 SENSORS_MODULE_PARM_FORCE(chip3); \
186 SENSORS_MODULE_PARM_FORCE(chip4); \
187 SENSORS_MODULE_PARM_FORCE(chip5); \
188 SENSORS_MODULE_PARM_FORCE(chip6); \
189 SENSORS_MODULE_PARM_FORCE(chip7); \
190 SENSORS_MODULE_PARM_FORCE(chip8); \
191 static unsigned short *forces[] = { force, \
192 force_##chip1, \
193 force_##chip2, \
194 force_##chip3, \
195 force_##chip4, \
196 force_##chip5, \
197 force_##chip6, \
198 force_##chip7, \
199 force_##chip8, \
200 NULL }; \
201 SENSORS_INSMOD
202
203#endif /* def _LINUX_I2C_SENSOR_H */