diff options
Diffstat (limited to 'drivers/hwmon/pmbus/max16064.c')
| -rw-r--r-- | drivers/hwmon/pmbus/max16064.c | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/drivers/hwmon/pmbus/max16064.c b/drivers/hwmon/pmbus/max16064.c index fa237a3c3291..eb84915c2a83 100644 --- a/drivers/hwmon/pmbus/max16064.c +++ b/drivers/hwmon/pmbus/max16064.c @@ -1,21 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Hardware monitoring driver for Maxim MAX16064 * * Copyright (c) 2011 Ericsson AB. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <linux/kernel.h> @@ -28,17 +15,18 @@ #define MAX16064_MFR_VOUT_PEAK 0xd4 #define MAX16064_MFR_TEMPERATURE_PEAK 0xd6 -static int max16064_read_word_data(struct i2c_client *client, int page, int reg) +static int max16064_read_word_data(struct i2c_client *client, int page, + int phase, int reg) { int ret; switch (reg) { case PMBUS_VIRT_READ_VOUT_MAX: - ret = pmbus_read_word_data(client, page, + ret = pmbus_read_word_data(client, page, phase, MAX16064_MFR_VOUT_PEAK); break; case PMBUS_VIRT_READ_TEMP_MAX: - ret = pmbus_read_word_data(client, page, + ret = pmbus_read_word_data(client, page, phase, MAX16064_MFR_TEMPERATURE_PEAK); break; case PMBUS_VIRT_RESET_VOUT_HISTORY: @@ -97,14 +85,13 @@ static struct pmbus_driver_info max16064_info = { .write_word_data = max16064_write_word_data, }; -static int max16064_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int max16064_probe(struct i2c_client *client) { - return pmbus_do_probe(client, id, &max16064_info); + return pmbus_do_probe(client, &max16064_info); } static const struct i2c_device_id max16064_id[] = { - {"max16064", 0}, + {"max16064"}, {} }; @@ -116,7 +103,6 @@ static struct i2c_driver max16064_driver = { .name = "max16064", }, .probe = max16064_probe, - .remove = pmbus_do_remove, .id_table = max16064_id, }; @@ -125,3 +111,4 @@ module_i2c_driver(max16064_driver); MODULE_AUTHOR("Guenter Roeck"); MODULE_DESCRIPTION("PMBus driver for Maxim MAX16064"); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS("PMBUS"); |
