Lines Matching +full:multi +full:- +full:phase
1 // SPDX-License-Identifier: GPL-2.0-or-later
27 #define TPS53679_PROT_VR12_5MV 0x01 /* VR12.0 mode, 5-mV DAC */
28 #define TPS53679_PROT_VR12_5_10MV 0x02 /* VR12.5 mode, 10-mV DAC */
29 #define TPS53679_PROT_VR13_10MV 0x04 /* VR13.0 mode, 10-mV DAC */
30 #define TPS53679_PROT_IMVP8_5MV 0x05 /* IMVP8 mode, 5-mV DAC */
31 #define TPS53679_PROT_VR13_5MV 0x07 /* VR13.0 mode, 5-mV DAC */
48 for (i = 0; i < info->pages; i++) { in tps53679_identify_mode()
59 info->vrm_version[i] = vr13; in tps53679_identify_mode()
64 info->vrm_version[i] = vr12; in tps53679_identify_mode()
67 return -EINVAL; in tps53679_identify_mode()
79 /* On TPS53681, only channel A provides per-phase output current */ in tps53679_identify_phases()
83 info->phases[0] = (ret & 0x07) + 1; in tps53679_identify_phases()
98 dev_err(&client->dev, "Unexpected PMBus revision 0x%x\n", ret); in tps53679_identify_chip()
99 return -ENODEV; in tps53679_identify_chip()
106 dev_err(&client->dev, "Unexpected device ID 0x%x\n", buf[0]); in tps53679_identify_chip()
107 return -ENODEV; in tps53679_identify_chip()
113 * Common identification function for chips with multi-phase support.
160 dev_err(&client->dev, "Unexpected device ID: %s\n", buf); in tps53676_identify()
161 return -ENODEV; in tps53676_identify()
168 return -EIO; in tps53676_identify()
178 info->format[PSC_VOLTAGE_OUT] = linear; in tps53676_identify()
179 info->pages = 1; in tps53676_identify()
180 info->phases[0] = phases_a; in tps53676_identify()
182 info->pages = 2; in tps53676_identify()
183 info->phases[1] = phases_b; in tps53676_identify()
189 int phase, int reg) in tps53681_read_word_data() argument
193 * the chip datasheet is a bit vague. It says "PHASE must be set to in tps53681_read_word_data()
194 * FFh to access all phases simultaneously. PHASE may also be set to in tps53681_read_word_data()
195 * 80h readack (!) the total phase current". in tps53681_read_word_data()
197 * current for all phases if the phase is set to 0xff. Instead, it in tps53681_read_word_data()
198 * appears to report the current of one of the phases. Override phase in tps53681_read_word_data()
201 if (reg == PMBUS_READ_IOUT && page == 0 && phase == 0xff) in tps53681_read_word_data()
203 return -ENODATA; in tps53681_read_word_data()
233 struct device *dev = &client->dev; in tps53679_probe()
237 if (dev->of_node) in tps53679_probe()
240 chip_id = i2c_match_id(tps53679_id, client)->driver_data; in tps53679_probe()
244 return -ENOMEM; in tps53679_probe()
249 info->pages = TPS53647_PAGE_NUM; in tps53679_probe()
250 info->identify = tps53679_identify; in tps53679_probe()
253 info->identify = tps53676_identify; in tps53679_probe()
257 info->pages = TPS53679_PAGE_NUM; in tps53679_probe()
258 info->identify = tps53679_identify; in tps53679_probe()
261 info->pages = TPS53679_PAGE_NUM; in tps53679_probe()
262 info->phases[0] = 6; in tps53679_probe()
263 info->identify = tps53681_identify; in tps53679_probe()
264 info->read_word_data = tps53681_read_word_data; in tps53679_probe()
267 return -ENODEV; in tps53679_probe()