James Feist | 053a664 | 2018-10-15 13:17:09 -0700 | [diff] [blame] | 1 | /* |
| 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 Bishop | 1fb9f3f | 2020-08-28 08:15:13 -0400 | [diff] [blame] | 16 | /// \file devices.hpp |
James Feist | 053a664 | 2018-10-15 13:17:09 -0700 | [diff] [blame] | 17 | |
| 18 | #pragma once |
| 19 | #include <boost/container/flat_map.hpp> |
| 20 | |
| 21 | namespace devices |
| 22 | { |
| 23 | |
| 24 | struct CmpStr |
| 25 | { |
James Feist | a465ccc | 2019-02-08 12:51:01 -0800 | [diff] [blame] | 26 | bool operator()(const char* a, const char* b) const |
James Feist | 053a664 | 2018-10-15 13:17:09 -0700 | [diff] [blame] | 27 | { |
| 28 | return std::strcmp(a, b) < 0; |
| 29 | } |
| 30 | }; |
| 31 | |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 32 | // 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. |
| 48 | enum class createsHWMon : bool |
| 49 | { |
| 50 | noHWMonDir, |
| 51 | hasHWMonDir |
| 52 | }; |
| 53 | |
James Feist | 053a664 | 2018-10-15 13:17:09 -0700 | [diff] [blame] | 54 | struct ExportTemplate |
| 55 | { |
Zev Weiss | c11b5da | 2022-07-12 16:31:37 -0700 | [diff] [blame] | 56 | ExportTemplate(const char* params, const char* bus, const char* constructor, |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 57 | const char* destructor, createsHWMon hasHWMonDir) : |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 58 | parameters(params), |
Zev Weiss | c11b5da | 2022-07-12 16:31:37 -0700 | [diff] [blame] | 59 | busPath(bus), add(constructor), remove(destructor), |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 60 | hasHWMonDir(hasHWMonDir){}; |
James Feist | a465ccc | 2019-02-08 12:51:01 -0800 | [diff] [blame] | 61 | const char* parameters; |
Zev Weiss | c11b5da | 2022-07-12 16:31:37 -0700 | [diff] [blame] | 62 | const char* busPath; |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 63 | const char* add; |
| 64 | const char* remove; |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 65 | createsHWMon hasHWMonDir; |
James Feist | 053a664 | 2018-10-15 13:17:09 -0700 | [diff] [blame] | 66 | }; |
| 67 | |
James Feist | a465ccc | 2019-02-08 12:51:01 -0800 | [diff] [blame] | 68 | const boost::container::flat_map<const char*, ExportTemplate, CmpStr> |
Devjit Gopalpur | 4acdc54 | 2019-10-10 22:47:46 -0700 | [diff] [blame] | 69 | exportTemplates{ |
Vijay Khemka | 4832841 | 2021-04-12 23:14:53 +0000 | [diff] [blame] | 70 | {{"EEPROM_24C01", |
| 71 | ExportTemplate("24c01 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 72 | "new_device", "delete_device", |
| 73 | createsHWMon::noHWMonDir)}, |
Vijay Khemka | 4832841 | 2021-04-12 23:14:53 +0000 | [diff] [blame] | 74 | {"EEPROM_24C02", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 75 | ExportTemplate("24c02 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 76 | "new_device", "delete_device", |
| 77 | createsHWMon::noHWMonDir)}, |
Jae Hyun Yoo | 8602201 | 2022-04-01 16:04:29 -0700 | [diff] [blame] | 78 | {"EEPROM_24C04", |
| 79 | ExportTemplate("24c04 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 80 | "new_device", "delete_device", |
| 81 | createsHWMon::noHWMonDir)}, |
Jae Hyun Yoo | 8602201 | 2022-04-01 16:04:29 -0700 | [diff] [blame] | 82 | {"EEPROM_24C08", |
| 83 | ExportTemplate("24c08 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 84 | "new_device", "delete_device", |
| 85 | createsHWMon::noHWMonDir)}, |
Jae Hyun Yoo | 8602201 | 2022-04-01 16:04:29 -0700 | [diff] [blame] | 86 | {"EEPROM_24C16", |
| 87 | ExportTemplate("24c16 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 88 | "new_device", "delete_device", |
| 89 | createsHWMon::noHWMonDir)}, |
Jae Hyun Yoo | 8602201 | 2022-04-01 16:04:29 -0700 | [diff] [blame] | 90 | {"EEPROM_24C32", |
| 91 | ExportTemplate("24c32 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 92 | "new_device", "delete_device", |
| 93 | createsHWMon::noHWMonDir)}, |
Hao Jiang | f64d439 | 2021-02-23 14:22:03 -0800 | [diff] [blame] | 94 | {"EEPROM_24C64", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 95 | ExportTemplate("24c64 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 96 | "new_device", "delete_device", |
| 97 | createsHWMon::noHWMonDir)}, |
Jae Hyun Yoo | 8602201 | 2022-04-01 16:04:29 -0700 | [diff] [blame] | 98 | {"EEPROM_24C128", |
| 99 | ExportTemplate("24c128 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 100 | "new_device", "delete_device", |
| 101 | createsHWMon::noHWMonDir)}, |
Jae Hyun Yoo | 8602201 | 2022-04-01 16:04:29 -0700 | [diff] [blame] | 102 | {"EEPROM_24C256", |
| 103 | ExportTemplate("24c256 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 104 | "new_device", "delete_device", |
| 105 | createsHWMon::noHWMonDir)}, |
Nan Zhou | 296667f | 2021-02-23 09:53:14 -0800 | [diff] [blame] | 106 | {"ADM1266", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 107 | ExportTemplate("adm1266 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 108 | "new_device", "delete_device", |
| 109 | createsHWMon::noHWMonDir)}, |
Josh Lehan | 079c47f | 2020-06-18 16:34:31 -0700 | [diff] [blame] | 110 | {"ADM1272", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 111 | ExportTemplate("adm1272 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 112 | "new_device", "delete_device", |
| 113 | createsHWMon::noHWMonDir)}, |
Michal Bielecki | ff503d8 | 2022-04-29 10:20:08 +0200 | [diff] [blame] | 114 | {"ADS7828", |
| 115 | ExportTemplate("ads7828 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 116 | "new_device", "delete_device", |
| 117 | createsHWMon::noHWMonDir)}, |
Bruce Mitchell | ad2b133 | 2021-07-27 14:42:29 -0500 | [diff] [blame] | 118 | {"DPS310", |
| 119 | ExportTemplate("dps310 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 120 | "new_device", "delete_device", |
| 121 | createsHWMon::noHWMonDir)}, |
Bruce Mitchell | ad2b133 | 2021-07-27 14:42:29 -0500 | [diff] [blame] | 122 | {"SI7020", |
| 123 | ExportTemplate("si7020 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 124 | "new_device", "delete_device", |
| 125 | createsHWMon::noHWMonDir)}, |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 126 | {"EEPROM", |
| 127 | ExportTemplate("eeprom $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 128 | "new_device", "delete_device", |
| 129 | createsHWMon::noHWMonDir)}, |
Gilbert Chen | c61ae35 | 2020-11-03 22:32:30 +0800 | [diff] [blame] | 130 | {"EMC1412", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 131 | ExportTemplate("emc1412 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 132 | "new_device", "delete_device", |
| 133 | createsHWMon::hasHWMonDir)}, |
Alex Qiu | 0cbe6bf | 2020-01-03 09:20:02 -0800 | [diff] [blame] | 134 | {"EMC1413", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 135 | ExportTemplate("emc1413 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 136 | "new_device", "delete_device", |
| 137 | createsHWMon::hasHWMonDir)}, |
Gilbert Chen | c61ae35 | 2020-11-03 22:32:30 +0800 | [diff] [blame] | 138 | {"EMC1414", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 139 | ExportTemplate("emc1414 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 140 | "new_device", "delete_device", |
| 141 | createsHWMon::hasHWMonDir)}, |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 142 | {"Gpio", ExportTemplate("$Index", "/sys/class/gpio", "export", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 143 | "unexport", createsHWMon::noHWMonDir)}, |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 144 | {"INA230", |
| 145 | ExportTemplate("ina230 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 146 | "new_device", "delete_device", |
| 147 | createsHWMon::hasHWMonDir)}, |
Alex Qiu | 0cbe6bf | 2020-01-03 09:20:02 -0800 | [diff] [blame] | 148 | {"ISL68137", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 149 | ExportTemplate("isl68137 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 150 | "new_device", "delete_device", |
| 151 | createsHWMon::hasHWMonDir)}, |
Yung Sheng Huang | ec5e74e | 2022-05-06 10:02:18 +0800 | [diff] [blame] | 152 | {"ISL68220", |
| 153 | ExportTemplate("isl68220 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 154 | "new_device", "delete_device", |
| 155 | createsHWMon::hasHWMonDir)}, |
Khang Kieu | 20fb4ae | 2022-02-09 02:04:33 +0000 | [diff] [blame] | 156 | {"ISL69225", |
| 157 | ExportTemplate("isl69225 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 158 | "new_device", "delete_device", |
| 159 | createsHWMon::hasHWMonDir)}, |
Gaurav Gandhi | bdad957 | 2020-12-29 03:14:48 +0000 | [diff] [blame] | 160 | {"ISL68223", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 161 | ExportTemplate("isl68223 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 162 | "new_device", "delete_device", |
| 163 | createsHWMon::hasHWMonDir)}, |
Gaurav Gandhi | bdad957 | 2020-12-29 03:14:48 +0000 | [diff] [blame] | 164 | {"ISL69243", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 165 | ExportTemplate("isl69243 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 166 | "new_device", "delete_device", |
| 167 | createsHWMon::hasHWMonDir)}, |
Zhikui Ren | ed2f07b | 2022-02-16 14:59:09 -0800 | [diff] [blame] | 168 | {"ISL69260", |
| 169 | ExportTemplate("isl69260 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 170 | "new_device", "delete_device", |
| 171 | createsHWMon::hasHWMonDir)}, |
Alex Qiu | ba5424a | 2020-01-29 13:33:16 -0800 | [diff] [blame] | 172 | {"MAX16601", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 173 | ExportTemplate("max16601 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 174 | "new_device", "delete_device", |
| 175 | createsHWMon::hasHWMonDir)}, |
Gaurav Gandhi | bdad957 | 2020-12-29 03:14:48 +0000 | [diff] [blame] | 176 | {"MAX20710", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 177 | ExportTemplate("max20710 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 178 | "new_device", "delete_device", |
| 179 | createsHWMon::hasHWMonDir)}, |
Alex Qiu | 9354bf7 | 2020-01-22 17:52:32 -0800 | [diff] [blame] | 180 | {"MAX20730", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 181 | ExportTemplate("max20730 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 182 | "new_device", "delete_device", |
| 183 | createsHWMon::hasHWMonDir)}, |
Alex Qiu | 9354bf7 | 2020-01-22 17:52:32 -0800 | [diff] [blame] | 184 | {"MAX20734", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 185 | ExportTemplate("max20734 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 186 | "new_device", "delete_device", |
| 187 | createsHWMon::hasHWMonDir)}, |
Alex Qiu | 9354bf7 | 2020-01-22 17:52:32 -0800 | [diff] [blame] | 188 | {"MAX20796", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 189 | ExportTemplate("max20796 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 190 | "new_device", "delete_device", |
| 191 | createsHWMon::hasHWMonDir)}, |
Alex Qiu | 0cbe6bf | 2020-01-03 09:20:02 -0800 | [diff] [blame] | 192 | {"MAX31725", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 193 | ExportTemplate("max31725 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 194 | "new_device", "delete_device", |
| 195 | createsHWMon::hasHWMonDir)}, |
Alex Qiu | 0cbe6bf | 2020-01-03 09:20:02 -0800 | [diff] [blame] | 196 | {"MAX31730", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 197 | ExportTemplate("max31730 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 198 | "new_device", "delete_device", |
| 199 | createsHWMon::hasHWMonDir)}, |
Nan Zhou | 296667f | 2021-02-23 09:53:14 -0800 | [diff] [blame] | 200 | {"MAX34440", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 201 | ExportTemplate("max34440 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 202 | "new_device", "delete_device", |
| 203 | createsHWMon::hasHWMonDir)}, |
Alex Qiu | 0cbe6bf | 2020-01-03 09:20:02 -0800 | [diff] [blame] | 204 | {"MAX34451", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 205 | ExportTemplate("max34451 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 206 | "new_device", "delete_device", |
| 207 | createsHWMon::hasHWMonDir)}, |
Josh Lehan | fdef837 | 2020-05-13 17:02:43 -0700 | [diff] [blame] | 208 | {"MAX6654", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 209 | ExportTemplate("max6654 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 210 | "new_device", "delete_device", |
| 211 | createsHWMon::hasHWMonDir)}, |
Zev Weiss | c7612cf | 2022-05-09 19:22:16 -0700 | [diff] [blame] | 212 | {"NCT6779", |
| 213 | ExportTemplate("nct6779 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 214 | "new_device", "delete_device", |
| 215 | createsHWMon::hasHWMonDir)}, |
Jan Sowinski | 50b2e0f | 2022-05-06 16:47:12 +0200 | [diff] [blame] | 216 | {"PCA9542Mux", |
| 217 | ExportTemplate("pca9542 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 218 | "new_device", "delete_device", |
| 219 | createsHWMon::noHWMonDir)}, |
Devjit Gopalpur | 4acdc54 | 2019-10-10 22:47:46 -0700 | [diff] [blame] | 220 | {"PCA9543Mux", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 221 | ExportTemplate("pca9543 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 222 | "new_device", "delete_device", |
| 223 | createsHWMon::noHWMonDir)}, |
Devjit Gopalpur | 4acdc54 | 2019-10-10 22:47:46 -0700 | [diff] [blame] | 224 | {"PCA9544Mux", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 225 | ExportTemplate("pca9544 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 226 | "new_device", "delete_device", |
| 227 | createsHWMon::noHWMonDir)}, |
Devjit Gopalpur | 4acdc54 | 2019-10-10 22:47:46 -0700 | [diff] [blame] | 228 | {"PCA9545Mux", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 229 | ExportTemplate("pca9545 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 230 | "new_device", "delete_device", |
| 231 | createsHWMon::noHWMonDir)}, |
Devjit Gopalpur | 4acdc54 | 2019-10-10 22:47:46 -0700 | [diff] [blame] | 232 | {"PCA9546Mux", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 233 | ExportTemplate("pca9546 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 234 | "new_device", "delete_device", |
| 235 | createsHWMon::noHWMonDir)}, |
Devjit Gopalpur | 4acdc54 | 2019-10-10 22:47:46 -0700 | [diff] [blame] | 236 | {"PCA9547Mux", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 237 | ExportTemplate("pca9547 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 238 | "new_device", "delete_device", |
| 239 | createsHWMon::noHWMonDir)}, |
Sujoy Ray | e4dc140 | 2022-04-15 10:28:34 -0700 | [diff] [blame] | 240 | {"PCA9548Mux", |
| 241 | ExportTemplate("pca9548 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 242 | "new_device", "delete_device", |
| 243 | createsHWMon::noHWMonDir)}, |
Jan Sowinski | 50b2e0f | 2022-05-06 16:47:12 +0200 | [diff] [blame] | 244 | {"PCA9846Mux", |
| 245 | ExportTemplate("pca9846 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 246 | "new_device", "delete_device", |
| 247 | createsHWMon::noHWMonDir)}, |
Jiaqing Zhao | 88333fe | 2022-05-06 15:00:15 +0800 | [diff] [blame] | 248 | {"PCA9847Mux", |
| 249 | ExportTemplate("pca9847 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 250 | "new_device", "delete_device", |
| 251 | createsHWMon::noHWMonDir)}, |
Jiaqing Zhao | 88333fe | 2022-05-06 15:00:15 +0800 | [diff] [blame] | 252 | {"PCA9848Mux", |
| 253 | ExportTemplate("pca9848 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 254 | "new_device", "delete_device", |
| 255 | createsHWMon::noHWMonDir)}, |
Jiaqing Zhao | 88333fe | 2022-05-06 15:00:15 +0800 | [diff] [blame] | 256 | {"PCA9849Mux", |
| 257 | ExportTemplate("pca9849 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 258 | "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 Huang | 2ca8529 | 2022-07-15 09:59:50 +0800 | [diff] [blame] | 263 | {"SIC450", |
| 264 | ExportTemplate("sic450 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 265 | "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 Xu | 93db9bf | 2021-09-08 13:47:47 +0800 | [diff] [blame] | 270 | {"PXE1610", |
| 271 | ExportTemplate("pxe1610 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 272 | "new_device", "delete_device", |
| 273 | createsHWMon::hasHWMonDir)}, |
Lotus Xu | 93db9bf | 2021-09-08 13:47:47 +0800 | [diff] [blame] | 274 | {"XDPE12284", |
| 275 | ExportTemplate("xdpe12284 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 276 | "new_device", "delete_device", |
| 277 | createsHWMon::hasHWMonDir)}, |
Konstantin Aladyshev | 97353ed | 2021-04-01 17:24:34 +0300 | [diff] [blame] | 278 | {"LM95234", |
| 279 | ExportTemplate("lm95234 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 280 | "new_device", "delete_device", |
| 281 | createsHWMon::hasHWMonDir)}, |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 282 | {"TMP112", |
| 283 | ExportTemplate("tmp112 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 284 | "new_device", "delete_device", |
| 285 | createsHWMon::hasHWMonDir)}, |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 286 | {"TMP175", |
| 287 | ExportTemplate("tmp175 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 288 | "new_device", "delete_device", |
| 289 | createsHWMon::hasHWMonDir)}, |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 290 | {"TMP421", |
| 291 | ExportTemplate("tmp421 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 292 | "new_device", "delete_device", |
| 293 | createsHWMon::hasHWMonDir)}, |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 294 | {"TMP441", |
| 295 | ExportTemplate("tmp441 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 296 | "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 Weiss | 27adbb7 | 2022-04-01 16:17:09 -0700 | [diff] [blame] | 301 | {"LM25066", |
| 302 | ExportTemplate("lm25066 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 303 | "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 Weiss | 756fcae | 2021-03-24 22:36:19 +0000 | [diff] [blame] | 308 | {"W83773G", |
| 309 | ExportTemplate("w83773g $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 310 | "new_device", "delete_device", |
| 311 | createsHWMon::hasHWMonDir)}, |
Scron Chang | 2fb84ef | 2021-07-14 20:32:14 +0800 | [diff] [blame] | 312 | {"RAA228000", |
| 313 | ExportTemplate("raa228000 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 314 | "new_device", "delete_device", |
| 315 | createsHWMon::hasHWMonDir)}, |
Scron Chang | 2fb84ef | 2021-07-14 20:32:14 +0800 | [diff] [blame] | 316 | {"DPS800", |
| 317 | ExportTemplate("dps800 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 318 | "new_device", "delete_device", |
| 319 | createsHWMon::hasHWMonDir)}, |
Scron Chang | 5d11daf | 2021-07-26 13:38:26 +0800 | [diff] [blame] | 320 | {"MAX31790", |
| 321 | ExportTemplate("max31790 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 322 | "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 Ren | ed2f07b | 2022-02-16 14:59:09 -0800 | [diff] [blame] | 327 | {"ADM1293", |
| 328 | ExportTemplate("adm1293 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 329 | "new_device", "delete_device", |
| 330 | createsHWMon::noHWMonDir)}, |
Zhikui Ren | ed2f07b | 2022-02-16 14:59:09 -0800 | [diff] [blame] | 331 | {"INA219", |
| 332 | ExportTemplate("ina219 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 333 | "new_device", "delete_device", |
| 334 | createsHWMon::noHWMonDir)}, |
Zhikui Ren | ec6183c | 2022-02-26 23:04:34 -0800 | [diff] [blame] | 335 | {"RAA229126", |
| 336 | ExportTemplate("raa229126 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 337 | "new_device", "delete_device", |
| 338 | createsHWMon::hasHWMonDir)}, |
Konstantin Aladyshev | 91df531 | 2022-10-19 18:46:27 +0300 | [diff] [blame^] | 339 | {"TPS53679", |
| 340 | ExportTemplate("tps53679 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
| 341 | "new_device", "delete_device", |
| 342 | createsHWMon::hasHWMonDir)}, |
Shamim Ali | 3f4527a | 2022-06-08 23:19:11 +0530 | [diff] [blame] | 343 | {"MP2971", |
| 344 | ExportTemplate("mp2971 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 345 | "new_device", "delete_device", |
| 346 | createsHWMon::hasHWMonDir)}, |
Shamim Ali | 3f4527a | 2022-06-08 23:19:11 +0530 | [diff] [blame] | 347 | {"MP2973", |
| 348 | ExportTemplate("mp2973 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 349 | "new_device", "delete_device", |
| 350 | createsHWMon::hasHWMonDir)}, |
Potin Lai | f51f6af | 2022-06-28 09:55:19 +0800 | [diff] [blame] | 351 | {"HDC1080", |
| 352 | ExportTemplate("hdc1080 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 353 | "new_device", "delete_device", |
| 354 | createsHWMon::noHWMonDir)}}}; |
Jae Hyun Yoo | 9cdeabb | 2018-10-16 11:47:09 -0700 | [diff] [blame] | 355 | } // namespace devices |