mp2975.c (d2bc4a994a1eb34cf35615af86445d105f419192) mp2975.c (9050b39b2fab51231b6a68d00238e6edea950987)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Hardware monitoring driver for MPS Multi-phase Digital VR Controllers
4 *
5 * Copyright (C) 2020 Nvidia Technologies Ltd.
6 */
7
8#include <linux/bitops.h>

--- 928 unchanged lines hidden (view full) ---

937 DIV_ROUND_CLOSEST(data->vref_off[i] *
938 data->vout_scale,
939 10);
940 }
941
942 return 0;
943}
944
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Hardware monitoring driver for MPS Multi-phase Digital VR Controllers
4 *
5 * Copyright (C) 2020 Nvidia Technologies Ltd.
6 */
7
8#include <linux/bitops.h>

--- 928 unchanged lines hidden (view full) ---

937 DIV_ROUND_CLOSEST(data->vref_off[i] *
938 data->vout_scale,
939 10);
940 }
941
942 return 0;
943}
944
945static struct pmbus_driver_info mp2975_info = {
945static const struct pmbus_driver_info mp2975_info = {
946 .pages = 1,
947 .format[PSC_VOLTAGE_IN] = linear,
948 .format[PSC_VOLTAGE_OUT] = direct,
949 .format[PSC_TEMPERATURE] = direct,
950 .format[PSC_CURRENT_IN] = linear,
951 .format[PSC_CURRENT_OUT] = direct,
952 .format[PSC_POWER] = direct,
953 .m[PSC_TEMPERATURE] = 1,

--- 8 unchanged lines hidden (view full) ---

962 .read_byte_data = mp2975_read_byte_data,
963 .read_word_data = mp2975_read_word_data,
964#if IS_ENABLED(CONFIG_SENSORS_MP2975_REGULATOR)
965 .num_regulators = 1,
966 .reg_desc = mp2975_reg_desc,
967#endif
968};
969
946 .pages = 1,
947 .format[PSC_VOLTAGE_IN] = linear,
948 .format[PSC_VOLTAGE_OUT] = direct,
949 .format[PSC_TEMPERATURE] = direct,
950 .format[PSC_CURRENT_IN] = linear,
951 .format[PSC_CURRENT_OUT] = direct,
952 .format[PSC_POWER] = direct,
953 .m[PSC_TEMPERATURE] = 1,

--- 8 unchanged lines hidden (view full) ---

962 .read_byte_data = mp2975_read_byte_data,
963 .read_word_data = mp2975_read_word_data,
964#if IS_ENABLED(CONFIG_SENSORS_MP2975_REGULATOR)
965 .num_regulators = 1,
966 .reg_desc = mp2975_reg_desc,
967#endif
968};
969
970static struct pmbus_driver_info mp2973_info = {
970static const struct pmbus_driver_info mp2973_info = {
971 .pages = 1,
972 .format[PSC_VOLTAGE_IN] = linear,
973 .format[PSC_VOLTAGE_OUT] = direct,
974 .format[PSC_TEMPERATURE] = linear,
975 .format[PSC_CURRENT_IN] = linear,
976 .format[PSC_CURRENT_OUT] = linear,
977 .format[PSC_POWER] = linear,
978 .m[PSC_VOLTAGE_OUT] = 1,

--- 116 unchanged lines hidden ---
971 .pages = 1,
972 .format[PSC_VOLTAGE_IN] = linear,
973 .format[PSC_VOLTAGE_OUT] = direct,
974 .format[PSC_TEMPERATURE] = linear,
975 .format[PSC_CURRENT_IN] = linear,
976 .format[PSC_CURRENT_OUT] = linear,
977 .format[PSC_POWER] = linear,
978 .m[PSC_VOLTAGE_OUT] = 1,

--- 116 unchanged lines hidden ---