Lines Matching +full:single +full:- +full:phase

1 // SPDX-License-Identifier: GPL-2.0-or-later
82 if (!i2c_check_functionality(client->adapter, in ucd9200_probe()
85 return -ENODEV; in ucd9200_probe()
90 dev_err(&client->dev, "Failed to read device ID\n"); in ucd9200_probe()
94 dev_info(&client->dev, "Device ID %s\n", block_buffer); in ucd9200_probe()
96 for (mid = ucd9200_id; mid->name[0]; mid++) { in ucd9200_probe()
97 if (!strncasecmp(mid->name, block_buffer, strlen(mid->name))) in ucd9200_probe()
100 if (!mid->name[0]) { in ucd9200_probe()
101 dev_err(&client->dev, "Unsupported device\n"); in ucd9200_probe()
102 return -ENODEV; in ucd9200_probe()
105 if (client->dev.of_node) in ucd9200_probe()
106 chip = (uintptr_t)of_device_get_match_data(&client->dev); in ucd9200_probe()
108 chip = mid->driver_data; in ucd9200_probe()
110 if (chip != ucd9200 && strcmp(client->name, mid->name) != 0) in ucd9200_probe()
111 dev_notice(&client->dev, in ucd9200_probe()
113 client->name, mid->name); in ucd9200_probe()
115 info = devm_kzalloc(&client->dev, sizeof(struct pmbus_driver_info), in ucd9200_probe()
118 return -ENOMEM; in ucd9200_probe()
123 dev_err(&client->dev, "Failed to read phase information\n"); in ucd9200_probe()
133 info->pages = 0; in ucd9200_probe()
137 info->pages++; in ucd9200_probe()
139 if (!info->pages) { in ucd9200_probe()
140 dev_err(&client->dev, "No rails configured\n"); in ucd9200_probe()
141 return -ENODEV; in ucd9200_probe()
143 dev_info(&client->dev, "%d rails configured\n", info->pages); in ucd9200_probe()
146 * Set PHASE registers on all pages to 0xff to ensure that phase in ucd9200_probe()
153 for (i = 0; i < info->pages; i++) { in ucd9200_probe()
155 * Setting PAGE & PHASE fails once in a while for no obvious in ucd9200_probe()
169 dev_err(&client->dev, in ucd9200_probe()
170 "Failed to initialize PHASE registers\n"); in ucd9200_probe()
174 if (info->pages > 1) in ucd9200_probe()
177 info->func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_STATUS_INPUT | in ucd9200_probe()
184 for (i = 1; i < info->pages; i++) in ucd9200_probe()
185 info->func[i] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT | in ucd9200_probe()
190 /* ucd9240 supports a single fan */ in ucd9200_probe()
191 if (mid->driver_data == ucd9240) in ucd9200_probe()
192 info->func[0] |= PMBUS_HAVE_FAN12 | PMBUS_HAVE_STATUS_FAN12; in ucd9200_probe()