  int opt_avalon2_freq_min = AVA2_DEFAULT_FREQUENCY;
  int opt_avalon2_freq_max = AVA2_DEFAULT_FREQUENCY_MAX;
  
-@@ -52,6 +54,11 @@ int opt_avalon2_voltage_min = AVA2_DEFAULT_VOLTAGE;
+@@ -52,6 +55,32 @@ int opt_avalon2_voltage_min = AVA2_DEFAULT_VOLTAGE;
  int opt_avalon2_voltage_max = AVA2_DEFAULT_VOLTAGE_MAX;
  
  int opt_avalon2_overheat = AVALON2_TEMP_OVERHEAT;

 
 			while (avalon2_send_pkg(info->fd, &send_pkg, thr) != AVA2_SEND_OK)
 				;
@@ -684,9 +767,58 @@ static int polling(struct thr_info *thr)
 	return 0;
 }
 

 
 	struct pool *pool;
 	struct cgpu_info *avalon2 = thr->cgpu;
@@ -696,39 +878,41 @@ static int64_t avalon2_scanhash(struct thr_info *thr)
 	uint32_t tmp, range, start;
 	int i;
 
