[PATCH] Try to reduce current inrush of DP665 (and rebrands)

Pierre Willenbrock pierre at pirsoft.dnsalias.org
Tue Jul 20 11:20:40 UTC 2010


This first puts a 27 Ohm resistor between USB power and non-gl841
electronics before actually directly connecting.
---
 backend/genesys_gl841.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/backend/genesys_gl841.c b/backend/genesys_gl841.c
index 0a614fa..4a4fabf 100644
--- a/backend/genesys_gl841.c
+++ b/backend/genesys_gl841.c
@@ -3533,6 +3533,15 @@ gl841_save_power(Genesys_Device * dev, SANE_Bool enable) {
 	if (dev->model->gpo_type == GPO_DP665 
             || dev->model->gpo_type == GPO_DP685)
 	  {
+	    /* enable GPIO9 */
+	    sanei_genesys_read_register(dev, 0x6D, &val);
+	    sanei_genesys_write_register(dev, 0x6D, val | 0x01);
+	    dev->reg[reg_0x6d].value |= 0x01;
+	    dev->calib_reg[reg_0x6d].value |= 0x01;
+
+	    usleep(1000000);
+
+	    /* enable GPO17 */
 	    sanei_genesys_read_register(dev, 0x6B, &val);
 	    sanei_genesys_write_register(dev, 0x6B, val | REG6B_GPO17);
 	    dev->reg[reg_0x6b].value |= REG6B_GPO17;
-- 
1.7.1


--------------000907020100030800010206--



More information about the sane-devel mailing list