| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /*************************************************************************** |
|---|
| 2 | 3 | * Copyright (C) 2011-2012 Hans de Goede <hdegoede@redhat.com> * |
|---|
| 3 | 4 | * * |
|---|
| 4 | | - * This program is free software; you can redistribute it and/or modify * |
|---|
| 5 | | - * it under the terms of the GNU General Public License as published by * |
|---|
| 6 | | - * the Free Software Foundation; either version 2 of the License, or * |
|---|
| 7 | | - * (at your option) any later version. * |
|---|
| 8 | | - * * |
|---|
| 9 | | - * This program is distributed in the hope that it will be useful, * |
|---|
| 10 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
|---|
| 11 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
|---|
| 12 | | - * GNU General Public License for more details. * |
|---|
| 13 | | - * * |
|---|
| 14 | | - * You should have received a copy of the GNU General Public License * |
|---|
| 15 | | - * along with this program; if not, write to the * |
|---|
| 16 | | - * Free Software Foundation, Inc., * |
|---|
| 17 | | - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
|---|
| 18 | 5 | ***************************************************************************/ |
|---|
| 19 | 6 | |
|---|
| 20 | 7 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
|---|
| .. | .. |
|---|
| 170 | 157 | return 5400540 / reg; |
|---|
| 171 | 158 | } |
|---|
| 172 | 159 | |
|---|
| 173 | | -static ssize_t show_name(struct device *dev, struct device_attribute *devattr, |
|---|
| 174 | | - char *buf) |
|---|
| 160 | +static ssize_t name_show(struct device *dev, struct device_attribute *devattr, |
|---|
| 161 | + char *buf) |
|---|
| 175 | 162 | { |
|---|
| 176 | 163 | return snprintf(buf, PAGE_SIZE, "%s\n", DEVNAME); |
|---|
| 177 | 164 | } |
|---|
| 178 | 165 | |
|---|
| 179 | | -static ssize_t show_in_value(struct device *dev, struct device_attribute |
|---|
| 180 | | - *devattr, char *buf) |
|---|
| 166 | +static ssize_t in_value_show(struct device *dev, |
|---|
| 167 | + struct device_attribute *devattr, char *buf) |
|---|
| 181 | 168 | { |
|---|
| 182 | 169 | struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); |
|---|
| 183 | 170 | struct sch5636_data *data = sch5636_update_device(dev); |
|---|
| .. | .. |
|---|
| 192 | 179 | return snprintf(buf, PAGE_SIZE, "%d\n", val); |
|---|
| 193 | 180 | } |
|---|
| 194 | 181 | |
|---|
| 195 | | -static ssize_t show_in_label(struct device *dev, struct device_attribute |
|---|
| 196 | | - *devattr, char *buf) |
|---|
| 182 | +static ssize_t in_label_show(struct device *dev, |
|---|
| 183 | + struct device_attribute *devattr, char *buf) |
|---|
| 197 | 184 | { |
|---|
| 198 | 185 | struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); |
|---|
| 199 | 186 | |
|---|
| .. | .. |
|---|
| 201 | 188 | SCH5636_IN_LABELS[attr->index]); |
|---|
| 202 | 189 | } |
|---|
| 203 | 190 | |
|---|
| 204 | | -static ssize_t show_temp_value(struct device *dev, struct device_attribute |
|---|
| 205 | | - *devattr, char *buf) |
|---|
| 191 | +static ssize_t temp_value_show(struct device *dev, |
|---|
| 192 | + struct device_attribute *devattr, char *buf) |
|---|
| 206 | 193 | { |
|---|
| 207 | 194 | struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); |
|---|
| 208 | 195 | struct sch5636_data *data = sch5636_update_device(dev); |
|---|
| .. | .. |
|---|
| 215 | 202 | return snprintf(buf, PAGE_SIZE, "%d\n", val); |
|---|
| 216 | 203 | } |
|---|
| 217 | 204 | |
|---|
| 218 | | -static ssize_t show_temp_fault(struct device *dev, struct device_attribute |
|---|
| 219 | | - *devattr, char *buf) |
|---|
| 205 | +static ssize_t temp_fault_show(struct device *dev, |
|---|
| 206 | + struct device_attribute *devattr, char *buf) |
|---|
| 220 | 207 | { |
|---|
| 221 | 208 | struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); |
|---|
| 222 | 209 | struct sch5636_data *data = sch5636_update_device(dev); |
|---|
| .. | .. |
|---|
| 229 | 216 | return snprintf(buf, PAGE_SIZE, "%d\n", val); |
|---|
| 230 | 217 | } |
|---|
| 231 | 218 | |
|---|
| 232 | | -static ssize_t show_temp_alarm(struct device *dev, struct device_attribute |
|---|
| 233 | | - *devattr, char *buf) |
|---|
| 219 | +static ssize_t temp_alarm_show(struct device *dev, |
|---|
| 220 | + struct device_attribute *devattr, char *buf) |
|---|
| 234 | 221 | { |
|---|
| 235 | 222 | struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); |
|---|
| 236 | 223 | struct sch5636_data *data = sch5636_update_device(dev); |
|---|
| .. | .. |
|---|
| 243 | 230 | return snprintf(buf, PAGE_SIZE, "%d\n", val); |
|---|
| 244 | 231 | } |
|---|
| 245 | 232 | |
|---|
| 246 | | -static ssize_t show_fan_value(struct device *dev, struct device_attribute |
|---|
| 247 | | - *devattr, char *buf) |
|---|
| 233 | +static ssize_t fan_value_show(struct device *dev, |
|---|
| 234 | + struct device_attribute *devattr, char *buf) |
|---|
| 248 | 235 | { |
|---|
| 249 | 236 | struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); |
|---|
| 250 | 237 | struct sch5636_data *data = sch5636_update_device(dev); |
|---|
| .. | .. |
|---|
| 260 | 247 | return snprintf(buf, PAGE_SIZE, "%d\n", val); |
|---|
| 261 | 248 | } |
|---|
| 262 | 249 | |
|---|
| 263 | | -static ssize_t show_fan_fault(struct device *dev, struct device_attribute |
|---|
| 264 | | - *devattr, char *buf) |
|---|
| 250 | +static ssize_t fan_fault_show(struct device *dev, |
|---|
| 251 | + struct device_attribute *devattr, char *buf) |
|---|
| 265 | 252 | { |
|---|
| 266 | 253 | struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); |
|---|
| 267 | 254 | struct sch5636_data *data = sch5636_update_device(dev); |
|---|
| .. | .. |
|---|
| 274 | 261 | return snprintf(buf, PAGE_SIZE, "%d\n", val); |
|---|
| 275 | 262 | } |
|---|
| 276 | 263 | |
|---|
| 277 | | -static ssize_t show_fan_alarm(struct device *dev, struct device_attribute |
|---|
| 278 | | - *devattr, char *buf) |
|---|
| 264 | +static ssize_t fan_alarm_show(struct device *dev, |
|---|
| 265 | + struct device_attribute *devattr, char *buf) |
|---|
| 279 | 266 | { |
|---|
| 280 | 267 | struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); |
|---|
| 281 | 268 | struct sch5636_data *data = sch5636_update_device(dev); |
|---|
| .. | .. |
|---|
| 289 | 276 | } |
|---|
| 290 | 277 | |
|---|
| 291 | 278 | static struct sensor_device_attribute sch5636_attr[] = { |
|---|
| 292 | | - SENSOR_ATTR(name, 0444, show_name, NULL, 0), |
|---|
| 293 | | - SENSOR_ATTR(in0_input, 0444, show_in_value, NULL, 0), |
|---|
| 294 | | - SENSOR_ATTR(in0_label, 0444, show_in_label, NULL, 0), |
|---|
| 295 | | - SENSOR_ATTR(in1_input, 0444, show_in_value, NULL, 1), |
|---|
| 296 | | - SENSOR_ATTR(in1_label, 0444, show_in_label, NULL, 1), |
|---|
| 297 | | - SENSOR_ATTR(in2_input, 0444, show_in_value, NULL, 2), |
|---|
| 298 | | - SENSOR_ATTR(in2_label, 0444, show_in_label, NULL, 2), |
|---|
| 299 | | - SENSOR_ATTR(in3_input, 0444, show_in_value, NULL, 3), |
|---|
| 300 | | - SENSOR_ATTR(in3_label, 0444, show_in_label, NULL, 3), |
|---|
| 301 | | - SENSOR_ATTR(in4_input, 0444, show_in_value, NULL, 4), |
|---|
| 302 | | - SENSOR_ATTR(in4_label, 0444, show_in_label, NULL, 4), |
|---|
| 279 | + SENSOR_ATTR_RO(name, name, 0), |
|---|
| 280 | + SENSOR_ATTR_RO(in0_input, in_value, 0), |
|---|
| 281 | + SENSOR_ATTR_RO(in0_label, in_label, 0), |
|---|
| 282 | + SENSOR_ATTR_RO(in1_input, in_value, 1), |
|---|
| 283 | + SENSOR_ATTR_RO(in1_label, in_label, 1), |
|---|
| 284 | + SENSOR_ATTR_RO(in2_input, in_value, 2), |
|---|
| 285 | + SENSOR_ATTR_RO(in2_label, in_label, 2), |
|---|
| 286 | + SENSOR_ATTR_RO(in3_input, in_value, 3), |
|---|
| 287 | + SENSOR_ATTR_RO(in3_label, in_label, 3), |
|---|
| 288 | + SENSOR_ATTR_RO(in4_input, in_value, 4), |
|---|
| 289 | + SENSOR_ATTR_RO(in4_label, in_label, 4), |
|---|
| 303 | 290 | }; |
|---|
| 304 | 291 | |
|---|
| 305 | 292 | static struct sensor_device_attribute sch5636_temp_attr[] = { |
|---|
| 306 | | - SENSOR_ATTR(temp1_input, 0444, show_temp_value, NULL, 0), |
|---|
| 307 | | - SENSOR_ATTR(temp1_fault, 0444, show_temp_fault, NULL, 0), |
|---|
| 308 | | - SENSOR_ATTR(temp1_alarm, 0444, show_temp_alarm, NULL, 0), |
|---|
| 309 | | - SENSOR_ATTR(temp2_input, 0444, show_temp_value, NULL, 1), |
|---|
| 310 | | - SENSOR_ATTR(temp2_fault, 0444, show_temp_fault, NULL, 1), |
|---|
| 311 | | - SENSOR_ATTR(temp2_alarm, 0444, show_temp_alarm, NULL, 1), |
|---|
| 312 | | - SENSOR_ATTR(temp3_input, 0444, show_temp_value, NULL, 2), |
|---|
| 313 | | - SENSOR_ATTR(temp3_fault, 0444, show_temp_fault, NULL, 2), |
|---|
| 314 | | - SENSOR_ATTR(temp3_alarm, 0444, show_temp_alarm, NULL, 2), |
|---|
| 315 | | - SENSOR_ATTR(temp4_input, 0444, show_temp_value, NULL, 3), |
|---|
| 316 | | - SENSOR_ATTR(temp4_fault, 0444, show_temp_fault, NULL, 3), |
|---|
| 317 | | - SENSOR_ATTR(temp4_alarm, 0444, show_temp_alarm, NULL, 3), |
|---|
| 318 | | - SENSOR_ATTR(temp5_input, 0444, show_temp_value, NULL, 4), |
|---|
| 319 | | - SENSOR_ATTR(temp5_fault, 0444, show_temp_fault, NULL, 4), |
|---|
| 320 | | - SENSOR_ATTR(temp5_alarm, 0444, show_temp_alarm, NULL, 4), |
|---|
| 321 | | - SENSOR_ATTR(temp6_input, 0444, show_temp_value, NULL, 5), |
|---|
| 322 | | - SENSOR_ATTR(temp6_fault, 0444, show_temp_fault, NULL, 5), |
|---|
| 323 | | - SENSOR_ATTR(temp6_alarm, 0444, show_temp_alarm, NULL, 5), |
|---|
| 324 | | - SENSOR_ATTR(temp7_input, 0444, show_temp_value, NULL, 6), |
|---|
| 325 | | - SENSOR_ATTR(temp7_fault, 0444, show_temp_fault, NULL, 6), |
|---|
| 326 | | - SENSOR_ATTR(temp7_alarm, 0444, show_temp_alarm, NULL, 6), |
|---|
| 327 | | - SENSOR_ATTR(temp8_input, 0444, show_temp_value, NULL, 7), |
|---|
| 328 | | - SENSOR_ATTR(temp8_fault, 0444, show_temp_fault, NULL, 7), |
|---|
| 329 | | - SENSOR_ATTR(temp8_alarm, 0444, show_temp_alarm, NULL, 7), |
|---|
| 330 | | - SENSOR_ATTR(temp9_input, 0444, show_temp_value, NULL, 8), |
|---|
| 331 | | - SENSOR_ATTR(temp9_fault, 0444, show_temp_fault, NULL, 8), |
|---|
| 332 | | - SENSOR_ATTR(temp9_alarm, 0444, show_temp_alarm, NULL, 8), |
|---|
| 333 | | - SENSOR_ATTR(temp10_input, 0444, show_temp_value, NULL, 9), |
|---|
| 334 | | - SENSOR_ATTR(temp10_fault, 0444, show_temp_fault, NULL, 9), |
|---|
| 335 | | - SENSOR_ATTR(temp10_alarm, 0444, show_temp_alarm, NULL, 9), |
|---|
| 336 | | - SENSOR_ATTR(temp11_input, 0444, show_temp_value, NULL, 10), |
|---|
| 337 | | - SENSOR_ATTR(temp11_fault, 0444, show_temp_fault, NULL, 10), |
|---|
| 338 | | - SENSOR_ATTR(temp11_alarm, 0444, show_temp_alarm, NULL, 10), |
|---|
| 339 | | - SENSOR_ATTR(temp12_input, 0444, show_temp_value, NULL, 11), |
|---|
| 340 | | - SENSOR_ATTR(temp12_fault, 0444, show_temp_fault, NULL, 11), |
|---|
| 341 | | - SENSOR_ATTR(temp12_alarm, 0444, show_temp_alarm, NULL, 11), |
|---|
| 342 | | - SENSOR_ATTR(temp13_input, 0444, show_temp_value, NULL, 12), |
|---|
| 343 | | - SENSOR_ATTR(temp13_fault, 0444, show_temp_fault, NULL, 12), |
|---|
| 344 | | - SENSOR_ATTR(temp13_alarm, 0444, show_temp_alarm, NULL, 12), |
|---|
| 345 | | - SENSOR_ATTR(temp14_input, 0444, show_temp_value, NULL, 13), |
|---|
| 346 | | - SENSOR_ATTR(temp14_fault, 0444, show_temp_fault, NULL, 13), |
|---|
| 347 | | - SENSOR_ATTR(temp14_alarm, 0444, show_temp_alarm, NULL, 13), |
|---|
| 348 | | - SENSOR_ATTR(temp15_input, 0444, show_temp_value, NULL, 14), |
|---|
| 349 | | - SENSOR_ATTR(temp15_fault, 0444, show_temp_fault, NULL, 14), |
|---|
| 350 | | - SENSOR_ATTR(temp15_alarm, 0444, show_temp_alarm, NULL, 14), |
|---|
| 351 | | - SENSOR_ATTR(temp16_input, 0444, show_temp_value, NULL, 15), |
|---|
| 352 | | - SENSOR_ATTR(temp16_fault, 0444, show_temp_fault, NULL, 15), |
|---|
| 353 | | - SENSOR_ATTR(temp16_alarm, 0444, show_temp_alarm, NULL, 15), |
|---|
| 293 | + SENSOR_ATTR_RO(temp1_input, temp_value, 0), |
|---|
| 294 | + SENSOR_ATTR_RO(temp1_fault, temp_fault, 0), |
|---|
| 295 | + SENSOR_ATTR_RO(temp1_alarm, temp_alarm, 0), |
|---|
| 296 | + SENSOR_ATTR_RO(temp2_input, temp_value, 1), |
|---|
| 297 | + SENSOR_ATTR_RO(temp2_fault, temp_fault, 1), |
|---|
| 298 | + SENSOR_ATTR_RO(temp2_alarm, temp_alarm, 1), |
|---|
| 299 | + SENSOR_ATTR_RO(temp3_input, temp_value, 2), |
|---|
| 300 | + SENSOR_ATTR_RO(temp3_fault, temp_fault, 2), |
|---|
| 301 | + SENSOR_ATTR_RO(temp3_alarm, temp_alarm, 2), |
|---|
| 302 | + SENSOR_ATTR_RO(temp4_input, temp_value, 3), |
|---|
| 303 | + SENSOR_ATTR_RO(temp4_fault, temp_fault, 3), |
|---|
| 304 | + SENSOR_ATTR_RO(temp4_alarm, temp_alarm, 3), |
|---|
| 305 | + SENSOR_ATTR_RO(temp5_input, temp_value, 4), |
|---|
| 306 | + SENSOR_ATTR_RO(temp5_fault, temp_fault, 4), |
|---|
| 307 | + SENSOR_ATTR_RO(temp5_alarm, temp_alarm, 4), |
|---|
| 308 | + SENSOR_ATTR_RO(temp6_input, temp_value, 5), |
|---|
| 309 | + SENSOR_ATTR_RO(temp6_fault, temp_fault, 5), |
|---|
| 310 | + SENSOR_ATTR_RO(temp6_alarm, temp_alarm, 5), |
|---|
| 311 | + SENSOR_ATTR_RO(temp7_input, temp_value, 6), |
|---|
| 312 | + SENSOR_ATTR_RO(temp7_fault, temp_fault, 6), |
|---|
| 313 | + SENSOR_ATTR_RO(temp7_alarm, temp_alarm, 6), |
|---|
| 314 | + SENSOR_ATTR_RO(temp8_input, temp_value, 7), |
|---|
| 315 | + SENSOR_ATTR_RO(temp8_fault, temp_fault, 7), |
|---|
| 316 | + SENSOR_ATTR_RO(temp8_alarm, temp_alarm, 7), |
|---|
| 317 | + SENSOR_ATTR_RO(temp9_input, temp_value, 8), |
|---|
| 318 | + SENSOR_ATTR_RO(temp9_fault, temp_fault, 8), |
|---|
| 319 | + SENSOR_ATTR_RO(temp9_alarm, temp_alarm, 8), |
|---|
| 320 | + SENSOR_ATTR_RO(temp10_input, temp_value, 9), |
|---|
| 321 | + SENSOR_ATTR_RO(temp10_fault, temp_fault, 9), |
|---|
| 322 | + SENSOR_ATTR_RO(temp10_alarm, temp_alarm, 9), |
|---|
| 323 | + SENSOR_ATTR_RO(temp11_input, temp_value, 10), |
|---|
| 324 | + SENSOR_ATTR_RO(temp11_fault, temp_fault, 10), |
|---|
| 325 | + SENSOR_ATTR_RO(temp11_alarm, temp_alarm, 10), |
|---|
| 326 | + SENSOR_ATTR_RO(temp12_input, temp_value, 11), |
|---|
| 327 | + SENSOR_ATTR_RO(temp12_fault, temp_fault, 11), |
|---|
| 328 | + SENSOR_ATTR_RO(temp12_alarm, temp_alarm, 11), |
|---|
| 329 | + SENSOR_ATTR_RO(temp13_input, temp_value, 12), |
|---|
| 330 | + SENSOR_ATTR_RO(temp13_fault, temp_fault, 12), |
|---|
| 331 | + SENSOR_ATTR_RO(temp13_alarm, temp_alarm, 12), |
|---|
| 332 | + SENSOR_ATTR_RO(temp14_input, temp_value, 13), |
|---|
| 333 | + SENSOR_ATTR_RO(temp14_fault, temp_fault, 13), |
|---|
| 334 | + SENSOR_ATTR_RO(temp14_alarm, temp_alarm, 13), |
|---|
| 335 | + SENSOR_ATTR_RO(temp15_input, temp_value, 14), |
|---|
| 336 | + SENSOR_ATTR_RO(temp15_fault, temp_fault, 14), |
|---|
| 337 | + SENSOR_ATTR_RO(temp15_alarm, temp_alarm, 14), |
|---|
| 338 | + SENSOR_ATTR_RO(temp16_input, temp_value, 15), |
|---|
| 339 | + SENSOR_ATTR_RO(temp16_fault, temp_fault, 15), |
|---|
| 340 | + SENSOR_ATTR_RO(temp16_alarm, temp_alarm, 15), |
|---|
| 354 | 341 | }; |
|---|
| 355 | 342 | |
|---|
| 356 | 343 | static struct sensor_device_attribute sch5636_fan_attr[] = { |
|---|
| 357 | | - SENSOR_ATTR(fan1_input, 0444, show_fan_value, NULL, 0), |
|---|
| 358 | | - SENSOR_ATTR(fan1_fault, 0444, show_fan_fault, NULL, 0), |
|---|
| 359 | | - SENSOR_ATTR(fan1_alarm, 0444, show_fan_alarm, NULL, 0), |
|---|
| 360 | | - SENSOR_ATTR(fan2_input, 0444, show_fan_value, NULL, 1), |
|---|
| 361 | | - SENSOR_ATTR(fan2_fault, 0444, show_fan_fault, NULL, 1), |
|---|
| 362 | | - SENSOR_ATTR(fan2_alarm, 0444, show_fan_alarm, NULL, 1), |
|---|
| 363 | | - SENSOR_ATTR(fan3_input, 0444, show_fan_value, NULL, 2), |
|---|
| 364 | | - SENSOR_ATTR(fan3_fault, 0444, show_fan_fault, NULL, 2), |
|---|
| 365 | | - SENSOR_ATTR(fan3_alarm, 0444, show_fan_alarm, NULL, 2), |
|---|
| 366 | | - SENSOR_ATTR(fan4_input, 0444, show_fan_value, NULL, 3), |
|---|
| 367 | | - SENSOR_ATTR(fan4_fault, 0444, show_fan_fault, NULL, 3), |
|---|
| 368 | | - SENSOR_ATTR(fan4_alarm, 0444, show_fan_alarm, NULL, 3), |
|---|
| 369 | | - SENSOR_ATTR(fan5_input, 0444, show_fan_value, NULL, 4), |
|---|
| 370 | | - SENSOR_ATTR(fan5_fault, 0444, show_fan_fault, NULL, 4), |
|---|
| 371 | | - SENSOR_ATTR(fan5_alarm, 0444, show_fan_alarm, NULL, 4), |
|---|
| 372 | | - SENSOR_ATTR(fan6_input, 0444, show_fan_value, NULL, 5), |
|---|
| 373 | | - SENSOR_ATTR(fan6_fault, 0444, show_fan_fault, NULL, 5), |
|---|
| 374 | | - SENSOR_ATTR(fan6_alarm, 0444, show_fan_alarm, NULL, 5), |
|---|
| 375 | | - SENSOR_ATTR(fan7_input, 0444, show_fan_value, NULL, 6), |
|---|
| 376 | | - SENSOR_ATTR(fan7_fault, 0444, show_fan_fault, NULL, 6), |
|---|
| 377 | | - SENSOR_ATTR(fan7_alarm, 0444, show_fan_alarm, NULL, 6), |
|---|
| 378 | | - SENSOR_ATTR(fan8_input, 0444, show_fan_value, NULL, 7), |
|---|
| 379 | | - SENSOR_ATTR(fan8_fault, 0444, show_fan_fault, NULL, 7), |
|---|
| 380 | | - SENSOR_ATTR(fan8_alarm, 0444, show_fan_alarm, NULL, 7), |
|---|
| 344 | + SENSOR_ATTR_RO(fan1_input, fan_value, 0), |
|---|
| 345 | + SENSOR_ATTR_RO(fan1_fault, fan_fault, 0), |
|---|
| 346 | + SENSOR_ATTR_RO(fan1_alarm, fan_alarm, 0), |
|---|
| 347 | + SENSOR_ATTR_RO(fan2_input, fan_value, 1), |
|---|
| 348 | + SENSOR_ATTR_RO(fan2_fault, fan_fault, 1), |
|---|
| 349 | + SENSOR_ATTR_RO(fan2_alarm, fan_alarm, 1), |
|---|
| 350 | + SENSOR_ATTR_RO(fan3_input, fan_value, 2), |
|---|
| 351 | + SENSOR_ATTR_RO(fan3_fault, fan_fault, 2), |
|---|
| 352 | + SENSOR_ATTR_RO(fan3_alarm, fan_alarm, 2), |
|---|
| 353 | + SENSOR_ATTR_RO(fan4_input, fan_value, 3), |
|---|
| 354 | + SENSOR_ATTR_RO(fan4_fault, fan_fault, 3), |
|---|
| 355 | + SENSOR_ATTR_RO(fan4_alarm, fan_alarm, 3), |
|---|
| 356 | + SENSOR_ATTR_RO(fan5_input, fan_value, 4), |
|---|
| 357 | + SENSOR_ATTR_RO(fan5_fault, fan_fault, 4), |
|---|
| 358 | + SENSOR_ATTR_RO(fan5_alarm, fan_alarm, 4), |
|---|
| 359 | + SENSOR_ATTR_RO(fan6_input, fan_value, 5), |
|---|
| 360 | + SENSOR_ATTR_RO(fan6_fault, fan_fault, 5), |
|---|
| 361 | + SENSOR_ATTR_RO(fan6_alarm, fan_alarm, 5), |
|---|
| 362 | + SENSOR_ATTR_RO(fan7_input, fan_value, 6), |
|---|
| 363 | + SENSOR_ATTR_RO(fan7_fault, fan_fault, 6), |
|---|
| 364 | + SENSOR_ATTR_RO(fan7_alarm, fan_alarm, 6), |
|---|
| 365 | + SENSOR_ATTR_RO(fan8_input, fan_value, 7), |
|---|
| 366 | + SENSOR_ATTR_RO(fan8_fault, fan_fault, 7), |
|---|
| 367 | + SENSOR_ATTR_RO(fan8_alarm, fan_alarm, 7), |
|---|
| 381 | 368 | }; |
|---|
| 382 | 369 | |
|---|
| 383 | 370 | static int sch5636_remove(struct platform_device *pdev) |
|---|