.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * it87.c - Part of lm_sensors, Linux kernel modules for hardware |
---|
3 | 4 | * monitoring. |
---|
.. | .. |
---|
37 | 38 | * |
---|
38 | 39 | * Copyright (C) 2001 Chris Gauthron |
---|
39 | 40 | * 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. |
---|
50 | 41 | */ |
---|
51 | 42 | |
---|
52 | 43 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
---|
.. | .. |
---|
495 | 486 | #define has_pwm_freq2(data) ((data)->features & FEAT_PWM_FREQ2) |
---|
496 | 487 | #define has_six_temp(data) ((data)->features & FEAT_SIX_TEMP) |
---|
497 | 488 | #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)) |
---|
498 | 491 | |
---|
499 | 492 | struct it87_sio_data { |
---|
500 | 493 | int sioaddr; |
---|
.. | .. |
---|
3107 | 3100 | "Detected broken BIOS defaults, disabling PWM interface\n"); |
---|
3108 | 3101 | |
---|
3109 | 3102 | /* Starting with IT8721F, we handle scaling of internal voltages */ |
---|
3110 | | - if (has_12mv_adc(data)) { |
---|
| 3103 | + if (has_scaling(data)) { |
---|
3111 | 3104 | if (sio_data->internal & BIT(0)) |
---|
3112 | 3105 | data->in_scaled |= BIT(3); /* in3 is AVCC */ |
---|
3113 | 3106 | if (sio_data->internal & BIT(1)) |
---|