Only perform a single check at initialization time to see if the probe is
equipped with a power-switch. This is done in preparation for revision B
support which has this kind of information encoded in EEPROM.
Signed-off-by: Bartosz Golaszewski <redacted>
int hwmon_num;
int probe_type;
int index;
+ int has_pws;
};
struct channel_priv {
cgp->hwmon_num = hwmon;
cgp->probe_type = type;
cgp->index = prb_num - 1;
+ cgp->has_pws = sr_gpio_getval_export(pws_info_gpios[cgp->index]);
cg->name = g_strdup_printf("Probe_%d", prb_num);
cg->priv = cgp;
{
struct channel_group_priv *cgp = cg->priv;
- return sr_gpio_getval_export(pws_info_gpios[cgp->index]);
+ return cgp->has_pws;
}
/*