blob: f4cb590e67752a647957813f51fe0cc70ae9b5c5 [file] [log] [blame]
James Feist053a6642018-10-15 13:17:09 -07001/*
2// Copyright (c) 2018 Intel Corporation
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15*/
Brad Bishop1fb9f3f2020-08-28 08:15:13 -040016/// \file devices.hpp
James Feist053a6642018-10-15 13:17:09 -070017
18#pragma once
19#include <boost/container/flat_map.hpp>
20
21namespace devices
22{
23
24struct CmpStr
25{
James Feista465ccc2019-02-08 12:51:01 -080026 bool operator()(const char* a, const char* b) const
James Feist053a6642018-10-15 13:17:09 -070027 {
28 return std::strcmp(a, b) < 0;
29 }
30};
31
Johnathan Mantey7b21ef22022-08-08 12:57:55 -070032// I2C device drivers may create a /hwmon subdirectory. For example the tmp75
33// driver creates a /sys/bus/i2c/devices/<busnum>-<i2caddr>/hwmon
34// directory. The sensor code relies on the presence of the /hwmon
35// subdirectory to collect sensor readings. Initialization of this subdir is
36// not reliable. I2C devices flagged with hasHWMonDir are tested for correct
37// initialization, and when a failure is detected the device is deleted, and
38// then recreated. The default is to retry 5 times before moving to the next
39// device.
40
41// Devices such as I2C EEPROMs do not generate this file structure. These
42// kinds of devices are flagged using the noHWMonDir enumeration. The
43// expectation is they are created correctly on the first attempt.
44
45// This enumeration class exists to reduce copy/paste errors. It is easy to
46// overlook the trailing parameter in the ExportTemplate structure when it is
47// a simple boolean.
48enum class createsHWMon : bool
49{
50 noHWMonDir,
51 hasHWMonDir
52};
53
James Feist053a6642018-10-15 13:17:09 -070054struct ExportTemplate
55{
Zev Weissc11b5da2022-07-12 16:31:37 -070056 ExportTemplate(const char* params, const char* bus, const char* constructor,
Johnathan Mantey7b21ef22022-08-08 12:57:55 -070057 const char* destructor, createsHWMon hasHWMonDir) :
Johnathan Mantey9b867872020-10-13 15:00:51 -070058 parameters(params),
Zev Weissc11b5da2022-07-12 16:31:37 -070059 busPath(bus), add(constructor), remove(destructor),
Johnathan Mantey7b21ef22022-08-08 12:57:55 -070060 hasHWMonDir(hasHWMonDir){};
James Feista465ccc2019-02-08 12:51:01 -080061 const char* parameters;
Zev Weissc11b5da2022-07-12 16:31:37 -070062 const char* busPath;
Johnathan Mantey9b867872020-10-13 15:00:51 -070063 const char* add;
64 const char* remove;
Johnathan Mantey7b21ef22022-08-08 12:57:55 -070065 createsHWMon hasHWMonDir;
James Feist053a6642018-10-15 13:17:09 -070066};
67
James Feista465ccc2019-02-08 12:51:01 -080068const boost::container::flat_map<const char*, ExportTemplate, CmpStr>
Devjit Gopalpur4acdc542019-10-10 22:47:46 -070069 exportTemplates{
Vijay Khemka48328412021-04-12 23:14:53 +000070 {{"EEPROM_24C01",
71 ExportTemplate("24c01 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -070072 "new_device", "delete_device",
73 createsHWMon::noHWMonDir)},
Vijay Khemka48328412021-04-12 23:14:53 +000074 {"EEPROM_24C02",
Johnathan Mantey9b867872020-10-13 15:00:51 -070075 ExportTemplate("24c02 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -070076 "new_device", "delete_device",
77 createsHWMon::noHWMonDir)},
Jae Hyun Yoo86022012022-04-01 16:04:29 -070078 {"EEPROM_24C04",
79 ExportTemplate("24c04 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -070080 "new_device", "delete_device",
81 createsHWMon::noHWMonDir)},
Jae Hyun Yoo86022012022-04-01 16:04:29 -070082 {"EEPROM_24C08",
83 ExportTemplate("24c08 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -070084 "new_device", "delete_device",
85 createsHWMon::noHWMonDir)},
Jae Hyun Yoo86022012022-04-01 16:04:29 -070086 {"EEPROM_24C16",
87 ExportTemplate("24c16 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -070088 "new_device", "delete_device",
89 createsHWMon::noHWMonDir)},
Jae Hyun Yoo86022012022-04-01 16:04:29 -070090 {"EEPROM_24C32",
91 ExportTemplate("24c32 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -070092 "new_device", "delete_device",
93 createsHWMon::noHWMonDir)},
Hao Jiangf64d4392021-02-23 14:22:03 -080094 {"EEPROM_24C64",
Johnathan Mantey9b867872020-10-13 15:00:51 -070095 ExportTemplate("24c64 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -070096 "new_device", "delete_device",
97 createsHWMon::noHWMonDir)},
Jae Hyun Yoo86022012022-04-01 16:04:29 -070098 {"EEPROM_24C128",
99 ExportTemplate("24c128 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700100 "new_device", "delete_device",
101 createsHWMon::noHWMonDir)},
Jae Hyun Yoo86022012022-04-01 16:04:29 -0700102 {"EEPROM_24C256",
103 ExportTemplate("24c256 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700104 "new_device", "delete_device",
105 createsHWMon::noHWMonDir)},
Nan Zhou296667f2021-02-23 09:53:14 -0800106 {"ADM1266",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700107 ExportTemplate("adm1266 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700108 "new_device", "delete_device",
109 createsHWMon::noHWMonDir)},
Josh Lehan079c47f2020-06-18 16:34:31 -0700110 {"ADM1272",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700111 ExportTemplate("adm1272 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700112 "new_device", "delete_device",
113 createsHWMon::noHWMonDir)},
Michal Bieleckiff503d82022-04-29 10:20:08 +0200114 {"ADS7828",
115 ExportTemplate("ads7828 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700116 "new_device", "delete_device",
117 createsHWMon::noHWMonDir)},
Bruce Mitchellad2b1332021-07-27 14:42:29 -0500118 {"DPS310",
119 ExportTemplate("dps310 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700120 "new_device", "delete_device",
121 createsHWMon::noHWMonDir)},
Bruce Mitchellad2b1332021-07-27 14:42:29 -0500122 {"SI7020",
123 ExportTemplate("si7020 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700124 "new_device", "delete_device",
125 createsHWMon::noHWMonDir)},
Johnathan Mantey9b867872020-10-13 15:00:51 -0700126 {"EEPROM",
127 ExportTemplate("eeprom $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700128 "new_device", "delete_device",
129 createsHWMon::noHWMonDir)},
Gilbert Chenc61ae352020-11-03 22:32:30 +0800130 {"EMC1412",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700131 ExportTemplate("emc1412 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700132 "new_device", "delete_device",
133 createsHWMon::hasHWMonDir)},
Alex Qiu0cbe6bf2020-01-03 09:20:02 -0800134 {"EMC1413",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700135 ExportTemplate("emc1413 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700136 "new_device", "delete_device",
137 createsHWMon::hasHWMonDir)},
Gilbert Chenc61ae352020-11-03 22:32:30 +0800138 {"EMC1414",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700139 ExportTemplate("emc1414 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700140 "new_device", "delete_device",
141 createsHWMon::hasHWMonDir)},
Johnathan Mantey9b867872020-10-13 15:00:51 -0700142 {"Gpio", ExportTemplate("$Index", "/sys/class/gpio", "export",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700143 "unexport", createsHWMon::noHWMonDir)},
Johnathan Mantey9b867872020-10-13 15:00:51 -0700144 {"INA230",
145 ExportTemplate("ina230 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700146 "new_device", "delete_device",
147 createsHWMon::hasHWMonDir)},
Alex Qiu0cbe6bf2020-01-03 09:20:02 -0800148 {"ISL68137",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700149 ExportTemplate("isl68137 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700150 "new_device", "delete_device",
151 createsHWMon::hasHWMonDir)},
Yung Sheng Huangec5e74e2022-05-06 10:02:18 +0800152 {"ISL68220",
153 ExportTemplate("isl68220 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700154 "new_device", "delete_device",
155 createsHWMon::hasHWMonDir)},
Khang Kieu20fb4ae2022-02-09 02:04:33 +0000156 {"ISL69225",
157 ExportTemplate("isl69225 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700158 "new_device", "delete_device",
159 createsHWMon::hasHWMonDir)},
Gaurav Gandhibdad9572020-12-29 03:14:48 +0000160 {"ISL68223",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700161 ExportTemplate("isl68223 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700162 "new_device", "delete_device",
163 createsHWMon::hasHWMonDir)},
Gaurav Gandhibdad9572020-12-29 03:14:48 +0000164 {"ISL69243",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700165 ExportTemplate("isl69243 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700166 "new_device", "delete_device",
167 createsHWMon::hasHWMonDir)},
Zhikui Rened2f07b2022-02-16 14:59:09 -0800168 {"ISL69260",
169 ExportTemplate("isl69260 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700170 "new_device", "delete_device",
171 createsHWMon::hasHWMonDir)},
Alex Qiuba5424a2020-01-29 13:33:16 -0800172 {"MAX16601",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700173 ExportTemplate("max16601 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700174 "new_device", "delete_device",
175 createsHWMon::hasHWMonDir)},
Gaurav Gandhibdad9572020-12-29 03:14:48 +0000176 {"MAX20710",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700177 ExportTemplate("max20710 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700178 "new_device", "delete_device",
179 createsHWMon::hasHWMonDir)},
Alex Qiu9354bf72020-01-22 17:52:32 -0800180 {"MAX20730",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700181 ExportTemplate("max20730 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700182 "new_device", "delete_device",
183 createsHWMon::hasHWMonDir)},
Alex Qiu9354bf72020-01-22 17:52:32 -0800184 {"MAX20734",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700185 ExportTemplate("max20734 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700186 "new_device", "delete_device",
187 createsHWMon::hasHWMonDir)},
Alex Qiu9354bf72020-01-22 17:52:32 -0800188 {"MAX20796",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700189 ExportTemplate("max20796 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700190 "new_device", "delete_device",
191 createsHWMon::hasHWMonDir)},
Alex Qiu0cbe6bf2020-01-03 09:20:02 -0800192 {"MAX31725",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700193 ExportTemplate("max31725 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700194 "new_device", "delete_device",
195 createsHWMon::hasHWMonDir)},
Alex Qiu0cbe6bf2020-01-03 09:20:02 -0800196 {"MAX31730",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700197 ExportTemplate("max31730 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700198 "new_device", "delete_device",
199 createsHWMon::hasHWMonDir)},
Nan Zhou296667f2021-02-23 09:53:14 -0800200 {"MAX34440",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700201 ExportTemplate("max34440 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700202 "new_device", "delete_device",
203 createsHWMon::hasHWMonDir)},
Alex Qiu0cbe6bf2020-01-03 09:20:02 -0800204 {"MAX34451",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700205 ExportTemplate("max34451 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700206 "new_device", "delete_device",
207 createsHWMon::hasHWMonDir)},
Josh Lehanfdef8372020-05-13 17:02:43 -0700208 {"MAX6654",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700209 ExportTemplate("max6654 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700210 "new_device", "delete_device",
211 createsHWMon::hasHWMonDir)},
Zev Weissc7612cf2022-05-09 19:22:16 -0700212 {"NCT6779",
213 ExportTemplate("nct6779 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700214 "new_device", "delete_device",
215 createsHWMon::hasHWMonDir)},
Jan Sowinski50b2e0f2022-05-06 16:47:12 +0200216 {"PCA9542Mux",
217 ExportTemplate("pca9542 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700218 "new_device", "delete_device",
219 createsHWMon::noHWMonDir)},
Devjit Gopalpur4acdc542019-10-10 22:47:46 -0700220 {"PCA9543Mux",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700221 ExportTemplate("pca9543 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700222 "new_device", "delete_device",
223 createsHWMon::noHWMonDir)},
Devjit Gopalpur4acdc542019-10-10 22:47:46 -0700224 {"PCA9544Mux",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700225 ExportTemplate("pca9544 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700226 "new_device", "delete_device",
227 createsHWMon::noHWMonDir)},
Devjit Gopalpur4acdc542019-10-10 22:47:46 -0700228 {"PCA9545Mux",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700229 ExportTemplate("pca9545 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700230 "new_device", "delete_device",
231 createsHWMon::noHWMonDir)},
Devjit Gopalpur4acdc542019-10-10 22:47:46 -0700232 {"PCA9546Mux",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700233 ExportTemplate("pca9546 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700234 "new_device", "delete_device",
235 createsHWMon::noHWMonDir)},
Devjit Gopalpur4acdc542019-10-10 22:47:46 -0700236 {"PCA9547Mux",
Johnathan Mantey9b867872020-10-13 15:00:51 -0700237 ExportTemplate("pca9547 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700238 "new_device", "delete_device",
239 createsHWMon::noHWMonDir)},
Sujoy Raye4dc1402022-04-15 10:28:34 -0700240 {"PCA9548Mux",
241 ExportTemplate("pca9548 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700242 "new_device", "delete_device",
243 createsHWMon::noHWMonDir)},
Jan Sowinski50b2e0f2022-05-06 16:47:12 +0200244 {"PCA9846Mux",
245 ExportTemplate("pca9846 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700246 "new_device", "delete_device",
247 createsHWMon::noHWMonDir)},
Jiaqing Zhao88333fe2022-05-06 15:00:15 +0800248 {"PCA9847Mux",
249 ExportTemplate("pca9847 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700250 "new_device", "delete_device",
251 createsHWMon::noHWMonDir)},
Jiaqing Zhao88333fe2022-05-06 15:00:15 +0800252 {"PCA9848Mux",
253 ExportTemplate("pca9848 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700254 "new_device", "delete_device",
255 createsHWMon::noHWMonDir)},
Jiaqing Zhao88333fe2022-05-06 15:00:15 +0800256 {"PCA9849Mux",
257 ExportTemplate("pca9849 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700258 "new_device", "delete_device",
259 createsHWMon::noHWMonDir)},
260 {"SBTSI", ExportTemplate("sbtsi $Address",
261 "/sys/bus/i2c/devices/i2c-$Bus", "new_device",
262 "delete_device", createsHWMon::hasHWMonDir)},
Yung Sheng Huang2ca85292022-07-15 09:59:50 +0800263 {"SIC450",
264 ExportTemplate("sic450 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700265 "new_device", "delete_device",
266 createsHWMon::hasHWMonDir)},
267 {"pmbus", ExportTemplate("pmbus $Address",
268 "/sys/bus/i2c/devices/i2c-$Bus", "new_device",
269 "delete_device", createsHWMon::hasHWMonDir)},
Lotus Xu93db9bf2021-09-08 13:47:47 +0800270 {"PXE1610",
271 ExportTemplate("pxe1610 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700272 "new_device", "delete_device",
273 createsHWMon::hasHWMonDir)},
Lotus Xu93db9bf2021-09-08 13:47:47 +0800274 {"XDPE12284",
275 ExportTemplate("xdpe12284 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700276 "new_device", "delete_device",
277 createsHWMon::hasHWMonDir)},
Konstantin Aladyshev97353ed2021-04-01 17:24:34 +0300278 {"LM95234",
279 ExportTemplate("lm95234 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700280 "new_device", "delete_device",
281 createsHWMon::hasHWMonDir)},
Johnathan Mantey9b867872020-10-13 15:00:51 -0700282 {"TMP112",
283 ExportTemplate("tmp112 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700284 "new_device", "delete_device",
285 createsHWMon::hasHWMonDir)},
Johnathan Mantey9b867872020-10-13 15:00:51 -0700286 {"TMP175",
287 ExportTemplate("tmp175 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700288 "new_device", "delete_device",
289 createsHWMon::hasHWMonDir)},
Johnathan Mantey9b867872020-10-13 15:00:51 -0700290 {"TMP421",
291 ExportTemplate("tmp421 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700292 "new_device", "delete_device",
293 createsHWMon::hasHWMonDir)},
Johnathan Mantey9b867872020-10-13 15:00:51 -0700294 {"TMP441",
295 ExportTemplate("tmp441 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700296 "new_device", "delete_device",
297 createsHWMon::hasHWMonDir)},
298 {"LM75A", ExportTemplate("lm75a $Address",
299 "/sys/bus/i2c/devices/i2c-$Bus", "new_device",
300 "delete_device", createsHWMon::hasHWMonDir)},
Zev Weiss27adbb72022-04-01 16:17:09 -0700301 {"LM25066",
302 ExportTemplate("lm25066 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700303 "new_device", "delete_device",
304 createsHWMon::hasHWMonDir)},
305 {"TMP75", ExportTemplate("tmp75 $Address",
306 "/sys/bus/i2c/devices/i2c-$Bus", "new_device",
307 "delete_device", createsHWMon::hasHWMonDir)},
Zev Weiss756fcae2021-03-24 22:36:19 +0000308 {"W83773G",
309 ExportTemplate("w83773g $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700310 "new_device", "delete_device",
311 createsHWMon::hasHWMonDir)},
Scron Chang2fb84ef2021-07-14 20:32:14 +0800312 {"RAA228000",
313 ExportTemplate("raa228000 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700314 "new_device", "delete_device",
315 createsHWMon::hasHWMonDir)},
Scron Chang2fb84ef2021-07-14 20:32:14 +0800316 {"DPS800",
317 ExportTemplate("dps800 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700318 "new_device", "delete_device",
319 createsHWMon::hasHWMonDir)},
Scron Chang5d11daf2021-07-26 13:38:26 +0800320 {"MAX31790",
321 ExportTemplate("max31790 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700322 "new_device", "delete_device",
323 createsHWMon::hasHWMonDir)},
324 {"JC42", ExportTemplate("jc42 $Address",
325 "/sys/bus/i2c/devices/i2c-$Bus", "new_device",
326 "delete_device", createsHWMon::hasHWMonDir)},
Zhikui Rened2f07b2022-02-16 14:59:09 -0800327 {"ADM1293",
328 ExportTemplate("adm1293 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700329 "new_device", "delete_device",
330 createsHWMon::noHWMonDir)},
Zhikui Rened2f07b2022-02-16 14:59:09 -0800331 {"INA219",
332 ExportTemplate("ina219 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700333 "new_device", "delete_device",
334 createsHWMon::noHWMonDir)},
Zhikui Renec6183c2022-02-26 23:04:34 -0800335 {"RAA229126",
336 ExportTemplate("raa229126 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700337 "new_device", "delete_device",
338 createsHWMon::hasHWMonDir)},
Konstantin Aladyshev91df5312022-10-19 18:46:27 +0300339 {"TPS53679",
340 ExportTemplate("tps53679 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
341 "new_device", "delete_device",
342 createsHWMon::hasHWMonDir)},
Shamim Ali3f4527a2022-06-08 23:19:11 +0530343 {"MP2971",
344 ExportTemplate("mp2971 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700345 "new_device", "delete_device",
346 createsHWMon::hasHWMonDir)},
Shamim Ali3f4527a2022-06-08 23:19:11 +0530347 {"MP2973",
348 ExportTemplate("mp2973 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700349 "new_device", "delete_device",
350 createsHWMon::hasHWMonDir)},
Potin Laif51f6af2022-06-28 09:55:19 +0800351 {"HDC1080",
352 ExportTemplate("hdc1080 $Address", "/sys/bus/i2c/devices/i2c-$Bus",
Johnathan Mantey7b21ef22022-08-08 12:57:55 -0700353 "new_device", "delete_device",
354 createsHWMon::noHWMonDir)}}};
Jae Hyun Yoo9cdeabb2018-10-16 11:47:09 -0700355} // namespace devices