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)}, |
Joseph Fu | 9fa8f41 | 2022-11-07 09:23:33 +0800 | [diff] [blame] | 114 | {"ADS1015", |
| 115 | ExportTemplate("ads1015 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
| 116 | "new_device", "delete_device", |
| 117 | createsHWMon::noHWMonDir)}, |
Michal Bielecki | ff503d8 | 2022-04-29 10:20:08 +0200 | [diff] [blame] | 118 | {"ADS7828", |
| 119 | ExportTemplate("ads7828 $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)}, |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 122 | {"EEPROM", |
| 123 | ExportTemplate("eeprom $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 | {"Gpio", ExportTemplate("$Index", "/sys/class/gpio", "export", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 127 | "unexport", createsHWMon::noHWMonDir)}, |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 128 | {"INA230", |
| 129 | ExportTemplate("ina230 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 130 | "new_device", "delete_device", |
| 131 | createsHWMon::hasHWMonDir)}, |
Alex Qiu | 0cbe6bf | 2020-01-03 09:20:02 -0800 | [diff] [blame] | 132 | {"ISL68137", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 133 | ExportTemplate("isl68137 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 134 | "new_device", "delete_device", |
| 135 | createsHWMon::hasHWMonDir)}, |
Yung Sheng Huang | ec5e74e | 2022-05-06 10:02:18 +0800 | [diff] [blame] | 136 | {"ISL68220", |
| 137 | ExportTemplate("isl68220 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 138 | "new_device", "delete_device", |
| 139 | createsHWMon::hasHWMonDir)}, |
Khang Kieu | 20fb4ae | 2022-02-09 02:04:33 +0000 | [diff] [blame] | 140 | {"ISL69225", |
| 141 | ExportTemplate("isl69225 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 142 | "new_device", "delete_device", |
| 143 | createsHWMon::hasHWMonDir)}, |
Gaurav Gandhi | bdad957 | 2020-12-29 03:14:48 +0000 | [diff] [blame] | 144 | {"ISL68223", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 145 | ExportTemplate("isl68223 $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)}, |
Gaurav Gandhi | bdad957 | 2020-12-29 03:14:48 +0000 | [diff] [blame] | 148 | {"ISL69243", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 149 | ExportTemplate("isl69243 $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)}, |
Zhikui Ren | ed2f07b | 2022-02-16 14:59:09 -0800 | [diff] [blame] | 152 | {"ISL69260", |
| 153 | ExportTemplate("isl69260 $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)}, |
Alex Qiu | ba5424a | 2020-01-29 13:33:16 -0800 | [diff] [blame] | 156 | {"MAX16601", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 157 | ExportTemplate("max16601 $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 | {"MAX20710", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 161 | ExportTemplate("max20710 $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)}, |
Alex Qiu | 9354bf7 | 2020-01-22 17:52:32 -0800 | [diff] [blame] | 164 | {"MAX20730", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 165 | ExportTemplate("max20730 $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)}, |
Alex Qiu | 9354bf7 | 2020-01-22 17:52:32 -0800 | [diff] [blame] | 168 | {"MAX20734", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 169 | ExportTemplate("max20734 $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 | 9354bf7 | 2020-01-22 17:52:32 -0800 | [diff] [blame] | 172 | {"MAX20796", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 173 | ExportTemplate("max20796 $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)}, |
Nan Zhou | 296667f | 2021-02-23 09:53:14 -0800 | [diff] [blame] | 176 | {"MAX34440", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 177 | ExportTemplate("max34440 $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 | 0cbe6bf | 2020-01-03 09:20:02 -0800 | [diff] [blame] | 180 | {"MAX34451", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 181 | ExportTemplate("max34451 $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)}, |
Jan Sowinski | 50b2e0f | 2022-05-06 16:47:12 +0200 | [diff] [blame] | 184 | {"PCA9542Mux", |
| 185 | ExportTemplate("pca9542 $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::noHWMonDir)}, |
Devjit Gopalpur | 4acdc54 | 2019-10-10 22:47:46 -0700 | [diff] [blame] | 188 | {"PCA9543Mux", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 189 | ExportTemplate("pca9543 $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::noHWMonDir)}, |
Devjit Gopalpur | 4acdc54 | 2019-10-10 22:47:46 -0700 | [diff] [blame] | 192 | {"PCA9544Mux", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 193 | ExportTemplate("pca9544 $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::noHWMonDir)}, |
Devjit Gopalpur | 4acdc54 | 2019-10-10 22:47:46 -0700 | [diff] [blame] | 196 | {"PCA9545Mux", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 197 | ExportTemplate("pca9545 $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::noHWMonDir)}, |
Devjit Gopalpur | 4acdc54 | 2019-10-10 22:47:46 -0700 | [diff] [blame] | 200 | {"PCA9546Mux", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 201 | ExportTemplate("pca9546 $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::noHWMonDir)}, |
Devjit Gopalpur | 4acdc54 | 2019-10-10 22:47:46 -0700 | [diff] [blame] | 204 | {"PCA9547Mux", |
Johnathan Mantey | 9b86787 | 2020-10-13 15:00:51 -0700 | [diff] [blame] | 205 | ExportTemplate("pca9547 $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::noHWMonDir)}, |
Sujoy Ray | e4dc140 | 2022-04-15 10:28:34 -0700 | [diff] [blame] | 208 | {"PCA9548Mux", |
| 209 | ExportTemplate("pca9548 $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::noHWMonDir)}, |
Jan Sowinski | 50b2e0f | 2022-05-06 16:47:12 +0200 | [diff] [blame] | 212 | {"PCA9846Mux", |
| 213 | ExportTemplate("pca9846 $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::noHWMonDir)}, |
Jiaqing Zhao | 88333fe | 2022-05-06 15:00:15 +0800 | [diff] [blame] | 216 | {"PCA9847Mux", |
| 217 | ExportTemplate("pca9847 $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)}, |
Jiaqing Zhao | 88333fe | 2022-05-06 15:00:15 +0800 | [diff] [blame] | 220 | {"PCA9848Mux", |
| 221 | ExportTemplate("pca9848 $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)}, |
Jiaqing Zhao | 88333fe | 2022-05-06 15:00:15 +0800 | [diff] [blame] | 224 | {"PCA9849Mux", |
| 225 | ExportTemplate("pca9849 $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)}, |
Yung Sheng Huang | 2ca8529 | 2022-07-15 09:59:50 +0800 | [diff] [blame] | 228 | {"SIC450", |
| 229 | ExportTemplate("sic450 $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::hasHWMonDir)}, |
| 232 | {"pmbus", ExportTemplate("pmbus $Address", |
| 233 | "/sys/bus/i2c/devices/i2c-$Bus", "new_device", |
| 234 | "delete_device", createsHWMon::hasHWMonDir)}, |
Lotus Xu | 93db9bf | 2021-09-08 13:47:47 +0800 | [diff] [blame] | 235 | {"PXE1610", |
| 236 | ExportTemplate("pxe1610 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 237 | "new_device", "delete_device", |
| 238 | createsHWMon::hasHWMonDir)}, |
Yung Sheng Huang | 2f464bd | 2022-09-02 11:37:48 +0800 | [diff] [blame] | 239 | {"Q50SN12072", |
| 240 | ExportTemplate("q50sn12072 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
| 241 | "new_device", "delete_device", |
| 242 | createsHWMon::hasHWMonDir)}, |
Lotus Xu | 93db9bf | 2021-09-08 13:47:47 +0800 | [diff] [blame] | 243 | {"XDPE12284", |
| 244 | ExportTemplate("xdpe12284 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 245 | "new_device", "delete_device", |
| 246 | createsHWMon::hasHWMonDir)}, |
Zev Weiss | 27adbb7 | 2022-04-01 16:17:09 -0700 | [diff] [blame] | 247 | {"LM25066", |
| 248 | ExportTemplate("lm25066 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 249 | "new_device", "delete_device", |
| 250 | createsHWMon::hasHWMonDir)}, |
Scron Chang | 2fb84ef | 2021-07-14 20:32:14 +0800 | [diff] [blame] | 251 | {"RAA228000", |
| 252 | ExportTemplate("raa228000 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 253 | "new_device", "delete_device", |
| 254 | createsHWMon::hasHWMonDir)}, |
Scron Chang | 2fb84ef | 2021-07-14 20:32:14 +0800 | [diff] [blame] | 255 | {"DPS800", |
| 256 | ExportTemplate("dps800 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 257 | "new_device", "delete_device", |
| 258 | createsHWMon::hasHWMonDir)}, |
Scron Chang | 5d11daf | 2021-07-26 13:38:26 +0800 | [diff] [blame] | 259 | {"MAX31790", |
| 260 | ExportTemplate("max31790 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 261 | "new_device", "delete_device", |
| 262 | createsHWMon::hasHWMonDir)}, |
Zhikui Ren | ed2f07b | 2022-02-16 14:59:09 -0800 | [diff] [blame] | 263 | {"ADM1293", |
| 264 | ExportTemplate("adm1293 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 265 | "new_device", "delete_device", |
Matt Simmering | 8172db8 | 2022-09-29 16:02:03 -0700 | [diff] [blame] | 266 | createsHWMon::hasHWMonDir)}, |
Zhikui Ren | ed2f07b | 2022-02-16 14:59:09 -0800 | [diff] [blame] | 267 | {"INA219", |
| 268 | ExportTemplate("ina219 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 269 | "new_device", "delete_device", |
Matt Simmering | 8172db8 | 2022-09-29 16:02:03 -0700 | [diff] [blame] | 270 | createsHWMon::hasHWMonDir)}, |
Zhikui Ren | ec6183c | 2022-02-26 23:04:34 -0800 | [diff] [blame] | 271 | {"RAA229126", |
| 272 | ExportTemplate("raa229126 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 273 | "new_device", "delete_device", |
| 274 | createsHWMon::hasHWMonDir)}, |
Yung Sheng Huang | 6d52427 | 2022-09-02 11:47:10 +0800 | [diff] [blame] | 275 | {"RAA229620", |
| 276 | ExportTemplate("raa229620 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
| 277 | "new_device", "delete_device", |
| 278 | createsHWMon::hasHWMonDir)}, |
| 279 | {"RAA229621", |
| 280 | ExportTemplate("raa229621 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
| 281 | "new_device", "delete_device", |
| 282 | createsHWMon::hasHWMonDir)}, |
Konstantin Aladyshev | 91df531 | 2022-10-19 18:46:27 +0300 | [diff] [blame] | 283 | {"TPS53679", |
| 284 | ExportTemplate("tps53679 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
| 285 | "new_device", "delete_device", |
| 286 | createsHWMon::hasHWMonDir)}, |
Shamim Ali | 3f4527a | 2022-06-08 23:19:11 +0530 | [diff] [blame] | 287 | {"MP2971", |
| 288 | ExportTemplate("mp2971 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 289 | "new_device", "delete_device", |
| 290 | createsHWMon::hasHWMonDir)}, |
Shamim Ali | 3f4527a | 2022-06-08 23:19:11 +0530 | [diff] [blame] | 291 | {"MP2973", |
| 292 | ExportTemplate("mp2973 $Address", "/sys/bus/i2c/devices/i2c-$Bus", |
Johnathan Mantey | 7b21ef2 | 2022-08-08 12:57:55 -0700 | [diff] [blame] | 293 | "new_device", "delete_device", |
Zev Weiss | e22143d | 2022-08-03 16:29:06 -0700 | [diff] [blame] | 294 | createsHWMon::hasHWMonDir)}}}; |
Jae Hyun Yoo | 9cdeabb | 2018-10-16 11:47:09 -0700 | [diff] [blame] | 295 | } // namespace devices |