Commit 8f729db0afce635e658623fe48b7b865de7f6e2d

Con Kolivas 2014-05-05T10:41:32

Support power management optimisations in newer nf* firmware

diff --git a/driver-bitfury.c b/driver-bitfury.c
index 581fa0e..ccbb021 100644
--- a/driver-bitfury.c
+++ b/driver-bitfury.c
@@ -459,6 +459,7 @@ static bool nfu_detect_one(struct cgpu_info *bitfury, struct bitfury_info *info)
 	/* Set LED and PWR pins to output and high */
 	mcp->direction.pin[NFU_PIN_LED] = mcp->direction.pin[NFU_PIN_PWR_EN] = MCP2210_GPIO_OUTPUT;
 	mcp->value.pin[NFU_PIN_LED] = mcp->value.pin[NFU_PIN_PWR_EN] = MCP2210_GPIO_PIN_HIGH;
+	mcp->value.pin[NFU_PIN_PWR_EN0] = MCP2210_GPIO_PIN_LOW;
 
 	mcp->direction.pin[4] = MCP2210_GPIO_OUTPUT;
 	mcp->designation.pin[4] = MCP2210_PIN_CS;
diff --git a/driver-bitfury.h b/driver-bitfury.h
index ccd322a..6cbbc0a 100644
--- a/driver-bitfury.h
+++ b/driver-bitfury.h
@@ -32,6 +32,7 @@ extern int opt_osm_led_mode;
 #define NFU_PIN_LED 0
 #define NFU_PIN_SCK_OVR 5
 #define NFU_PIN_PWR_EN 6
+#define NFU_PIN_PWR_EN0 7
 
 #define SPIBUF_SIZE 16384
 #define BITFURY_REFRESH_DELAY 100