Lines Matching +full:multi +full:- +full:phase
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Hardware monitoring driver for Infineon Multi-phase Digital VR Controllers
15 #define XDPE122_PROT_VR12_5MV 0x01 /* VR12.0 mode, 5-mV DAC */
16 #define XDPE122_PROT_VR12_5_10MV 0x02 /* VR12.5 mode, 10-mV DAC */
17 #define XDPE122_PROT_IMVP9_10MV 0x03 /* IMVP9 mode, 10-mV DAC */
22 int phase, int reg) in xdpe122_read_word_data() argument
33 ret = pmbus_read_word_data(client, page, phase, reg); in xdpe122_read_word_data()
44 val >>= -exponent; in xdpe122_read_word_data()
47 switch (info->vrm_version[page]) { in xdpe122_read_word_data()
50 return 1 + DIV_ROUND_CLOSEST(val - 500, 10); in xdpe122_read_word_data()
54 return 1 + DIV_ROUND_CLOSEST(val - 250, 5); in xdpe122_read_word_data()
58 return 1 + DIV_ROUND_CLOSEST(val - 200, 10); in xdpe122_read_word_data()
62 return DIV_ROUND_CLOSEST((1550 - val) * 100, in xdpe122_read_word_data()
66 return -EINVAL; in xdpe122_read_word_data()
69 return -ENODATA; in xdpe122_read_word_data()
91 info->vrm_version[i] = vr13; in xdpe122_identify()
94 info->vrm_version[i] = vr12; in xdpe122_identify()
97 info->vrm_version[i] = imvp9; in xdpe122_identify()
100 info->vrm_version[i] = amd625mv; in xdpe122_identify()
103 return -EINVAL; in xdpe122_identify()
134 info = devm_kmemdup(&client->dev, &xdpe122_info, sizeof(*info), in xdpe122_probe()
137 return -ENOMEM; in xdpe122_probe()