pub async fn prepare_indexed_hwmon_ioctx(
    hwmondir: &Path,
    idx: u64,
    kind: SensorType,
    power_state: PowerState,
    bridge_gpio_cfg: &Option<Arc<BridgeGPIOConfig>>
) -> Result<Option<SensorIOCtx>, Box<dyn Error>>
Expand description

Construct a SensorIOCtx for an “indexed” hwmon sensor.

Indexed sensors are those with uniform numbered channels, such as ADC and fan sensors.

Returns Ok(None) if power_state is not currently active (in which case there’s nothing further to do), and otherwise Ok(Some(_)) on success or Err(_) on failure.