+static int chroma_62000p_probe_channels(struct sr_dev_inst *sdi,
+ struct sr_scpi_hw_info *hw_info,
+ struct channel_spec **channels, unsigned int *num_channels,
+ struct channel_group_spec **channel_groups,
+ unsigned int *num_channel_groups)
+{
+ unsigned int volts, amps;
+ struct channel_spec *channel;
+
+ (void)sdi;
+
+ sscanf(hw_info->model, "%*[^P]P-%u-%u", &volts, &s);
+ sr_dbg("Found device rated for %d V and %d A", volts, amps);
+
+ if (volts > 600) {
+ sr_err("Probed max voltage of %u V is out of spec.", volts);
+ return SR_ERR_BUG;
+ }
+
+ if (volts > 120) {
+ sr_err("Probed max current of %u A is out of spec.", amps);
+ return SR_ERR_BUG;
+ }
+
+ channel = g_malloc0(sizeof(struct channel_spec));
+ channel->name = "1";
+ channel->voltage[0] = channel->current[0] = 0.0;
+ channel->voltage[1] = (float)volts;
+ channel->current[1] = (float)amps;
+ channel->voltage[2] = channel->current[2] = 0.01;
+ *channels = channel;
+ *num_channels = 1;
+
+ *channel_groups = g_malloc(sizeof(struct channel_group_spec));
+ **channel_groups = chroma_62000_cg[0];
+ *num_channel_groups = 1;
+
+ return SR_OK;
+}
+