[sane-devel] genesys backend - device I/O's
Pierre Willenbrock
pierre at pirsoft.dnsalias.org
Tue Sep 27 16:53:33 UTC 2005
Hi
I guess this error is triggered by my powersaving code. Playing with
those gpios can (hard-)reset the scanner causing it to reconnect on usb.
Please try the attached patch(against patched experimental module).
Next time please send output with
SANE_DEBUG_GENESYS_GL841=255
SANE_DEBUG_GENESYS=255
Mathias Lang schrieb:
> Hi,
>
> Pierre Willenbrock wrote:
>
>> It is now ready to be extensively tested.
>
>
> i don't know if this is my lack of skills to set up the backend properly
> (tested it on my two boxes), but i get device I/O's with the genesys-cvs
> backend patched with the patch from Pierre's site: The device is first
> opened (the scan head moves a little back and forth) - then i get a
> device I/O.
> My apologies if this has nothing to do with the backend - just wanted to
> give some feedback (GENESYS and SANE_DEBUG_USB logs down...).
>
> Bye,
>
> Mathias
>
Regards,
Pierre
-------------- next part --------------
--- sane-backends-1.0.16/backend/genesys_gl841.c 2005-09-23 21:07:01.963073000 +0200
+++ experimental/genesys/genesys_gl841.c 2005-09-27 18:48:46.735009250 +0200
@@ -2991,36 +2991,6 @@
if (enable)
{
- if (dev->model->gpo_type == GPO_CANONLIDE35)
- {
-/* expect GPIO17 to be enabled, and GPIO9 to be disabled,
- while GPIO8 is disabled*/
-/* final state: GPIO8 disabled, GPIO9 enabled, GPIO17 disabled,
- GPIO18 disabled*/
-
- sanei_genesys_read_register(dev, 0x6D, &val);
- sanei_genesys_write_register(dev, 0x6D, val | 0x80);
-
- usleep(1000);
-
- /*enable GPIO9*/
- sanei_genesys_read_register(dev, 0x6C, &val);
- sanei_genesys_write_register(dev, 0x6C, val | 0x01);
-
- /*disable GPO17*/
- sanei_genesys_read_register(dev, 0x6B, &val);
- sanei_genesys_write_register(dev, 0x6B, val & ~REG6B_GPO17);
-
- /*disable GPO18*/
- sanei_genesys_read_register(dev, 0x6B, &val);
- sanei_genesys_write_register(dev, 0x6B, val & ~REG6B_GPO18);
-
- usleep(1000);
-
- sanei_genesys_read_register(dev, 0x6D, &val);
- sanei_genesys_write_register(dev, 0x6D, val & ~0x80);
-
- }
gl841_set_fe (dev, AFE_POWER_SAVE);
More information about the sane-devel
mailing list