hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/hwmon/pmbus/max16064.c
....@@ -1,21 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Hardware monitoring driver for Maxim MAX16064
34 *
45 * 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.
196 */
207
218 #include <linux/kernel.h>
....@@ -28,17 +15,18 @@
2815 #define MAX16064_MFR_VOUT_PEAK 0xd4
2916 #define MAX16064_MFR_TEMPERATURE_PEAK 0xd6
3017
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)
3220 {
3321 int ret;
3422
3523 switch (reg) {
3624 case PMBUS_VIRT_READ_VOUT_MAX:
37
- ret = pmbus_read_word_data(client, page,
25
+ ret = pmbus_read_word_data(client, page, phase,
3826 MAX16064_MFR_VOUT_PEAK);
3927 break;
4028 case PMBUS_VIRT_READ_TEMP_MAX:
41
- ret = pmbus_read_word_data(client, page,
29
+ ret = pmbus_read_word_data(client, page, phase,
4230 MAX16064_MFR_TEMPERATURE_PEAK);
4331 break;
4432 case PMBUS_VIRT_RESET_VOUT_HISTORY:
....@@ -97,10 +85,9 @@
9785 .write_word_data = max16064_write_word_data,
9886 };
9987
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)
10289 {
103
- return pmbus_do_probe(client, id, &max16064_info);
90
+ return pmbus_do_probe(client, &max16064_info);
10491 }
10592
10693 static const struct i2c_device_id max16064_id[] = {
....@@ -115,7 +102,7 @@
115102 .driver = {
116103 .name = "max16064",
117104 },
118
- .probe = max16064_probe,
105
+ .probe_new = max16064_probe,
119106 .remove = pmbus_do_remove,
120107 .id_table = max16064_id,
121108 };