.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* Lantiq cpu temperature sensor driver |
---|
2 | 3 | * |
---|
3 | 4 | * Copyright (C) 2017 Florian Eckert <fe@dev.tdt.de> |
---|
4 | | - * |
---|
5 | | - * This program is free software; you can redistribute it and/or modify |
---|
6 | | - * it under the terms of the GNU General Public License as published by |
---|
7 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
8 | | - * (at your option) any later version |
---|
9 | | - * |
---|
10 | | - * This program is distributed in the hope that it will be useful |
---|
11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 | | - * GNU General Public License for more details |
---|
14 | | - * |
---|
15 | | - * You should have received a copy of the GNU General Public License |
---|
16 | | - * along with this program; if not, see <http://www.gnu.org/licenses/> |
---|
17 | 5 | */ |
---|
18 | 6 | |
---|
19 | 7 | #include <linux/bitops.h> |
---|
.. | .. |
---|
77 | 65 | } |
---|
78 | 66 | } |
---|
79 | 67 | |
---|
80 | | -static const u32 ltq_chip_config[] = { |
---|
81 | | - HWMON_C_REGISTER_TZ, |
---|
82 | | - 0 |
---|
83 | | -}; |
---|
84 | | - |
---|
85 | | -static const struct hwmon_channel_info ltq_chip = { |
---|
86 | | - .type = hwmon_chip, |
---|
87 | | - .config = ltq_chip_config, |
---|
88 | | -}; |
---|
89 | | - |
---|
90 | | -static const u32 ltq_temp_config[] = { |
---|
91 | | - HWMON_T_INPUT, |
---|
92 | | - 0 |
---|
93 | | -}; |
---|
94 | | - |
---|
95 | | -static const struct hwmon_channel_info ltq_temp = { |
---|
96 | | - .type = hwmon_temp, |
---|
97 | | - .config = ltq_temp_config, |
---|
98 | | -}; |
---|
99 | | - |
---|
100 | 68 | static const struct hwmon_channel_info *ltq_info[] = { |
---|
101 | | - <q_chip, |
---|
102 | | - <q_temp, |
---|
| 69 | + HWMON_CHANNEL_INFO(chip, |
---|
| 70 | + HWMON_C_REGISTER_TZ), |
---|
| 71 | + HWMON_CHANNEL_INFO(temp, |
---|
| 72 | + HWMON_T_INPUT), |
---|
103 | 73 | NULL |
---|
104 | 74 | }; |
---|
105 | 75 | |
---|