.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Hardware monitoring driver for Maxim MAX16064 |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) 2011 Ericsson AB. |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify |
---|
7 | | - * it under the terms of the GNU General Public License as published by |
---|
8 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
9 | | - * (at your option) any later version. |
---|
10 | | - * |
---|
11 | | - * This program is distributed in the hope that it will be useful, |
---|
12 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
14 | | - * GNU General Public License for more details. |
---|
15 | | - * |
---|
16 | | - * You should have received a copy of the GNU General Public License |
---|
17 | | - * along with this program; if not, write to the Free Software |
---|
18 | | - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
19 | 6 | */ |
---|
20 | 7 | |
---|
21 | 8 | #include <linux/kernel.h> |
---|
.. | .. |
---|
28 | 15 | #define MAX16064_MFR_VOUT_PEAK 0xd4 |
---|
29 | 16 | #define MAX16064_MFR_TEMPERATURE_PEAK 0xd6 |
---|
30 | 17 | |
---|
31 | | -static int max16064_read_word_data(struct i2c_client *client, int page, int reg) |
---|
| 18 | +static int max16064_read_word_data(struct i2c_client *client, int page, |
---|
| 19 | + int phase, int reg) |
---|
32 | 20 | { |
---|
33 | 21 | int ret; |
---|
34 | 22 | |
---|
35 | 23 | switch (reg) { |
---|
36 | 24 | case PMBUS_VIRT_READ_VOUT_MAX: |
---|
37 | | - ret = pmbus_read_word_data(client, page, |
---|
| 25 | + ret = pmbus_read_word_data(client, page, phase, |
---|
38 | 26 | MAX16064_MFR_VOUT_PEAK); |
---|
39 | 27 | break; |
---|
40 | 28 | case PMBUS_VIRT_READ_TEMP_MAX: |
---|
41 | | - ret = pmbus_read_word_data(client, page, |
---|
| 29 | + ret = pmbus_read_word_data(client, page, phase, |
---|
42 | 30 | MAX16064_MFR_TEMPERATURE_PEAK); |
---|
43 | 31 | break; |
---|
44 | 32 | case PMBUS_VIRT_RESET_VOUT_HISTORY: |
---|
.. | .. |
---|
97 | 85 | .write_word_data = max16064_write_word_data, |
---|
98 | 86 | }; |
---|
99 | 87 | |
---|
100 | | -static int max16064_probe(struct i2c_client *client, |
---|
101 | | - const struct i2c_device_id *id) |
---|
| 88 | +static int max16064_probe(struct i2c_client *client) |
---|
102 | 89 | { |
---|
103 | | - return pmbus_do_probe(client, id, &max16064_info); |
---|
| 90 | + return pmbus_do_probe(client, &max16064_info); |
---|
104 | 91 | } |
---|
105 | 92 | |
---|
106 | 93 | static const struct i2c_device_id max16064_id[] = { |
---|
.. | .. |
---|
115 | 102 | .driver = { |
---|
116 | 103 | .name = "max16064", |
---|
117 | 104 | }, |
---|
118 | | - .probe = max16064_probe, |
---|
| 105 | + .probe_new = max16064_probe, |
---|
119 | 106 | .remove = pmbus_do_remove, |
---|
120 | 107 | .id_table = max16064_id, |
---|
121 | 108 | }; |
---|