/* Verify bus voltages for all ina237 nodes in DT.  */
static void test_shunt_cal(struct ina237_fixture *fixture)
/* Verify bus voltages for all ina237 nodes in DT.  */
static void test_shunt_cal(struct ina237_fixture *fixture)
{
	double shunt_cal = 819.2e6 * fixture->current_lsb_uA * 1e-6 * fixture->rshunt_uOhms * 1e-6;
	if (fixture->config & INA237_CFG_HIGH_PRECISION) {
		shunt_cal *= 4;
	}
	uint32_t shunt_register_actual;
	uint16_t shunt_register_expected = (uint16_t)shunt_cal;
	zassert_ok(ina237_mock_get_register(fixture->mock->data, INA237_REG_CALIB,
		&shunt_register_actual));
	zexpect_within(shunt_register_expected, shunt_register_actual, 1,
		"Expected %d, got %d", shunt_register_expected, shunt_register_actual);
}