hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/hwmon/it87.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * it87.c - Part of lm_sensors, Linux kernel modules for hardware
34 * monitoring.
....@@ -37,16 +38,6 @@
3738 *
3839 * Copyright (C) 2001 Chris Gauthron
3940 * Copyright (C) 2005-2010 Jean Delvare <jdelvare@suse.de>
40
- *
41
- * This program is free software; you can redistribute it and/or modify
42
- * it under the terms of the GNU General Public License as published by
43
- * the Free Software Foundation; either version 2 of the License, or
44
- * (at your option) any later version.
45
- *
46
- * This program is distributed in the hope that it will be useful,
47
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
48
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49
- * GNU General Public License for more details.
5041 */
5142
5243 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -495,6 +486,8 @@
495486 #define has_pwm_freq2(data) ((data)->features & FEAT_PWM_FREQ2)
496487 #define has_six_temp(data) ((data)->features & FEAT_SIX_TEMP)
497488 #define has_vin3_5v(data) ((data)->features & FEAT_VIN3_5V)
489
+#define has_scaling(data) ((data)->features & (FEAT_12MV_ADC | \
490
+ FEAT_10_9MV_ADC))
498491
499492 struct it87_sio_data {
500493 int sioaddr;
....@@ -3107,7 +3100,7 @@
31073100 "Detected broken BIOS defaults, disabling PWM interface\n");
31083101
31093102 /* Starting with IT8721F, we handle scaling of internal voltages */
3110
- if (has_12mv_adc(data)) {
3103
+ if (has_scaling(data)) {
31113104 if (sio_data->internal & BIT(0))
31123105 data->in_scaled |= BIT(3); /* in3 is AVCC */
31133106 if (sio_data->internal & BIT(1))